Update app.py
Browse files
app.py
CHANGED
@@ -11,17 +11,18 @@ geojson_data = json.load(open(geojson_file_path, "r"))
|
|
11 |
# Read the GeoJSON file using geopandas
|
12 |
gdf = gpd.read_file(geojson_file_path)
|
13 |
|
14 |
-
|
15 |
|
16 |
-
fig = px.
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
)
|
25 |
-
fig.
|
|
|
26 |
|
27 |
st.plotly_chart(fig)
|
|
|
11 |
# Read the GeoJSON file using geopandas
|
12 |
gdf = gpd.read_file(geojson_file_path)
|
13 |
|
14 |
+
gdf_merged_q = pd.read_csv('merged_q.csv')
|
15 |
|
16 |
+
fig = px.choropleth_mapbox(gdf_merged_q,
|
17 |
+
geojson=geojson,
|
18 |
+
locations=gdf_merged_q.index,
|
19 |
+
color='scores',
|
20 |
+
mapbox_style="carto-positron",
|
21 |
+
title="Scores de Propreté Pour Les Préfectures Du Togo",
|
22 |
+
hover_name="adm2nm",
|
23 |
+
color_continuous_scale="Viridis"
|
24 |
+
)
|
25 |
+
fig.update_layout(margin={'r':0, 't':0, "l": 0, 'r': 0})
|
26 |
+
fig.show()
|
27 |
|
28 |
st.plotly_chart(fig)
|