Jump to content
Sal's RuneScape Forum
  • entries
    566
  • comments
    3,469
  • views
    152,227

Election Results

Sign in to follow this  
Neo Avatars

240 views

After the election on Thursday, I didn't like the way the results and summaries were displayed on various websites (in particular, the grouping of smaller parties as 'Other'), so decided to do something myself. I've wanted to learn PHP for a while, so this also provided a perfect opportunity to do that. :D

 

I started off by trying to work out how to get the data, which was a mess involving regular expressions that worked some of the time and not others, so I ended up using regexps for some things and other methods where nothing 'sensible' would work. 300 lines of mess and much frustration later, I had the data entered into a database! ^_^

 

Next, I had to work out a way to display the data, deciding that giant tables with an ability to sort them would be best. I then went through and wrote some scripts to generate or work out useful bits of information that weren't visible in the raw data.

 

With everything in place, I worked out what information would be wanted in each table before going and creating them.

 

The end result may not be the prettiest thing in the world, but the data is hugely interesting. ^_^

http://ukelection.byethost32.com/full-data.php

 

Above everything else, I had great fun creating the 'Seats' columns on the Party Listing page. Basically, 'how many seats would different parties get with alternative voting systems?'. Of course, the values are horribly crude and a bit of a 'plug in some numbers until the output totals 650 and the BNP doesn't have a majority' situation, but the numbers are interesting nonetheless.

 

I've learned a lot and it's nice to make something where people IRL can make sense of it too. -.-

Sign in to follow this  


10 Comments


Recommended Comments

I don't understand politics and couldn't make heads nor tails of it. But looks really good and it came up with where I live for Conservative's so that's right :P. Nice work.

Share this comment


Link to comment
Take the BNP out plz >:( They aren't a proper party.

What's the difference betwen Nick Griffin and a bus? A bus has seats. :P

Share this comment


Link to comment

I hope for one thing

that this situation can give the BNP the power to force either of the 2 "big" parties to change the voting process to something more relevant to the amount of votes which gives smaller parties a chance

Share this comment


Link to comment
Take the BNP out plz >:( They aren't a proper party.
They stood in 336 constituencies, so that says they are. :P

 

Where did you grab the data from? :o
The BBC website (as it may have been possible to guess from links on the constituency pages).

I'm looking at trying to get another couple of bits of information not available on the BBC site from elsewhere...

Share this comment


Link to comment

OK; personal opinion time...

Gordon Brown & Nick Clegg should do the partnership thing with each other, personally, Tories policies are pathetic, I for one will suffer from this, for instance, no child benefits, my mum being a single mum with 2 children needs the extra money, then there's my side, as of next year, I am entitle to EMA (Educational Maintenance Allowance), if I stay on at school, which I shall, with David Cameron in, Karl doesn't get that £30 a week... :(

And I promise you this, people need the money more than we do.

Then, the job cuts, to cut expenses, Police officers, Sanity workers (bin men etc), Teachers, all without, life becomes harder and much more of a crime and skuzz hole land, surely the 9B you are going to save per year isn't worth it? Just pull us out of Europe or some war to save the money, SIMPLES *meerkat noise*

Share this comment


Link to comment
Haha i get the feeling i've seen that background somewhere else. :aware:

No idea what you're talking about. :aware:

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×

Important Information

By using this site, you agree to our Guidelines and Privacy Policy.