Spaces:
Running
Running
Commit ·
6f7a661
1
Parent(s): fd1a344
reverse color scale
Browse files
app.py
CHANGED
|
@@ -116,12 +116,12 @@ def full_report():
|
|
| 116 |
title='Average Jumps per Daily Session',
|
| 117 |
template="plotly_dark")
|
| 118 |
|
| 119 |
-
country_df['rank'] = country_df['jumps'].rank(ascending=
|
| 120 |
total_map = px.choropleth(country_df, locations="iso",
|
| 121 |
color="rank",
|
| 122 |
hover_name="country", # column to add to hover information
|
| 123 |
hover_data=["jumps"],
|
| 124 |
-
color_continuous_scale ="
|
| 125 |
projection='natural earth',
|
| 126 |
template="plotly_dark")
|
| 127 |
# remove the legend
|
|
@@ -132,9 +132,9 @@ def full_report():
|
|
| 132 |
county_df['county'] = county_df['city'].map(city_county_map)
|
| 133 |
county_df['count_name'] = county_df['city'].map(city_county_name_map)
|
| 134 |
county_df = county_df.groupby(['county', 'count_name']).sum().reset_index()
|
| 135 |
-
county_df['rank'] = county_df['jumps'].rank(ascending=
|
| 136 |
county_map = px.choropleth(county_df, geojson=counties, locations='county', color='rank',
|
| 137 |
-
color_continuous_scale="
|
| 138 |
scope="usa",
|
| 139 |
hover_name="count_name",
|
| 140 |
hover_data=["jumps"],
|
|
|
|
| 116 |
title='Average Jumps per Daily Session',
|
| 117 |
template="plotly_dark")
|
| 118 |
|
| 119 |
+
country_df['rank'] = country_df['jumps'].rank(ascending=False)
|
| 120 |
total_map = px.choropleth(country_df, locations="iso",
|
| 121 |
color="rank",
|
| 122 |
hover_name="country", # column to add to hover information
|
| 123 |
hover_data=["jumps"],
|
| 124 |
+
color_continuous_scale ="YlOrRd_r",
|
| 125 |
projection='natural earth',
|
| 126 |
template="plotly_dark")
|
| 127 |
# remove the legend
|
|
|
|
| 132 |
county_df['county'] = county_df['city'].map(city_county_map)
|
| 133 |
county_df['count_name'] = county_df['city'].map(city_county_name_map)
|
| 134 |
county_df = county_df.groupby(['county', 'count_name']).sum().reset_index()
|
| 135 |
+
county_df['rank'] = county_df['jumps'].rank(ascending=False)
|
| 136 |
county_map = px.choropleth(county_df, geojson=counties, locations='county', color='rank',
|
| 137 |
+
color_continuous_scale="YlOrRd_r",
|
| 138 |
scope="usa",
|
| 139 |
hover_name="count_name",
|
| 140 |
hover_data=["jumps"],
|