Skip to content

Instantly share code, notes, and snippets.

@Perishleaf
Created December 22, 2019 04:54
Show Gist options
  • Save Perishleaf/3f08a0d6b094656680e9ad12f8f5eda3 to your computer and use it in GitHub Desktop.
Save Perishleaf/3f08a0d6b094656680e9ad12f8f5eda3 to your computer and use it in GitHub Desktop.
# Suburbs order should be the same as "id" passed to location
for q in Types:
trace1.append(go.Choroplethmapbox(
geojson = Sydney_data,
locations = median_price_new['id'].tolist(),
z = median_price_new[q].tolist(),
colorscale = pl_deep,
text = suburbs,
colorbar = dict(thickness=20, ticklen=3),
marker_line_width=0, marker_opacity=0.7,
visible=False,
subplot='mapbox1',
hovertemplate = "<b>%{text}</b><br><br>" +
"Price: %{z}<br>" +
"<extra></extra>")) # "<extra></extra>" means we don't display the info in the secondary box, such as trace id.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment