Commit
·
170ee55
1
Parent(s):
2d9bcb1
V3 16
Browse files- statistiques.py +5 -4
statistiques.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
import streamlit as st
|
| 3 |
import pandas as pd
|
| 4 |
import plotly.express as px
|
|
@@ -12,14 +12,12 @@ def display_companies_by_sector(df):
|
|
| 12 |
fig = px.bar(sector_counts, x='Secteur', y='Nombre',
|
| 13 |
color='Nombre', labels={'Nombre': ''}, template='plotly_white')
|
| 14 |
fig.update_layout(xaxis_tickangle=-45, showlegend=False)
|
| 15 |
-
# Assurez-vous que la légende est désactivée
|
| 16 |
fig.update_traces(showlegend=False)
|
| 17 |
st.plotly_chart(fig)
|
| 18 |
|
| 19 |
-
|
| 20 |
def display_company_sizes(df):
|
| 21 |
fig = px.histogram(df, x='tranche_effectif_entreprise',
|
| 22 |
-
labels={'tranche_effectif_entreprise':'Taille de l
|
| 23 |
fig.update_traces(marker_color='green')
|
| 24 |
fig.update_layout(yaxis_title="Nombre")
|
| 25 |
st.plotly_chart(fig)
|
|
@@ -53,6 +51,9 @@ def main():
|
|
| 53 |
df = pd.DataFrame(data)
|
| 54 |
|
| 55 |
if not df.empty:
|
|
|
|
|
|
|
|
|
|
| 56 |
st.header("Répartition des entreprises par secteur d'activité")
|
| 57 |
display_companies_by_sector(df)
|
| 58 |
st.header("Distribution des tailles d'entreprises")
|
|
|
|
| 1 |
+
|
| 2 |
import streamlit as st
|
| 3 |
import pandas as pd
|
| 4 |
import plotly.express as px
|
|
|
|
| 12 |
fig = px.bar(sector_counts, x='Secteur', y='Nombre',
|
| 13 |
color='Nombre', labels={'Nombre': ''}, template='plotly_white')
|
| 14 |
fig.update_layout(xaxis_tickangle=-45, showlegend=False)
|
|
|
|
| 15 |
fig.update_traces(showlegend=False)
|
| 16 |
st.plotly_chart(fig)
|
| 17 |
|
|
|
|
| 18 |
def display_company_sizes(df):
|
| 19 |
fig = px.histogram(df, x='tranche_effectif_entreprise',
|
| 20 |
+
labels={'tranche_effectif_entreprise':'Taille de l\\'entreprise', 'count':'Nombre'}, template='plotly_white')
|
| 21 |
fig.update_traces(marker_color='green')
|
| 22 |
fig.update_layout(yaxis_title="Nombre")
|
| 23 |
st.plotly_chart(fig)
|
|
|
|
| 51 |
df = pd.DataFrame(data)
|
| 52 |
|
| 53 |
if not df.empty:
|
| 54 |
+
st.markdown("## OPEN DATA RSE")
|
| 55 |
+
st.markdown("### Statistiques sur les entreprises engagées RSE")
|
| 56 |
+
|
| 57 |
st.header("Répartition des entreprises par secteur d'activité")
|
| 58 |
display_companies_by_sector(df)
|
| 59 |
st.header("Distribution des tailles d'entreprises")
|