Top of my to-do list has been to build something using data from the City of Seattle data portal (data.seattle.gov), powered by Socrata. This one is not particularly useful, but I’ll share with you anyway!
One of the things I like least about homeownership is the need to keep up a yard. Thankfully I’ve never received nastygrams about yard care, but I’ve heard some horror stories. One couple in Texas was in the process of removing a dead tree from their yard — they had just cut it down and into transportable sized pieces, and piled and covered the logs up with a tarp, and THE NEXT DAY they got a note demanding they remove “tree debris” from their yard within three days or pay a penalty.
Anyway, in that frame of mind I giggled through the “weed and vegetation code citations” available via public record. Since Washington legalized marijuana last year, I had an idea in my mind to track code citations like these:
- Large overgrown blackberries and vegetation encroaching sidewalk
- Hazardous vegetation encroaching on sidewalk forcing pedestrians into street
- OBSERVED LARGE TREE ON PROPERTY NO SIGNS OF RODENTS AND NO BEES WERE PRESENT DURING A SUNNY DAY
…and present them as our city’s most pressing weed violations.
Clever? Maybe. Half-baked? Definitely. My first idea was to tweet out the description of the citation, with a google maps street-view image of the address in question. That might be visually interesting but seemed like a huge invasion of privacy, so I quickly shelved it. I have no interest in actually shaming the property owners.
So instead I started with the easiest path, tweet the generic descriptions, to see where that led me. Here are the “get-started” steps:
- Register for a developer key with Socrata
- Identify the data set you want at data.seattle.gov (for me: code violations)
- Use developer key to access the API (I used a Ruby gem from Socrata) to fetch that data set
- Filter (for code group: “weed and vegetation”) and collect results in an array
- Set up a Twitter API client to talk to twitter, via a new twitter account if needed (I recycled an existing bot!)