Election RDF, or How to make machine readable polling data

by Kendall Clark

Related link: http://www.mindswap.org/~kendall/ev/allpolls.rdf



If you are, like me, a bit of a political junkie; and if, like me, you are an American citizen; then chances are that you are, like me, obsessed with the current US presidential election cycle. Now, mind, I'm not obsessed because I think either candidate is particularly good; in fact, I think one of them is the worst president in US history and the other one is merely awful. No. I'm obssessed because the drama of the whole bloody mess is not only irresistible, but so much of it is being played out all around me.



You see, as a resident of downtown Washington, DC, living 4 blocks from the White House, I tend to take notice of stuff like "suitcase nukes" and "violations of civil rights" and "the Pentagon system of R&D". I'm just picky that way!



I'm also a Semantic Web researcher @ University of Maryland's MIND lab, which means it's my business to know about stuff like RDF, OWL, rules, and how they interact with stuff like HTTP, webarch, REST, WSDL, and on and on.



Take those two great tastes, politics and Semantic Web, and mix them together like chocolate and peanut butter -- what do you get? Well, something very much cooler than what I've done, but, you know, I always loved that "you got yr peanut butter in my chocolate" commercial.



Back to the point. electoral-vote.com is, to put it succinctly, the single best site for news about the US election I know. Amazing, really. Highly recommended. At any rate, I decided that all of the state election poll data that electoral-vote.com is tracking should be published on the Semantic Web, so that smart folks could do interesting things with it. So on Monday I wrote a bit of Python to fetch (using conditional GET, of course) electoral-vote.com's comma-separated-values file full of electoral poll data every hour; then it gets converted into
RDF -- bright, shiny, bnode-rich RDF:





http://www.mindswap.org/~kendall/ev/allpolls.rdf



I'm including the HTTP headers necessary to do conditional GET, so you can be a good web citizen too.



We're a long way from automated fact-checking of debates; we're not even particularly close to computer-assisted, collaborative fact checking of debates (though for this more modest latter goal, all the technology's in place, we really just need some better social conventions and pressures). But you can use RDF and the Semantic Web to track state-wide polling data.



All props to the person behind electoral-vote.com -- it rocks.


3 Comments

dietricha
2004-10-06 23:29:02
The WhoIsGoingToBePresident API
It's an electoral-vote.com web services interface in SOAP and plain ol' XML.


http://dietrich.ganx4.com/president/

uche
2004-10-07 08:19:34
The WhoIsGoingToBePresident API
SOAP ain't plain ol' XML.
JoshuaTauberer
2004-10-08 13:33:31
GovTrack
It doesn't have election data, but www.GovTrack.us tracks events in the U.S. Congress and publishes dynamic RSS/RDF feeds for them. (Yes, this is a shameless plug.)