Dashboard week - day 1

by George Pattinson

Building a crime KPI dashboard

Today we were asked by Andy Kriebel to build an Alteryx App whereby a user can select various information which will update a Tableau KPI dashboard (see blog post here: https://www.thedataschool.co.uk/andy-kriebel/ds24-day1). The data we were asked to use is UK Street Crimes (https://data.police.uk/docs/method/crime-street/). The KPI dashboard focused on crimes within a user-selected post code.

Initial plan

We have used APIs before and so I was confident I could have my workflow finished within a couple of hours - I had a good idea of what needed to be included and so set myself a target of having my workflow finished by 11am, and the dashboard done before 2pm to ready myself for the presentation.


Step 1

First of all I read the documentation on the Data.Police API website and figured out which parts of the API I can pull through to eventually be used to be user selected (e.g. the latitude, longitude, and date etc can be built into the API url request). Below is an example of the url:


The parts in bold are the metrics which can be user selected and altered to retrieve specific information from the crime API.

Step 2

I started to build out the workflow to download crime data from API and convert the data from JSON into a Tableau hyper file to be used for KPI dashboard. Later on, I decided to allow the user to select crime data based on their post code, so pulled in data from a postcode API to get latitude and longitude coordinates.

Step 3

After bringing in data from the postcode API and crime API, I built in user interactivity to make the workflow into a Alteryx app (saved as a .yxwz file). After building in this user interaction, and when running the app this is what the user interface looks like

User interface for Alteryx app

As you can see, the user is able to select a postcode, a category of crime and a start and end date to filter to the relevant data they would like to see.

Step 4

Once the general data preparation was finished, I outputted the data to a Tableau .hyper file so that I could open up Tableau and build a KPI dashboard. The final workflow can be seen below:

Final Alteryx workflow

Step 5

Finally, I opened up Tableau  - which I had actually had open for a while to check different iterations of the data I was outputting - to build a KPI dashboard to summarise any findings from the data. Because there weren't many fields of data that were in the data, I focused on keeping the dashboard simple (link https://public.tableau.com/views/Crimesinyourpostcode/Dashboard1?:language=en-GB&:display_count=n&:origin=viz_share_link!)

Final KPI crime data dashboard


The main challenges I found when doing this project was definitely the planning under time pressure. Understanding what you are capable of achieving within a small amount of time is a really important skill, and one that I have improved a lot at the Data School!


George Pattinson

Fri 01 Oct 2021

Wed 29 Sep 2021

Tue 28 Sep 2021

Thu 02 Sep 2021