menikev commited on
Commit
5ebc0a3
·
verified ·
1 Parent(s): 928cd59

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -63,7 +63,7 @@ color_palette = px.colors.sequential.Viridis
63
  # Visualisation for Domain Distribution
64
  def create_pie_chart(df, column, title):
65
  fig = px.pie(df, names=column, title=title, hole=0.35)
66
- fig.update_layout(margin=dict(l=6, r=6, t=12, b=6), legend=dict(x=0.1, y=1), font=dict(size=7)
67
  fig.update_traces(marker=dict(colors=color_palette))
68
  return fig
69
 
@@ -71,7 +71,7 @@ def create_pie_chart(df, column, title):
71
  def create_gender_ethnicity_distribution_chart(df):
72
  df['GenderOrEthnicity'] = df['Domain'].apply(lambda x: "Gender: Women & LGBTQIA+" if x in ["Women", "LGBTQIA+"] else "Ethnicity")
73
  fig = px.pie(df, names='GenderOrEthnicity', title='Distribution of Gender versus Ethnicity', hole=0.35)
74
- fig.update_layout(margin=dict(l=6, r=6, t=12, b=6), legend=dict(x=0.1, y=1), font=dict(size=7)
75
  return fig
76
 
77
  # Visualization for Sentiment Distribution Across Domains
 
63
  # Visualisation for Domain Distribution
64
  def create_pie_chart(df, column, title):
65
  fig = px.pie(df, names=column, title=title, hole=0.35)
66
+ fig.update_layout(margin=dict(l=6, r=6, t=12, b=6), legend=dict(x=0.1, y=1), font=dict(size=7))
67
  fig.update_traces(marker=dict(colors=color_palette))
68
  return fig
69
 
 
71
  def create_gender_ethnicity_distribution_chart(df):
72
  df['GenderOrEthnicity'] = df['Domain'].apply(lambda x: "Gender: Women & LGBTQIA+" if x in ["Women", "LGBTQIA+"] else "Ethnicity")
73
  fig = px.pie(df, names='GenderOrEthnicity', title='Distribution of Gender versus Ethnicity', hole=0.35)
74
+ fig.update_layout(margin=dict(l=6, r=6, t=12, b=6), legend=dict(x=0.1, y=1), font=dict(size=7))
75
  return fig
76
 
77
  # Visualization for Sentiment Distribution Across Domains