This is Part 2 of visualizing 311 Call Centre data. In Part 1 I read and transformed the call data using Python's SQLAlchemy library and loaded it to MySQL database.

Tableau offers a native MySQL connector which makes it simple to connect to the existing SQL datasource:

Data Connection Options in Tableau

The workflow in Tableau consisted of creating several worksheets that depict the total number of calls, calls by type, department, a by Ward. All of these sheets are then combined into one consolidated dashboard.

To get a look at calls per hour in the 7 day worksheet, a calculated field was constructed to extract just the hour from the datetime field. In Tableau, the formula for extracting just the hour from YYYY-MM-DD HH:MM:SS is constructed using the SQL DATEPART function:

DATEPART('hour',[Created Date])

This new column, 'CallHour' is then listed in the 'calltable' data from the original '311windsor' database:

Lastly, the dashboard is uploaded to Tableau Public, a repository for sharing and embedding dashboards. A live, interactive version of that viz is embedded below.

As new 311 data is made available on the Open Data Portal, it can be appended to the database with the code in this Jupyter Notebook and the dashboard will update the new rows of information accordingly.