Thursday, September 26, 2013

Recent Dumb Things: Clearing the Cache

This week, I purchased a hardcover copy of Spook Country, the second book in William Gibson's Bigend Trilogy. (Or is it the "Blue Ant" trilogy? As far as I know, there isn't an agreed-upon nickname for the one that starts with Pattern Recognition and ends with Zero History.)

Of course, today, as I was digging around on my nightstand, what did I see? My previously purchased copy of Spook Country:

 IMG_2286 

I will add this volume to my collection of redundant media, which, as I've written before, usually refers to buying CDs that I already own.

Come to think of it, there are a few other new additions to that category -- I did a CD Cellar run a few weeks ago, and picked up Bjork's Volta, which I was pretty sure I didn't own because I didn't remember the distinctive cover art.

I was wrong:


Pictured alongside the Bjork are some other redundant purchases from the short- to mid-term past: Black Rebel Motorcycle Club, Belle & Sebastian, and Florence and the Machine. (This is also why can never again buy any Stereolab CDs.)

Some of you may think that the act of buying CDs (even used, as I usually do) is the true "dumb thing," with online music players with the built-in cataloging and such, but I like having the media as the ultimate backup.

While I'm clearing out the cache of dumbness, here's one from last week -- do you know the sound a lithium camera battery makes in the dryer, after it's been through a wash cycle in the side pocket of a pair of cargo shorts?

It goes *ka-clunk* *ka-clunk* *clunk* *ka-clunk* *clunk*

I realize the visual is similarly lacking, but here it is anyway:
IMG_2284

Lastly, to close out this edition, here's an oldie that I've never mentioned -- a slightly melty rice paddle after it fell out of the dishwasher rack and onto the heating element:
IMG_2282

It looks... diseased. (But it still works.)

Tuesday, September 03, 2013

Interactive Map: Results of 334 Fairfax Health District Restaurant Inspections, July 2013

In July of 2013, the Food Safety Section of the Fairfax County (Virginia) Health Department conducted 334 restaurant inspections for establishments in Fairfax County, including portions of Fairfax City and the City of Falls Church.

For my final map project in "Maps and the Geospatial Revolution" -- a massive open online course (MOOC) from Coursera -- I made an interactive map visualizing the results.

Click the screenshot to view the full-size interactive map, or scroll down to see an embedded version and read more about how and why I created it:

Results of 334 Fairfax Health District Restaurant Inspections, July 2013

Screenshot of an interactive map showing the results of 334 Fairfax County restaurant inspections in July 2013.

Finding the Data

The Virginia Department of Health uses HealthSpace, a Canadian company with a US subsidiary, to publish its restaurant inspection results.

It's not particularly user-friendly. There's no site-wide search -- you have to first know the locality you want. (Note that the Richmond Times-Dispatch already has a searchable Virginia restaurant inspections database that pulls from the same data, so my version was just a learning exercise.)

Once at the proper locality, you can search by restaurant name. You can also browse the list sorted by inspection date, though it's easier to view just the frame showing the results (adjusting the count and start attributes in the URL to approximate date ranges as needed.)

For my map, I scraped the data manually (and painfully, with a lot of clicking, copy-and-paste, and search-and-replace) from the Web site; added city names; converted the street addresses to latitude and longitude using a web tool; then added violation counts, the July inspection report, and the URL of each restaurant's facility inspection history record. Then, I exported everything to a CSV file that I imported as a layer in ArcGIS Online (where I have a free public account).

Next time, I'll use a scraper. (Note: Learn how to write a scraper.)

What You're Seeing

Clicking a circle on the map will pop up a window showing the restaurant's July inspection info
The restaurants are represented by circles, with graduated colors showing the number of critical violations for each restaurant. The color categories are divergent, following natural breaks: Bluer symbols have fewer critical violations; redder symbols have more critical violations; and neutral colors represent the average.

Clicking each symbol will pop up a window showing the restaurant's info and number of critical and noncritical violations from its most recent inspection. Also, clicking "More info" will link to that restaurant's facility inspection history (where you can find the results of previous inspections).

Scrolling down will show the full report from the July inspections -- the line breaks and formatting got lost along the way, so they're a little hard to read.

(This version of the map incorporates feedback I received during the peer review process -- the basemap uses a simple gray background which makes the circles easier to see than with the satellite image basemap I used before.)

Final Notes

Note that any single inspection is just a snapshot of that restaurant, so check the inspection history link to get a fuller picture.

Also, "critical" violations can cover everything from handwashing failures and rodent droppings, to lacking an onsite Certified Food Manager or menu labels warning about the health hazards of undercooked ingredients. (See more info about critical and noncritical violations, and a FAQ about the inspection process.)

Government transparency and open government are other interests of mine, so this was a chance to try my hand at taking government data and visualizing it into a map. Nothing as fancy as what you might see presented at Transparency Camp (there are much fancier story map templates, but with 334 results and not a lot of time, I stuck with a basic visualization).

Lastly, since I did everything by hand, don't expect any future editions. (Check the Richmond Times-Dispatch if you want to search for a particular restaurant.)