Update app.py
Browse files
app.py
CHANGED
|
@@ -144,7 +144,7 @@ data['score'] = (data['score_sanitaire'] + data['score_foyer']) / 2
|
|
| 144 |
# In[6]:
|
| 145 |
|
| 146 |
|
| 147 |
-
|
| 148 |
|
| 149 |
|
| 150 |
# In[7]:
|
|
@@ -397,80 +397,3 @@ st.plotly_chart(fig)
|
|
| 397 |
|
| 398 |
|
| 399 |
#gdf_merged_q.to_csv('merged_q.csv', index=False)
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
# In[ ]:
|
| 403 |
-
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
# # Scores de propreté - par régions
|
| 409 |
-
|
| 410 |
-
# In[78]:
|
| 411 |
-
|
| 412 |
-
|
| 413 |
-
#id_regions
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
# In[79]:
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
regions_id = list(id_regions.keys())
|
| 420 |
-
scores = list()
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
# In[80]:
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
rm = {}
|
| 427 |
-
for q in regions_id:
|
| 428 |
-
print(q)
|
| 429 |
-
rm[q] = moyenne_par_communaute(data, q)
|
| 430 |
-
|
| 431 |
-
#rm
|
| 432 |
-
|
| 433 |
-
|
| 434 |
-
# In[81]:
|
| 435 |
-
|
| 436 |
-
|
| 437 |
-
regions = [id_regions[i] for i in regions_id]
|
| 438 |
-
scores = list(rm.values())
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
# In[82]:
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
region_df = pd.DataFrame({
|
| 445 |
-
'region_id': regions_id,
|
| 446 |
-
'region': regions,
|
| 447 |
-
'scores': scores
|
| 448 |
-
})
|
| 449 |
-
|
| 450 |
-
|
| 451 |
-
|
| 452 |
-
# In[ ]:
|
| 453 |
-
|
| 454 |
-
|
| 455 |
-
|
| 456 |
-
|
| 457 |
-
|
| 458 |
-
# # Score de responsabilité - par quartiers (Préfectures)
|
| 459 |
-
|
| 460 |
-
# In[93]:
|
| 461 |
-
|
| 462 |
-
|
| 463 |
-
qm = {}
|
| 464 |
-
for q in quartiers:
|
| 465 |
-
qm[q] = moyenne_par_quartier(data, quartier_id[q], scoring="score responsabilité")
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
# In[ ]:
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
# In[ ]:
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
| 476 |
-
|
|
|
|
| 144 |
# In[6]:
|
| 145 |
|
| 146 |
|
| 147 |
+
data['score responsabilité'] = data['score_sanitaire'] - data['score_foyer']
|
| 148 |
|
| 149 |
|
| 150 |
# In[7]:
|
|
|
|
| 397 |
|
| 398 |
|
| 399 |
#gdf_merged_q.to_csv('merged_q.csv', index=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|