mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-28 00:47:03 -05:00
Integrate Data Completeness Dashboard
Adds comprehensive data completeness dashboard UI and hooks: - Introduces data completeness types and hook (useDataCompleteness) to fetch and subscribe to updates - Builds dashboard components (summary, filters, table) and integrates into Admin Settings - Wireframes for real-time updates and filtering across parks, rides, companies, and ride models - Integrates into AdminSettings with a new Data Quality tab and route - Adds data types and scaffolding for analytics, including completeness analysis structure
This commit is contained in:
58
src/types/data-completeness.ts
Normal file
58
src/types/data-completeness.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* Data Completeness Types
|
||||
*
|
||||
* TypeScript interfaces for the comprehensive data completeness analysis system
|
||||
*/
|
||||
|
||||
export type EntityType = 'park' | 'ride' | 'company' | 'ride_model';
|
||||
|
||||
export type MissingFieldCategory = 'critical' | 'important' | 'valuable' | 'supplementary';
|
||||
|
||||
export interface MissingFields {
|
||||
critical: string[];
|
||||
important: string[];
|
||||
valuable: string[];
|
||||
supplementary: string[];
|
||||
}
|
||||
|
||||
export interface EntityCompleteness {
|
||||
id: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
entity_type: EntityType;
|
||||
updated_at: string;
|
||||
completeness_score: number;
|
||||
missing_fields: MissingFields;
|
||||
}
|
||||
|
||||
export interface CompletenessSummary {
|
||||
total_entities: number;
|
||||
avg_completeness_score: number;
|
||||
entities_below_50: number;
|
||||
entities_100_complete: number;
|
||||
by_entity_type: {
|
||||
parks: number;
|
||||
rides: number;
|
||||
companies: number;
|
||||
ride_models: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface CompletenessAnalysis {
|
||||
summary: CompletenessSummary;
|
||||
entities: {
|
||||
parks: EntityCompleteness[];
|
||||
rides: EntityCompleteness[];
|
||||
companies: EntityCompleteness[];
|
||||
ride_models: EntityCompleteness[];
|
||||
};
|
||||
generated_at: string;
|
||||
}
|
||||
|
||||
export interface CompletenessFilters {
|
||||
entityType?: EntityType;
|
||||
minScore?: number;
|
||||
maxScore?: number;
|
||||
missingCategory?: MissingFieldCategory;
|
||||
searchQuery?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user