Fix the frontend API calls and implement logins on frontend #7
@@ -10,12 +10,6 @@ type FrequencyWord = {
|
||||
count: number;
|
||||
}
|
||||
|
||||
type AverageEmotionByTopic = {
|
||||
topic: string;
|
||||
n: number;
|
||||
[emotion: string]: string | number;
|
||||
}
|
||||
|
||||
type Vocab = {
|
||||
author: string;
|
||||
events: number;
|
||||
@@ -58,13 +52,25 @@ type HeatmapCell = {
|
||||
type TimeAnalysisResponse = {
|
||||
events_per_day: EventsPerDay[];
|
||||
weekday_hour_heatmap: HeatmapCell[];
|
||||
burstiness: number;
|
||||
}
|
||||
|
||||
// Content Analysis
|
||||
type NGram = {
|
||||
count: number;
|
||||
ngram: string;
|
||||
}
|
||||
|
||||
type AverageEmotionByTopic = {
|
||||
topic: string;
|
||||
n: number;
|
||||
[emotion: string]: string | number;
|
||||
}
|
||||
|
||||
type ContentAnalysisResponse = {
|
||||
word_frequencies: FrequencyWord[];
|
||||
average_emotion_by_topic: AverageEmotionByTopic[];
|
||||
common_three_phrases: NGram[];
|
||||
common_two_phrases: NGram[];
|
||||
}
|
||||
|
||||
// Summary
|
||||
|
||||
@@ -108,9 +108,7 @@ class StatGen:
|
||||
return {
|
||||
"top_users": self.interaction_analysis.top_users(filtered_df),
|
||||
"users": self.interaction_analysis.per_user_analysis(filtered_df),
|
||||
"interaction_graph": self.interaction_analysis.interaction_graph(
|
||||
filtered_df
|
||||
),
|
||||
"interaction_graph": self.interaction_analysis.interaction_graph(filtered_df)
|
||||
}
|
||||
|
||||
def get_interactional_analysis(self, df: pd.DataFrame, filters: dict | None = None) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user