As a data-driven society and Tableau junkies, connecting to your favorite data sources easier is definitely a welcome sight. Tableau does this very well with a slew of standard data connectors. But, what if the data you want to connect to is from a web page? Well, you have options!
You might be aware of Tableau’s Web Data Connector that was released with version 9.1. Moreover, you might have seen some of the data connectors that were created by my colleagues Robert Rouse (import.io to collect data from any website!), Derrick Austin (Federal Reserve data connectors!) and Matthew Orr (Socrata data connector!). If not, then I would definitely checking them out!
In keeping with the tradition of making it easier to connect to our favorite data sources, I went out to put my budding web developing skills to the test and created a data connector using the USGS API.
The USGS Web Data Connector
As mentioned earlier, to access the web data connector, you need to have Tableau version 9.1 or later installed on your machine. From there, to connect, under To a Server, select the Web Data Connector option. You will then see a window where you can input the following URL: wdc.poc.interworks.com. Once the page loads, you can select the data connector of your choosing. Here, we will select the USGS button.
Once the USGS option is selected, we should see the page below (with an example search). The options we see here are entirely optional. If you don’t input any options, you will get a list of all the earthquakes from the past 30 days. Now, let’s talk a little bit about the search options.
First, we can limit our query by adding a start time and end time. These need to be in the YYYY-MM-DD format. Secondly, we can also search for a specific area where we want to concentrate on by typing in the latitude and longitude of our center point and a radial value in miles. Lastly, we can specify the minimum magnitude we would like to see in our query.
Once you are ready, simply select the Get Data button to submit the query. Once submitted, you should see a preview of the data that Tableau found and you are ready to start diving into the data!