The fourth day of dashboard week was about APIs and spatial data. We were tasked with creating a Tableau dashboard using a dataset found on the City of Melbourne Open Data website. Using this data, we then need to retrieve the data using the API in a JSON format.
When considering what data to choose, I took into consideration some learnings from previous dashboard week days such as timeboxing and data scoping to hone in on a story I would be able to present. Ultimately, I decided that the question I wanted to ask was what kind of open artworks are nearest to different self-guided walks around Melbourne city.
The first step in my Alteryx workflow was to call the API to bring in two datasets:
- Self-guided walks in Melbourne
- Outdoor artworks in Melbourne
Using these two datasets, I wanted to draw line polygons to show the self-guided walks and create points to show the location of outdoor artworks in Melbourne.
When calling the API to retrieve the walks data, the first challenge I ran into was that both coordinates and polygons were being pulled into the dataset so when I try to parse out the JSON data, it would parse out the polygons as multiple coordinates. From there, I would have to build out the polygon in the original data by creating points from coordinates then creating polygons from points. However, it turns out that if we can pull out a certain part of the string, we can directly change the data type to polygon instead of going through the tedious process of rebuilding the polygon.
The next step I took in my Alteryx workflow was to call in the outdoor artwork data. As this dataset only had simple points, it would be easier to create new points in Alteryx using the existing latitude and longitude coordinates to create points instead of parsing out the JSON spatial objects already available in the string.
The last step in my Alteryx workflow was to find the nearest artworks for different walks. For each different walk, I wanted to find the 20 closest artworks that are within 0.5km or 500m from the walk. I joined the two datasets together with the ‘Find Nearest’ tool to create a smaller dataset from the two.
The next step in Tableau was to create a dashboard using this new dataset with line and point spatial objects. The initial dashboard design idea was to create something simple and clean as I spent most of my time in Alteryx working on data preparation.
The dashboard is available to view on my Tableau Public.