tableau tutorial using the city of ottawa 2011-2013 crime datadavidmckie.com/tableau tutorial with...

23
Tableau tutorial using the city of Ottawa 2011-2013 crime Data Tableau is a free tool that according to its mission statement helps “people see and understand data”. The program helps the people for whom we write stories understand them better by seeing certain trends by pointing and clicking. Journalists are using Tableau to tell excellent stories that you’ll find on this syllabus and by subscribing to listserves such as the National Institute for Computer Assisted Reporting, which goes by the more well-known acronym familiar to data journalists, NICAR. Subscribing to the NICAR listserv will be well worth your while. For it is a venue where some of the best journalists in North America and beyond discuss tools like Excel, Fusion Tables, Tableau, how they use them, the problems they encounter. The best way to learn any of these tools is to practice, practice, practice. Tableau has some wonderful online tutorials. The NICAR listserv is an excellent place to pick up tips. Let’s get started. We’ll continue to work with the 2011-2012 Ottawa Crime data, which we’ve used to learn filtering, sorting, ratios and pivot tables in Excel, and creating heat maps in Fusion Tables. Now we’ll see how the same data set in Tableau helps people see trends in an interactive fashion. If you haven’t done so already, the first step is to download the public version of Tableau. (Once you improve, you might want to graduate to the professional version).

Upload: others

Post on 03-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

Tableau tutorial using the city of Ottawa 2011-2013 crime Data

Tableau is a free tool that according to its mission statement helps “people see and understand data”. The program helps the people for whom we write stories understand them better by seeing certain trends by pointing and clicking. Journalists are using Tableau to tell excellent stories that you’ll find on this syllabus and by subscribing to listserves such as the National Institute for Computer Assisted Reporting, which goes by the more well-known acronym familiar to data journalists, NICAR. Subscribing to the NICAR listserv will be well worth your while. For it is a venue where some of the best journalists in North America and beyond discuss tools like Excel, Fusion Tables, Tableau, how they use them, the problems they encounter.

The best way to learn any of these tools is to practice, practice, practice. Tableau has some wonderful online tutorials. The NICAR listserv is an excellent place to pick up tips.

Let’s get started.

We’ll continue to work with the 2011-2012 Ottawa Crime data, which we’ve used to learn filtering, sorting, ratios and pivot tables in Excel, and creating heat maps in Fusion Tables. Now we’ll see how the same data set in Tableau helps people see trends in an interactive fashion.

If you haven’t done so already, the first step is to download the public version of Tableau. (Once you improve, you might want to graduate to the professional version).

Page 2: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

1) Download the 2011-2012 Ottawa crime data we’ll be using for this tutorial.

2) Once you download, the Tableau Public icon will appear on your

desktop.

Page 3: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

3) Select the “Open Data” tab

4) Select the Microscoft Excel open to obtain the Excel workbook

we’ve already downloaded in step one.

McKied
Oval
Page 4: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

5) 6) Select the OttawaCrime2011-2012 worksheet ( You can upload

Excel workbooks with multiple worksheets from which to choose. For the sake of simplicity, we’re using a workbook with one worksheet.)

7) What you get is an interface that resembles a pivot table.

McKied
Oval
McKied
Oval
McKied
Oval
McKied
Oval
Page 5: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

8) 9) For a good explanation of the “Measures” “Dimensions”

categories, this Tableau training video is a good place to start the instructional video, Tableau Public Training

McKied
Oval
McKied
Oval
Page 6: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

10) The Measures and Dimensions contain the fields in the Excel worksheet. The values (what we do the math on) are under Measures. The fields containing text are in Dimensions. Let’s move “Year” up to Dimensions, as we only want to group by year, not do any math with those values.

Page 7: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

11)

Page 8: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

12) Let’s create a table that groups the Offences and sums the offences. To do so, click and drag the offence numbers in the “Offence” field under Dimensions, and drop it into the blank table’s row label.

McKied
Oval
Page 9: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

13)

McKied
Oval
Page 10: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

14) You can see that Offences the row labels ( just like a pivot table). Now let’s drop the numbers into the column, which, because Tableau treats as a number will appear as such.

Page 11: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

15)

McKied
Oval
McKied
Oval
Page 12: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

16) You can see that the Actual field appears in the Marks section. This is where the math occurs, as well as the formatting, a task similar to Excel.

17) Before sorting them in descending order, let’s format the numbers as currency with zero decimal points.

Page 13: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

18)

McKied
Oval
Page 14: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

19) 20) Once you’ve made your “Number” selection with zero

decimal points, close the “Format SUM(Actual) box to the left of the table, make the table wider by placing your cursor on the table’s outer right-hand boundary until the cursor turns sideways, and then drag it to create more space.

21) Drag the “Year” from Tableau’s Dimensions section into the Columns section.

McKied
Oval
Page 15: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

22) 23) We can see that, just like in a pivot table, Tableau has

grouped the values by year. 24) This will do. Name the worksheet, Offences and go to a new

one. 25) In this one, we will repeat the same steps we used to get the

Offences table, but instead using the Offences value, we’ll use the Percapita value.

26) Your table should look like this.

McKied
Oval
McKied
Oval
Page 16: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

27) 28) Name this worksheet “Percapita”. 29) Now let’s repeat the same steps we to get a worksheet that

gives us the percapita counts of offences per ward in 2011 and 2012.

Page 17: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

30) 31) Rename this worksheet WardsPerCapita. 32) Now we have three tables we’ll join in the dashboard. 33) Right click on the adjacent tab and select the “New

Dashboard” option.

McKied
Oval
Page 18: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

34) The Dashboard is where we will link the Offences, Percapita and WardsPerCapita. You can see the icons for each table on the left-hand side.

35) 36) Drag the Offences worksheet into the adjacent space.

McKied
Oval
left-hand side. Drag the Offences worksheet into the adjacent space.
McKied
Oval
Page 19: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

37) 38) Drag the Percapita workbook just below the Offences table

and release the cursor.

McKied
Oval
Page 20: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

39) 40) Drag the WardsPerCapita table icon to the right of the

Offences table.

McKied
Oval
Page 21: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

41) 42) I have also widened the Offences and Percapita tables

manually in the dash board, using the cursor to drag and widen each table, a process explained in step 20.

McKied
Oval
Page 22: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

43) 44) Now I want to use the Offences table as a “Filter”, meaning

when I select a category it will return corresponding values in the other tables. To do this, click on the Offences table in the dashboard to activate it, which produce a thin grey bar at the top with a downward arrow on the eight-hand side. Click the arrow to produce a drop-down menu, and select the “Use as Filter” option.

McKied
Oval
Page 23: Tableau tutorial using the city of Ottawa 2011-2013 crime Datadavidmckie.com/Tableau tutorial with the city of Ottawa... · 2013-10-18 · Tableau, how they use them, the problems

45) 46) By choosing Theft $500 and Under, we can see the overall

per capita rates for each year, an in the third table the rates for that offence broken down by ward. You’ll also notice that I made the offences column in the Offences table a little wider by using the cursor to drag and click.

47) Rename the Dashboard.

McKied
Oval