Fix the frontend API calls and implement logins on frontend #7

Merged
dylan merged 24 commits from feat/update-frontend-api-calls into main 2026-03-04 20:20:50 +00:00
2 changed files with 14 additions and 10 deletions
Showing only changes of commit e2ac4495fd - Show all commits

View File

@@ -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

View File

@@ -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: