Spaces:
Running
Running
Update ui/analytics_plot_generator.py
Browse files
ui/analytics_plot_generator.py
CHANGED
@@ -369,7 +369,7 @@ def update_analytics_plots_figures(token_state_value, date_filter_option, custom
|
|
369 |
"clicks_over_time": lambda: generate_generic_time_series_plot(filtered_merged_posts_df, 'published_at', 'clickCount', 'Clicks Over Time', 'Total Clicks', color='#6EE7B7'),
|
370 |
"shares_over_time": lambda: generate_generic_time_series_plot(filtered_merged_posts_df, 'published_at', 'shareCount', 'Shares Over Time', 'Total Shares', color='#34D399'),
|
371 |
"comments_over_time": lambda: generate_generic_time_series_plot(filtered_merged_posts_df, 'published_at', 'commentCount', 'Comments Over Time', 'Total Comments', color='#FACC15'),
|
372 |
-
"comments_sentiment": lambda: generate_generic_pie_chart(filtered_merged_posts_df['
|
373 |
|
374 |
# Analisi Strategia Contenuti
|
375 |
"post_frequency_cs": lambda: generate_generic_time_series_plot(filtered_merged_posts_df.resample('D', on='published_at').size().reset_index(name='count'), 'published_at', 'count', 'Post Frequency', 'Number of Posts', color='#C084FC'),
|
@@ -377,7 +377,7 @@ def update_analytics_plots_figures(token_state_value, date_filter_option, custom
|
|
377 |
"content_topic_breakdown_cs": lambda: generate_content_topic_breakdown_plot(filtered_merged_posts_df, topics_col=token_state_value.get("config_eb_labels_col", "li_eb_labels")),
|
378 |
|
379 |
# Analisi Menzioni (Dettaglio)
|
380 |
-
"mention_analysis_volume": lambda: generate_generic_time_series_plot(filtered_mentions_df, token_state_value.get("config_date_col_mentions", "date"), '
|
381 |
"mention_analysis_sentiment": lambda: generate_generic_pie_chart(filtered_mentions_df['sentiment_label'].value_counts().dropna(), "Mention Sentiment Breakdown")
|
382 |
}
|
383 |
|
|
|
369 |
"clicks_over_time": lambda: generate_generic_time_series_plot(filtered_merged_posts_df, 'published_at', 'clickCount', 'Clicks Over Time', 'Total Clicks', color='#6EE7B7'),
|
370 |
"shares_over_time": lambda: generate_generic_time_series_plot(filtered_merged_posts_df, 'published_at', 'shareCount', 'Shares Over Time', 'Total Shares', color='#34D399'),
|
371 |
"comments_over_time": lambda: generate_generic_time_series_plot(filtered_merged_posts_df, 'published_at', 'commentCount', 'Comments Over Time', 'Total Comments', color='#FACC15'),
|
372 |
+
"comments_sentiment": lambda: generate_generic_pie_chart(filtered_merged_posts_df['sentiment'].value_counts().dropna(), "Breakdown of Comments by Sentiment", 'coolwarm'),
|
373 |
|
374 |
# Analisi Strategia Contenuti
|
375 |
"post_frequency_cs": lambda: generate_generic_time_series_plot(filtered_merged_posts_df.resample('D', on='published_at').size().reset_index(name='count'), 'published_at', 'count', 'Post Frequency', 'Number of Posts', color='#C084FC'),
|
|
|
377 |
"content_topic_breakdown_cs": lambda: generate_content_topic_breakdown_plot(filtered_merged_posts_df, topics_col=token_state_value.get("config_eb_labels_col", "li_eb_labels")),
|
378 |
|
379 |
# Analisi Menzioni (Dettaglio)
|
380 |
+
"mention_analysis_volume": lambda: generate_generic_time_series_plot(filtered_mentions_df, token_state_value.get("config_date_col_mentions", "date"), '_id', 'Mentions Volume', 'Number of Mentions', color='#818CF8'),
|
381 |
"mention_analysis_sentiment": lambda: generate_generic_pie_chart(filtered_mentions_df['sentiment_label'].value_counts().dropna(), "Mention Sentiment Breakdown")
|
382 |
}
|
383 |
|