There are thousands of cherry trees in Vancouver. The first cherry trees were donated by the mayors of Kobe and Yokohama in the early 1930s. They were meant to be planted at the Japanese cenotaph in Stanley Park, which honours Japanese Canadians who served in World War I.
This exploratory data analysis (EDA) focuses on street trees and aims at answering the following questions:
How many street cherry trees are there in Vancouver?
What are the most common and uncommon street cherry trees?
Where are they located?
The EDA uses the street tree dataset. The City of Vancouver Open Data Portal maintains said dataset, which presents information on public trees. The inventory does not include park or private trees.
A copy of the dataset was downloaded on 8 April 2022 as a csv file containing the following columns:
TREE_ID
: numerical identification of treeCIVIC_NUMBER
: street address of the site at which the tree is associated withSTD_STREET
: street name of the site at which the tree is associated withGENUS_NAME
SPECIES_NAME
CULTIVAR_NAME
COMMON_NAME
ASSIGNED
: indicates whether the address is made up to associate the tree with a nearby lot ROOT_BARRIER
PLANT_AREA
: B = behind sidewalk, G = in tree grate, N = no sidewalk, C = cutout, a number indicates boulevard width in feetON_STREET_BLOCK
: the street block at which the tree is physically located onON_STREET:
the name of the street at which the tree is physically located onNEIGHBOURHOOD_NAME
: city's defined local area in which the tree is locatedSTREET_SIDE_NAME
: the street side which the tree is physically located on (even, odd or median)HEIGHT_RANGE_ID
: 0-10 for every 10 feet (e.g., 0 = 0-10 ft, 1 = 10-20 ft, 2 = 20-30 ft, and10 = 100+ ft)DIAMETER
: diameter of tree at breast height in inchesCURB
: curb presence DATE_PLANTED
: the date of planting in YYYYMMDD formatGEOM
: coordinates of the tree# Import libraries
import pandas as pd
import numpy as np
import plotly.express as px
import plotly.io as pio
import folium
from folium.plugins import MarkerCluster
pio.renderers.default = 'plotly_mimetype+notebook'
# Load data downloaded from the City of Vancouver Open Data Portal into the trees DataFrame
trees = pd.read_csv('./street-trees.csv', sep=';')
# Summary of the trees DataFrame
trees.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 151420 entries, 0 to 151419 Data columns (total 19 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 TREE_ID 151420 non-null int64 1 CIVIC_NUMBER 151420 non-null int64 2 STD_STREET 151420 non-null object 3 GENUS_NAME 151420 non-null object 4 SPECIES_NAME 151420 non-null object 5 CULTIVAR_NAME 80474 non-null object 6 COMMON_NAME 151420 non-null object 7 ASSIGNED 151420 non-null object 8 ROOT_BARRIER 151420 non-null object 9 PLANT_AREA 149896 non-null object 10 ON_STREET_BLOCK 151420 non-null int64 11 ON_STREET 151420 non-null object 12 NEIGHBOURHOOD_NAME 151420 non-null object 13 STREET_SIDE_NAME 151420 non-null object 14 HEIGHT_RANGE_ID 151420 non-null int64 15 DIAMETER 151420 non-null float64 16 CURB 151420 non-null object 17 DATE_PLANTED 68486 non-null object 18 Geom 129891 non-null object dtypes: float64(1), int64(4), object(14) memory usage: 21.9+ MB
The trees DataFrame has 151,420 rows and 19 columns. Geom
is not null for 129,891 rows (85.8%), which means coordinates are not available for all trees.
# Number of unique trees
trees['TREE_ID'].unique().shape[0]
151420
There are no duplicated tress in the DataFrame, i.e., the dataset contains information on 151,420 street trees.
# Remove columns that will not be used in the analysis
columns_to_be_removed = ['CIVIC_NUMBER', 'STD_STREET', 'GENUS_NAME', 'SPECIES_NAME', 'CULTIVAR_NAME',
'ASSIGNED', 'ROOT_BARRIER', 'PLANT_AREA', 'ON_STREET_BLOCK', 'ON_STREET',
'STREET_SIDE_NAME', 'HEIGHT_RANGE_ID', 'DIAMETER', 'CURB', 'DATE_PLANTED']
trees = trees.drop(columns_to_be_removed, axis = 1)
trees.head(5)
TREE_ID | COMMON_NAME | NEIGHBOURHOOD_NAME | Geom | |
---|---|---|---|---|
0 | 22 | EUROPEAN HORNBEAM | GRANDVIEW-WOODLAND | {"coordinates": [-123.076828, 49.269726], "typ... |
1 | 24 | EUROPEAN HORNBEAM | GRANDVIEW-WOODLAND | {"coordinates": [-123.07665, 49.269724], "type... |
2 | 26 | EUROPEAN HORNBEAM | GRANDVIEW-WOODLAND | {"coordinates": [-123.076336, 49.269722], "typ... |
3 | 31 | PYRAMIDAL EUROPEAN HORNBEAM | GRANDVIEW-WOODLAND | {"coordinates": [-123.075913, 49.269586], "typ... |
4 | 35 | PYRAMIDAL EUROPEAN HORNBEAM | GRANDVIEW-WOODLAND | {"coordinates": [-123.075064, 49.269579], "typ... |
# Rename columns
trees.rename(columns = {'TREE_ID': 'tree ID', 'COMMON_NAME': 'common name',
'NEIGHBOURHOOD_NAME': 'neighbourhood',
'Geom': 'geom'}, inplace = True)
trees
tree ID | common name | neighbourhood | geom | |
---|---|---|---|---|
0 | 22 | EUROPEAN HORNBEAM | GRANDVIEW-WOODLAND | {"coordinates": [-123.076828, 49.269726], "typ... |
1 | 24 | EUROPEAN HORNBEAM | GRANDVIEW-WOODLAND | {"coordinates": [-123.07665, 49.269724], "type... |
2 | 26 | EUROPEAN HORNBEAM | GRANDVIEW-WOODLAND | {"coordinates": [-123.076336, 49.269722], "typ... |
3 | 31 | PYRAMIDAL EUROPEAN HORNBEAM | GRANDVIEW-WOODLAND | {"coordinates": [-123.075913, 49.269586], "typ... |
4 | 35 | PYRAMIDAL EUROPEAN HORNBEAM | GRANDVIEW-WOODLAND | {"coordinates": [-123.075064, 49.269579], "typ... |
... | ... | ... | ... | ... |
151415 | 275572 | PISSARD PLUM | KENSINGTON-CEDAR COTTAGE | {"coordinates": [-123.085267, 49.240811], "typ... |
151416 | 275575 | TATARIAN MAPLE | KENSINGTON-CEDAR COTTAGE | {"coordinates": [-123.085052, 49.240464], "typ... |
151417 | 275577 | TATARIAN MAPLE | KENSINGTON-CEDAR COTTAGE | {"coordinates": [-123.084977, 49.240653], "typ... |
151418 | 275579 | GINKGO OR MAIDENHAIR TREE | KENSINGTON-CEDAR COTTAGE | {"coordinates": [-123.084558, 49.240757], "typ... |
151419 | 275581 | WEEPING WILLOW | KENSINGTON-CEDAR COTTAGE | {"coordinates": [-123.084299, 49.240768], "typ... |
151420 rows × 4 columns
# Capitalize only the first letter of each word under common name and neighbourhood columns
columns_to_be_modified = ['common name', 'neighbourhood']
for column in columns_to_be_modified:
trees[column] = trees[column].str.title()
trees.head(5)
tree ID | common name | neighbourhood | geom | |
---|---|---|---|---|
0 | 22 | European Hornbeam | Grandview-Woodland | {"coordinates": [-123.076828, 49.269726], "typ... |
1 | 24 | European Hornbeam | Grandview-Woodland | {"coordinates": [-123.07665, 49.269724], "type... |
2 | 26 | European Hornbeam | Grandview-Woodland | {"coordinates": [-123.076336, 49.269722], "typ... |
3 | 31 | Pyramidal European Hornbeam | Grandview-Woodland | {"coordinates": [-123.075913, 49.269586], "typ... |
4 | 35 | Pyramidal European Hornbeam | Grandview-Woodland | {"coordinates": [-123.075064, 49.269579], "typ... |
# Create a DataFrame containing only trees whose common names contain the string cherry
cherry_trees = trees[trees['common name'].str.contains('cherry', case = False)]
cherry_trees.shape[0]
18200
This approach may leave out cherry trees whose common names do not contain the string cherry.
# Cherry tree unique names
cherry_trees['common name'].unique()
array(['Kwanzan Flowering Cherry', 'Shirotae(Mt Fuji) Cherry', 'Sargent Flowering Cherry', 'Rancho Sargent Cherry', 'Shirofugen Cherry', 'Ukon Japanese Cherry', 'Akebono Flowering Cherry', 'Mazzard Cherry', 'Wild Cherry', 'Japanese Flowering Cherry', 'Seiboldi Cherry', 'Schubert Chokecherry', 'Accolade Cherry', 'Whitcomb Cherry', 'Pink Perfection Cherry', 'Amanogawa Japanese Cherry', 'Paperbark Cherry', 'Cherry, Plum Or Peach Species', 'Miyako Cherry', 'Weeping Japanese Cherry', 'Columnar Sargent Cherry', 'Yoshino Cherry', 'Black Cherry', 'European Birdcherry', 'Autumn Higan Cherry', 'Higan Cherry', 'Hillier Spire Cherry', 'Weeping Higan Cherry', 'Commom Chokecherry', 'Pin Cherry', 'Bailey Select Chokecherry', 'Snow Goose Cherry', 'Cornelian Cherry', 'Manchurian Cherry', 'Cheals Weeping Cherry', 'Great White Cherry', 'Sweetheart Cherry', 'Mikuruma-Gaeshi Cherry', 'Shogetsu Japanese Cherry', 'Bitter Cherry'], dtype=object)
Cherry, Plum Or Peach Species may not refer to cherry trees. Therefore, all the rows whose common name
column is Cherry, Plum Or Peach Species will be removed.
cherry_trees = cherry_trees[~cherry_trees['common name'].str.contains('Cherry, Plum Or Peach Species')]
cherry_trees.info()
<class 'pandas.core.frame.DataFrame'> Int64Index: 17982 entries, 13 to 151311 Data columns (total 4 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 tree ID 17982 non-null int64 1 common name 17982 non-null object 2 neighbourhood 17982 non-null object 3 geom 15992 non-null object dtypes: int64(1), object(3) memory usage: 702.4+ KB
There are 17,982 street cherry trees in the dataset, i.e., these trees account for approximately 11.9% of the records. Coordinates are available for about 88.9% of the cherry trees.
# Types of cherry trees
cherry_trees['common name'].nunique()
39
There are 39 types of cherry trees in Vancouver.
# Cherry trees per type
type_count = cherry_trees['common name'].value_counts(ascending = False).rename_axis('name'
).reset_index(name = 'count')
type_percentage = cherry_trees['common name'].value_counts(ascending = False, normalize = True).mul(
100).round(2).rename_axis('name').reset_index(name = 'trees (%)')
types_of_cherry_trees = type_count.merge(type_percentage, on = 'name', how = 'inner')
types_of_cherry_trees
name | count | trees (%) | |
---|---|---|---|
0 | Kwanzan Flowering Cherry | 10375 | 57.70 |
1 | Akebono Flowering Cherry | 2418 | 13.45 |
2 | Ukon Japanese Cherry | 770 | 4.28 |
3 | Japanese Flowering Cherry | 634 | 3.53 |
4 | Mazzard Cherry | 568 | 3.16 |
5 | Pink Perfection Cherry | 514 | 2.86 |
6 | Rancho Sargent Cherry | 500 | 2.78 |
7 | Shirofugen Cherry | 390 | 2.17 |
8 | Shirotae(Mt Fuji) Cherry | 224 | 1.25 |
9 | Schubert Chokecherry | 213 | 1.18 |
10 | Sargent Flowering Cherry | 173 | 0.96 |
11 | Seiboldi Cherry | 160 | 0.89 |
12 | Higan Cherry | 105 | 0.58 |
13 | Yoshino Cherry | 100 | 0.56 |
14 | Autumn Higan Cherry | 82 | 0.46 |
15 | Wild Cherry | 74 | 0.41 |
16 | Whitcomb Cherry | 66 | 0.37 |
17 | Amanogawa Japanese Cherry | 65 | 0.36 |
18 | Bailey Select Chokecherry | 65 | 0.36 |
19 | Commom Chokecherry | 64 | 0.36 |
20 | Weeping Japanese Cherry | 60 | 0.33 |
21 | Accolade Cherry | 55 | 0.31 |
22 | Pin Cherry | 41 | 0.23 |
23 | European Birdcherry | 39 | 0.22 |
24 | Hillier Spire Cherry | 37 | 0.21 |
25 | Black Cherry | 37 | 0.21 |
26 | Snow Goose Cherry | 33 | 0.18 |
27 | Columnar Sargent Cherry | 28 | 0.16 |
28 | Cornelian Cherry | 26 | 0.14 |
29 | Paperbark Cherry | 22 | 0.12 |
30 | Manchurian Cherry | 15 | 0.08 |
31 | Great White Cherry | 10 | 0.06 |
32 | Cheals Weeping Cherry | 5 | 0.03 |
33 | Sweetheart Cherry | 5 | 0.03 |
34 | Weeping Higan Cherry | 3 | 0.02 |
35 | Mikuruma-Gaeshi Cherry | 2 | 0.01 |
36 | Miyako Cherry | 2 | 0.01 |
37 | Bitter Cherry | 1 | 0.01 |
38 | Shogetsu Japanese Cherry | 1 | 0.01 |
# Street cherry trees in Vancouver
fig = px.bar(types_of_cherry_trees.loc[::-1], x = 'trees (%)', y = 'name',
title = """Kwanzan Flowering and Akebono Flowering cherries account for over 70% of the street cherry trees
<br><sup>Street cherry trees in Vancouver (%)<sup>""",
orientation = 'h', height = 900)
fig.update_traces(marker_color = '#1f9e89')
fig.update_layout({
'plot_bgcolor': '#ffffff',
'paper_bgcolor': '#ffffff',
})
fig.update_xaxes(showgrid = True, gridwidth = 1, gridcolor = '#e0e0e0')
fig.show()
Kwanzan Flowering, Akebono Flowering, Ukon Japanese, Japanese Flowering, Mazzard and Pink Perfection cherries are the most common street cherry trees in Vancouver. Kwanzan Flowering and Akebono Flowering cherries account for approximately 57.7% and 13.5% of the cherry trees, respectively.
Weeping Higan, Miyako, Mikuruma-Gaeshi, Bitter and Shogetsu Japanese cherries are the most uncommon cherry trees.
# Street cherry trees per neighbourhood
neighbourhood_count = cherry_trees['neighbourhood'].value_counts(ascending = False).rename_axis('neighbourhood'
).reset_index(name = 'trees')
neighbourhood_percentage = cherry_trees['neighbourhood'].value_counts(ascending = False, normalize = True).mul(
100).round(2).rename_axis('neighbourhood').reset_index(name = 'percentage')
cherry_trees_per_neighbourhood = neighbourhood_count.merge(neighbourhood_percentage,
on = 'neighbourhood', how = 'inner')
cherry_trees_per_neighbourhood
neighbourhood | trees | percentage | |
---|---|---|---|
0 | Renfrew-Collingwood | 1489 | 8.28 |
1 | Dunbar-Southlands | 1453 | 8.08 |
2 | Kensington-Cedar Cottage | 1300 | 7.23 |
3 | Sunset | 1146 | 6.37 |
4 | Marpole | 1093 | 6.08 |
5 | Mount Pleasant | 1090 | 6.06 |
6 | Victoria-Fraserview | 1014 | 5.64 |
7 | Riley Park | 1009 | 5.61 |
8 | Grandview-Woodland | 923 | 5.13 |
9 | Kerrisdale | 905 | 5.03 |
10 | Oakridge | 829 | 4.61 |
11 | Hastings-Sunrise | 829 | 4.61 |
12 | Kitsilano | 741 | 4.12 |
13 | Arbutus-Ridge | 593 | 3.30 |
14 | Shaughnessy | 586 | 3.26 |
15 | Killarney | 584 | 3.25 |
16 | West Point Grey | 561 | 3.12 |
17 | Fairview | 495 | 2.75 |
18 | South Cambie | 472 | 2.62 |
19 | West End | 449 | 2.50 |
20 | Strathcona | 251 | 1.40 |
21 | Downtown | 170 | 0.95 |
# Street cherry trees in Vancouver's neighbourhoods
fig = px.bar(cherry_trees_per_neighbourhood.loc[::-1], x = 'trees', y = 'neighbourhood',
title = """There are 1,400+ street cherry trees in two neighbourhoods: Renfrew-Collingwood and Dunbar-Southlands
<br><sup>Street cherry trees per neighbourhood<sup>""",
orientation = 'h', height = 750)
fig.update_traces(marker_color = '#1f9e89')
fig.update_layout({
'plot_bgcolor': '#ffffff',
'paper_bgcolor': '#ffffff',
})
fig.update_xaxes(showgrid = True, gridwidth = 1, gridcolor = '#e0e0e0')
fig.show()
There are at least one thousand street cherry trees in Renfrew-Collingwood, Dunbar-Southlands, Kensington-Cedar Cottage, Sunset, Marpole, Mount Pleasant, Victoria-Fraserview and Riley Park neighbourhoods.
The most sparsely-foliated neighbourhoods with regard to street cherry trees are Fairview, South Cambie, West End, Strathcona and Downtown.
name_neighbourhood_crosstab = pd.crosstab(cherry_trees['common name'],
cherry_trees['neighbourhood'], normalize = 'columns')
# Distribution of cherry tree types across Vancouver's neighbourhoods
fig = px.imshow(name_neighbourhood_crosstab * 100,
labels = dict(color = 'trees in neighbourhood (%)'),
x = name_neighbourhood_crosstab.columns,
y = name_neighbourhood_crosstab.index,
title = """The Kwanzan Flowering cherry is the prevalent street cherry tree in all neighbourhoods
<br><sup>Distribution of different cherry tree types across Vancouver's neighbourhoods<sup>""",
height = 1000,
aspect = 'auto',
color_continuous_scale = 'viridis')
fig.show()
The Akebono Flowering cherry is the second most common street cherry tree in all neighbourhoods with the exception of Downtown, Fairview, Grandview-Woodland, Killarney, Mount Pleasant, Oakridge, Strathcona and West End. In these neighbourhoods, the second most prevalent street cherry trees are:
Cherry tree coordinates are available for approximately 88.9% of the records. These coordinates can be used to build maps that provide different vantage points to explore the dataset.
Maps will be generated using Folium, a Python library for geospatial data visualization.
# Create DataFrame containing only rows for which coordinates are available
cherry_trees_with_coordinates = cherry_trees.dropna(subset = ['geom']).copy(deep = True)
# Extract coordinates from the geom column and store them into lat and lon columns
cherry_trees_with_coordinates[['lon', 'lat']] = cherry_trees_with_coordinates['geom'].apply(
lambda st: st[st.find('[') + 1:st.find(']')]).str.split(',', expand = True)
cherry_trees_with_coordinates
tree ID | common name | neighbourhood | geom | lon | lat | |
---|---|---|---|---|---|---|
13 | 59 | Kwanzan Flowering Cherry | Grandview-Woodland | {"coordinates": [-123.071482, 49.270015], "typ... | -123.071482 | 49.270015 |
14 | 60 | Kwanzan Flowering Cherry | Grandview-Woodland | {"coordinates": [-123.071486, 49.269908], "typ... | -123.071486 | 49.269908 |
32 | 134 | Kwanzan Flowering Cherry | Grandview-Woodland | {"coordinates": [-123.06389, 49.269711], "type... | -123.06389 | 49.269711 |
39 | 187 | Shirotae(Mt Fuji) Cherry | Grandview-Woodland | {"coordinates": [-123.05987, 49.269887], "type... | -123.05987 | 49.269887 |
40 | 188 | Shirotae(Mt Fuji) Cherry | Grandview-Woodland | {"coordinates": [-123.059869, 49.269773], "typ... | -123.059869 | 49.269773 |
... | ... | ... | ... | ... | ... | ... |
151307 | 274866 | Kwanzan Flowering Cherry | Dunbar-Southlands | {"coordinates": [-123.175003, 49.245205], "typ... | -123.175003 | 49.245205 |
151308 | 274867 | Japanese Flowering Cherry | Dunbar-Southlands | {"coordinates": [-123.175103, 49.245188], "typ... | -123.175103 | 49.245188 |
151309 | 274875 | Japanese Flowering Cherry | Dunbar-Southlands | {"coordinates": [-123.175086, 49.245012], "typ... | -123.175086 | 49.245012 |
151310 | 274877 | Japanese Flowering Cherry | Dunbar-Southlands | {"coordinates": [-123.175221, 49.244922], "typ... | -123.175221 | 49.244922 |
151311 | 274885 | Kwanzan Flowering Cherry | Kerrisdale | {"coordinates": [-123.16681, 49.23383], "type"... | -123.16681 | 49.23383 |
15992 rows × 6 columns
# Convert lon and lat columns of the cherry_trees_with_coordinates DataFrame to numeric
columns = ['lon', 'lat']
cherry_trees_with_coordinates[columns] = cherry_trees_with_coordinates[columns].apply(
pd.to_numeric, errors = 'raise', axis = 1)
cherry_trees_with_coordinates.info()
<class 'pandas.core.frame.DataFrame'> Int64Index: 15992 entries, 13 to 151311 Data columns (total 6 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 tree ID 15992 non-null int64 1 common name 15992 non-null object 2 neighbourhood 15992 non-null object 3 geom 15992 non-null object 4 lon 15992 non-null float64 5 lat 15992 non-null float64 dtypes: float64(2), int64(1), object(3) memory usage: 874.6+ KB
Displaying one marker for each of the 15,992 cherry trees would clutter the Vancouver map and potentially hinder data exploration.
Clustered point maps combine markers that are close to each other into clusters. The number on a cluster shows how many markers it has. As the user zooms in, the number of cluster decreases and individual markers begin to appear.
# Create list of coordinates that will be used in the clustered point map
cluster_data = [[row['lat'], row['lon']] for index, row in cherry_trees_with_coordinates.iterrows()]
# Create clustered point map using cherry tree coordinates
cherry_tree_map = folium.Map([49.24, -123.11],
tiles = 'OpenStreetMap', zoom_start = 12, control_scale = True)
MarkerCluster(cluster_data).add_to(cherry_tree_map)
cherry_tree_map
# Uncommon cherry trees (5 trees or fewer)
uncommon = cherry_trees_with_coordinates['common name'].value_counts().loc[lambda x : x <= 5].reset_index()
uncommon.columns = ['name', 'count']
uncommon
name | count | |
---|---|---|
0 | Sweetheart Cherry | 5 |
1 | Mikuruma-Gaeshi Cherry | 2 |
2 | Weeping Higan Cherry | 2 |
3 | Miyako Cherry | 2 |
4 | Shogetsu Japanese Cherry | 1 |
As there are only 12 trees, it is possible to represent them as markers on a map without compromising the user experience. Hovering over each marker causes a tooltip contaning the name of the tree to appear.
# Create a subset of the cherry_trees_with_coordinates DataFrame containing only the uncommon cherry trees
uncommon_cherry_trees_list = uncommon['name'].tolist()
uncommon_cherry_trees = cherry_trees_with_coordinates.loc[cherry_trees_with_coordinates['common name'].isin(
uncommon_cherry_trees_list)]
uncommon_cherry_trees
tree ID | common name | neighbourhood | geom | lon | lat | |
---|---|---|---|---|---|---|
2683 | 29153 | Miyako Cherry | Kensington-Cedar Cottage | {"coordinates": [-123.077354, 49.244628], "typ... | -123.077354 | 49.244628 |
6589 | 36276 | Weeping Higan Cherry | Shaughnessy | {"coordinates": [-123.130806, 49.236875], "typ... | -123.130806 | 49.236875 |
59220 | 245324 | Sweetheart Cherry | Grandview-Woodland | {"coordinates": [-123.064839, 49.276675], "typ... | -123.064839 | 49.276675 |
59252 | 245452 | Sweetheart Cherry | Grandview-Woodland | {"coordinates": [-123.064836, 49.276578], "typ... | -123.064836 | 49.276578 |
72963 | 58832 | Mikuruma-Gaeshi Cherry | West End | {"coordinates": [-123.135502, 49.288665], "typ... | -123.135502 | 49.288665 |
78604 | 28078 | Sweetheart Cherry | Grandview-Woodland | {"coordinates": [-123.064953, 49.276578], "typ... | -123.064953 | 49.276578 |
80759 | 31142 | Sweetheart Cherry | Grandview-Woodland | {"coordinates": [-123.064571, 49.276575], "typ... | -123.064571 | 49.276575 |
118000 | 58820 | Mikuruma-Gaeshi Cherry | West End | {"coordinates": [-123.134916, 49.288292], "typ... | -123.134916 | 49.288292 |
122295 | 114383 | Miyako Cherry | Arbutus-Ridge | {"coordinates": [-123.165891, 49.236758], "typ... | -123.165891 | 49.236758 |
129138 | 142824 | Shogetsu Japanese Cherry | Dunbar-Southlands | {"coordinates": [-123.19164, 49.25012], "type"... | -123.191640 | 49.250120 |
129237 | 143613 | Weeping Higan Cherry | Oakridge | {"coordinates": [-123.133285, 49.224239], "typ... | -123.133285 | 49.224239 |
146337 | 245451 | Sweetheart Cherry | Grandview-Woodland | {"coordinates": [-123.064732, 49.276672], "typ... | -123.064732 | 49.276672 |
# Create map showing locations of the uncommon cherry trees
uncommon_cherry_tree_map = folium.Map([49.24, -123.11], tiles = 'OpenStreetMap',
zoom_start = 12, control_scale = True)
for i in range(0, len(uncommon_cherry_trees)):
folium.Marker(
location = [uncommon_cherry_trees.iloc[i]['lat'], uncommon_cherry_trees.iloc[i]['lon']],
icon = folium.Icon(color = 'green', icon = 'tree', prefix = 'fa'),
tooltip = uncommon_cherry_trees.iloc[i]['common name'],
).add_to(uncommon_cherry_tree_map)
uncommon_cherry_tree_map