Do you want an easy way to compare NASA’s meteorite tracking data with your own UFO sighting adventures? Maybe you would like to combine food service inspection violations for restaurants in your area with your credit card statements, instead. The good news is that it’s now easier to connect to governmental data in Tableau and use it alongside your existing data sources.
InterWorks has created a Tableau Web Data Connector (WDC) for Socrata. You can use it to connect to your own Socrata site, or sources you happen upon at OpenDataNetwork.com.
How to Use the Socrata WDC
To get to the desired Socrata data, simply add a new data source in Tableau Desktop versions 10 and up. Beneath the To a server section, select Web Data Connector.
In the URL bar of the WDC, type https://wdc.interworks.com/. Among others, you should notice a button for Socrata. Don’t be afraid. Click that button.
At this point, you will be able to enter the Socrata site, dataset ID and optional filter conditions. If you’re looking at a data source on OpenDataNetwork.com, you can copy and paste the site and dataset ID from the URL bar of your browser. For the example case of the NASA meteorite landing data, they will be data.nasa.gov and gh4g-9sfh, respectively.
Filtering the data using a where clause will depend a great deal on the data set you’re using. The good news is that once you enter the site and dataset ID, you’ll be presented with a listing of columns available in that dataset as a guide. The WDC will pass along filter conditions to the data set (e.g. restaurant_rating = ‘Failed’) to really narrow down to the stuff that interests you.
If you need further assistance writing where clauses, you don’t have to wake up your favorite search engine – there’s a link to the documentation in the How to use box at the top of the screen (gently tap the + button to expand). When in doubt, just leave it blank and do your filtering in Tableau.
When you’ve had all of the fun you can with the form, just click on the Get Data button and visualize the data to your heart’s content. And if you’re feeling a little frisky, try connecting to more than one Socrata data source in your project to really spice things up.