Login  Register

Re: Scraping election results..

Posted by Russell McOrmond-2 on Oct 15, 2008; 3:02pm
URL: http://civicaccess.416.s1.nabble.com/Scraping-election-results-tp1344p1347.html


Daniel Haran wrote:
> Robin scraped some candidate data:
> http://cancan.waglo.com/dataface/
>
> For elected candidates, I wrote
> http://rubyforge.org/projects/mp-ca-scraper/ last year, which may
> still be useful.

   I hate to admit this in public, but I've never managed to get a rails
application running.  In my case I don't want to run a web application,
I want to extract the data and import it into an SQL database.

   The page format for
http://webinfo.parl.gc.ca/MembersOfParliament/MainCandidatesCompleteList.aspx?TimePeriod=Current&Language=E 
is similar to
http://webinfo.parl.gc.ca/MembersOfParliament/MainMPsCompleteList.aspx?TimePeriod=Historical&Language=E 
, except for the column "Election Result" which says "Defeated" or
"Elected".

   Not to get into any language wars/etc, but I may look into writing
something in either PHP or Perl for those of us old folks who can't
figure Ruby/Rails out.

--
  Russell McOrmond, Internet Consultant: <http://www.flora.ca/>
  Please help us tell the Canadian Parliament to protect our property
  rights as owners of Information Technology. Sign the petition!
  http://www.digital-copyright.ca/petition/ict/

  "The government, lobbied by legacy copyright holders and hardware
   manufacturers, can pry my camcorder, computer, home theatre, or
   portable media player from my cold dead hands!"