Spaces:
Runtime error
Runtime error
LaurentTRIPIED
commited on
Commit
·
a4e86cd
1
Parent(s):
900731b
V2-Liste_MAP_Stat_20
Browse files- statistiques.py +4 -3
statistiques.py
CHANGED
@@ -11,13 +11,14 @@ def display_companies_by_sector(df):
|
|
11 |
sector_counts.columns = ['Secteur', 'Nombre']
|
12 |
fig = px.bar(sector_counts, x='Secteur', y='Nombre',
|
13 |
color='Nombre', labels={'Nombre':'Nombre d\'entreprises'}, template='plotly_white')
|
14 |
-
fig.update_layout(xaxis_tickangle=-45)
|
15 |
st.plotly_chart(fig)
|
16 |
|
17 |
def display_company_sizes(df):
|
18 |
fig = px.histogram(df, x='tranche_effectif_entreprise',
|
19 |
-
labels={'tranche_effectif_entreprise':'Taille de l\'entreprise'}, template='plotly_white')
|
20 |
fig.update_traces(marker_color='green')
|
|
|
21 |
st.plotly_chart(fig)
|
22 |
|
23 |
def display_companies_by_commune(df):
|
@@ -31,7 +32,7 @@ def display_companies_by_commune(df):
|
|
31 |
def display_rse_actions_wordcloud(df):
|
32 |
st.header("Nuage de mots Actions RSE")
|
33 |
|
34 |
-
custom_stopwords = set(["d ", "des", "qui", "ainsi", "toute", "hors", "plus", "cette", "afin", "via", "d'", "sa", "dans", "ont", "avec", "aux", "ce", "chez", "ont", "cela", "la", "un", "avons", "par", "c'est", "s'est", "aussi", "leurs", "d'un", "nos", "les", "sur", "ses", "tous", "nous", "du", "notre", "de", "et", "est", "pour", "le", "une", "se", "en", "au", "à", "que", "sont", "leur", "son"])
|
35 |
stopwords = STOPWORDS.union(custom_stopwords)
|
36 |
|
37 |
text = " ".join(action for action in df['action_rse'].dropna())
|
|
|
11 |
sector_counts.columns = ['Secteur', 'Nombre']
|
12 |
fig = px.bar(sector_counts, x='Secteur', y='Nombre',
|
13 |
color='Nombre', labels={'Nombre':'Nombre d\'entreprises'}, template='plotly_white')
|
14 |
+
fig.update_layout(xaxis_tickangle=-45, showlegend=False)
|
15 |
st.plotly_chart(fig)
|
16 |
|
17 |
def display_company_sizes(df):
|
18 |
fig = px.histogram(df, x='tranche_effectif_entreprise',
|
19 |
+
labels={'tranche_effectif_entreprise':'Taille de l\'entreprise', 'count':'Nombre'}, template='plotly_white')
|
20 |
fig.update_traces(marker_color='green')
|
21 |
+
fig.update_layout(yaxis_title="Nombre")
|
22 |
st.plotly_chart(fig)
|
23 |
|
24 |
def display_companies_by_commune(df):
|
|
|
32 |
def display_rse_actions_wordcloud(df):
|
33 |
st.header("Nuage de mots Actions RSE")
|
34 |
|
35 |
+
custom_stopwords = set(["l", "d", "d ", "des", "qui", "ainsi", "toute", "hors", "plus", "cette", "afin", "via", "d'", "sa", "dans", "ont", "avec", "aux", "ce", "chez", "ont", "cela", "la", "un", "avons", "par", "c'est", "s'est", "aussi", "leurs", "d'un", "nos", "les", "sur", "ses", "tous", "nous", "du", "notre", "de", "et", "est", "pour", "le", "une", "se", "en", "au", "à", "que", "sont", "leur", "son"])
|
36 |
stopwords = STOPWORDS.union(custom_stopwords)
|
37 |
|
38 |
text = " ".join(action for action in df['action_rse'].dropna())
|