creating a heat map in fusion tables - david mckiedavidmckie.com/bike-theft heat map...

21
Creating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion Tables to locate bike thefts and needle drop-off points in Ottawa. Let’s take that lesson one step further by identifying hot spots with the help of heat maps. For this tutorial, we’ll use a pivot table that groups the bike thefts by ward. 1) Download the csv file that contains bike thefts per ward 2) Upload file to Fusion Tables. 3) Because it’s a CSV (Comma Separated Value) file, be sure to check the comma as the Separator value radio button. 4) Continue with the import until the table is completed uploaded.

Upload: hoanganh

Post on 12-Mar-2018

221 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

Creating a heat map in Fusion Tables

In the first tutorial, we learned how use Fusion Tables to locate

bike thefts and needle drop-off points in Ottawa. Let’s take that

lesson one step further by identifying hot spots with the help of

heat maps. For this tutorial, we’ll use a pivot table that groups

the bike thefts by ward.

1) Download the csv file that contains bike thefts per ward

2) Upload file to Fusion Tables.

3) Because it’s a CSV (Comma Separated Value) file, be sure

to check the comma as the Separator value radio button.

4) Continue with the import until the table is completed

uploaded.

McKied
Oval
McKied
Oval
Page 2: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

5) 6) You’ll notice that we do not have a mapping option. That’s

because the table is missing geographic coordinates. Not

to worry. We’ll join the table to the Ward KML file we used

in the first tutorial. Because the KML file is already on your

Page 3: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

Google drive, there’s no need to upload it again. We will

simple merge KML file with the “BikeTheftsPerWard”

table.

7) Click on the “File” from your menu and select the “Merge”

option.

8) 9) The Merge option takes us back to the menu on our

Google Drive that contains your uploaded files.

10) Select the “CityWards2010” KML file.

11) Select the “Next” tab.

McKied
Oval
McKied
Oval
Page 4: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

12) Now we’ll identify the columns we’ll use to join the

two tables.

13) 14) As you can see from the screen shot, I’ve chosen the

Wards_Num (Ward Number) columns from both tables.

15) Select the “Next” tab.

McKied
Oval
McKied
Oval
McKied
Oval
Page 5: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

16) 17) We’ll import all the columns because we can always

de-select the ones we don’t want people to see on the

map’s pop-up boxes.

18) Select the “Merge” and the “View Table” tabs.

McKied
Oval
Page 6: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

19) 20) The two tables are merged. We can now see the map

by selecting the “Map of geometry” tab.

McKied
Oval
Page 7: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

21) 22) As was the case in the first tutorial, the ward outlines

are visible. However, the ward map is one colour. To

produce a heat map where the colours indicate the bike-

theft hotspots, we’ll have to do a bit more work.

23) Select the “Change map styles” option by clicking on

the “Map of geometry” tab.

Page 8: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

24)

McKied
Oval
Page 9: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

25) 26) Select the “Fill color” option under the “Polygons”

section in the menu to the left, and the “Buckets” category

to the right of the “Map marker icons” section.

Page 10: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

27) 28) To create the heat map, we’re going to divide the

bike thefts into ranges or “buckets”. It helps to refer to

your csv file (working with two screens makes this part go

much faster), and sort the “BikeTheftCount” column in

descending order.

McKied
Oval
McKied
Oval
Page 11: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

29) 30) Looking at the numbers, we can see that there are

three hot spots: areas that we want people to see clearly

on the map with the use of distinct colours. So when

creating the categories, or buckets, it might make sense to

choose one category that includes the lowest numbers,

say, 0-10; then a second category, 10-20; a third category,

20-41; a fourth of 41-58; and a fifth from 58 to 77. (Always

choose a number greater than the upper range in your

data set. Otherwise, Fusion Tables will leave that spot

McKied
Rectangle
Page 12: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

blank.) In essence, we’ve created five buckets, using the

“BikeTheftCount” field.

31) 32) However, Fusion tables has given us a range that it

thinks we want despite the fact we’ve chosen a range that

makes more sense based on our bike-theft numbers. So

we’ll have to key in the numbers manually.

McKied
Oval
McKied
Oval
Page 13: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

33) 34) The ranges are fine. The colours to the right, pasted

below, are not.

35) 36) We’ll have to replace these colours with varying

shades in the same colour scheme to produce what’s

called a heat map. We call it a heat map because the

colours represent the hotspots to which we want to draw

attention.

McKied
Oval
McKied
Oval
Page 14: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

37) To change the colours, select the arrow to the right of

the rectangle with the colour that corresponds to the

lowest number.

38) 39) You can choose whatever colour palette you wish.

Just make sure to increase the “Opacity” from 50% to

100% to produce sharper colours. For the wards with the

fewest bike thefts ( between 0 and 10 ), I’ve chosen the

lightest shade in my palette.

40) 41) For each successive category, chose a slightly darker

shade, making sure to increase the opacity to 100%. The

McKied
Oval
McKied
Oval
McKied
Oval
Page 15: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

three categories with the highest number of bike thefts

should be the darkest colours on the spectrum.

42) 43) Not bad. However, we’re not quite finished.

Intuitively, people will be able to locate the hot spots. A

legend makes the map easier to navigate. So let’s return to

the “Change map styles” section.

Page 16: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

44)

45) 46) Select the “Automatic legend” option.

McKied
Oval
McKied
Oval
Page 17: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

47) 48) Highlight the “Show polygon fill legend” option. Save

the result to return to the map.

McKied
Oval
McKied
Oval
Page 18: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

49) 50) If you’re happy with the result, share it. As we did in

the first tutorial, select the “Share” tab at the top right-

hand side.

McKied
Oval
Page 19: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

51) 52) Change the access to anyone with a link.

McKied
Oval
Page 20: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

53) 54) Select “Save” and “Done” tabs.

55) People can use the legend to identify the hotspots.

56) It might be an idea to clean up the window (refer to

the first tutorial, if you forget) to highlight the most

important details you want your audience to read.

McKied
Oval
McKied
Oval
Page 21: Creating a heat map in Fusion Tables - David McKiedavidmckie.com/Bike-theft heat map tutorial.pdfCreating a heat map in Fusion Tables In the first tutorial, we learned how use Fusion

57)