[CivicAccess-discuss] Scraping election results..

Jennifer Bell jenniferlianne at yahoo.ca
Wed Oct 15 11:34:23 EDT 2008


There's a tab separated file on Elections Canada already:
http://enr.elections.ca/

But it lists all candidates, with a vote count.  I've done a little script that parses it and figured out the top candidate per riding.

Interestingly, the file says there have been no (0) spoiled ballots in the entire country.  Either we're a very well behaved people, or there's a reporting issue.

Jennifer


--- On Wed, 10/15/08, Russell McOrmond <russell at flora.ca> wrote:

> From: Russell McOrmond <russell at flora.ca>
> Subject: Re: [CivicAccess-discuss] Scraping election results..
> To: "civicaccess discuss" <civicaccess-discuss at civicaccess.ca>
> Received: Wednesday, October 15, 2008, 11:02 AM
> 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!"
> _______________________________________________
> CivicAccess-discuss mailing list
> CivicAccess-discuss at civicaccess.ca
> http://lists.pwd.ca/mailman/listinfo/civicaccess-discuss


      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at
http://ca.toolbar.yahoo.com.



More information about the CivicAccess-discuss mailing list