MRH ENTERPRISES

Government Statistical Dashboard

A government-grade data analytics platform for economic indicators, administrative data tracking, and geospatial visualization.

Use Cases

Government agencies and statistical offices can upload economic indicators and administrative data through CSV files with automatic validation and processing. The system supports GeoJSON uploads for regional boundaries, enabling custom administrative divisions and geographic regions. Users can visualize data on interactive maps with color-coded heatmaps based on indicator values, filter by specific regions or view aggregate statistics across all regions, and analyze time-series trends with automated aggregation (monthly, quarterly, yearly). The platform includes linear forecasting for predictive analytics, real-time dashboard KPIs showing average values, trends, and regional comparisons, and comprehensive data management with indicator definitions, region management, and data point tracking. Perfect for national statistical offices, regional planning departments, economic research institutions, and government agencies requiring geospatial data visualization with advanced analytics capabilities.

CSV data ingestion with automatic validation and processing
GeoJSON regional boundary uploads for custom administrative divisions
Interactive geospatial visualization with Leaflet heatmaps
Time-series analysis with trend calculation and linear forecasting

Key Features

  • Interactive Geospatial Visualization with Leaflet maps and PostGIS
  • Time-Series Data Analysis with automated aggregation (monthly/quarterly/yearly)
  • Trend Calculation using linear regression analysis
  • Linear Forecasting for predictive analytics
  • CSV Data Ingestion with automatic validation and processing
  • GeoJSON Regional Boundary Uploads for custom administrative divisions
  • Indicator Management with full CRUD operations
  • Region Management with geospatial boundary storage
  • Real-time Dashboard KPIs with average, min, max, and trend metrics
  • Interactive Heatmaps with color-coded regional data visualization
  • Multi-Region Data Filtering and aggregate statistics
  • RESTful API for external system integration
  • Swagger API Documentation with automatic OpenAPI schema generation

Architecture

Built with a RESTful API-first architecture using FastAPI (Python 3.9+) on the backend and Vue 3 with TypeScript on the frontend. The system follows a modular structure with clean separation between data ingestion, analytics processing, geospatial operations, and visualization modules. The backend uses PostgreSQL with PostGIS extension for advanced geospatial queries and SQLite for local development flexibility, implements SQLAlchemy ORM for database operations, and includes Pandas and NumPy for statistical analysis and time-series processing. The frontend uses component-based architecture with Vue 3 Composition API, Pinia for state management, Vue Router for navigation, and Leaflet for interactive map visualization. The analytics module provides automated data aggregation, trend calculation using linear regression, and forecasting capabilities. This architecture enables seamless integration with external data sources, supports batch data processing, and ensures scalability through optimized database queries and efficient geospatial operations with PostGIS spatial indexing.

RESTful API architecture with FastAPI (Python 3.9+)
Component-based Vue 3 frontend with TypeScript and Composition API
PostgreSQL with PostGIS for advanced geospatial operations
Pandas and NumPy for statistical analysis and time-series processing

Security & Performance

Security is implemented through configurable CORS protection for secure cross-origin requests between frontend and backend, with environment-based origin whitelisting for production deployments. The system includes comprehensive error handling and validation for data ingestion, preventing invalid data from entering the system. Performance is optimized through efficient PostgreSQL queries with PostGIS spatial indexing, enabling fast geospatial queries even with complex regional boundaries and large datasets. The backend uses SQLAlchemy ORM with connection pooling for efficient database operations, and the analytics module leverages Pandas for optimized time-series processing and NumPy for fast mathematical calculations. Static file handling is optimized for the Vue frontend with Vite build optimization, and the system is built to handle high traffic with scalable PostgreSQL architecture and efficient geospatial rendering using Leaflet with tile caching.

Configurable CORS protection with environment-based origin whitelisting
PostGIS spatial indexing for optimized geospatial queries
SQLAlchemy connection pooling for efficient database operations
Pandas and NumPy optimization for fast statistical calculations

Development & Deployment

The backend is fully dockerized using Docker with Python 3.9-slim base image, ensuring consistent development and production environments. The frontend uses Express.js server for Railway deployment, serving static Vite-built files with SPA routing support. The codebase follows TypeScript for full type safety on the frontend and Python type hints with Pydantic models for API validation. The system is structured for automated CI/CD pipelines and deployed cloud-natively on Railway with PostgreSQL database and PostGIS extension. The responsive macOS-inspired design ensures optimal user experience with glassmorphism effects, soft shadows, and smooth animations. The frontend is built using Vite for fast development and optimized production builds, while the backend is served with Uvicorn ASGI server for production-grade performance. The entire system supports environment-based configuration with Railway environment variables for database connections (DATABASE_URL), CORS origins (CORS_ORIGINS), and API endpoints. Both SQLite (local development) and PostgreSQL (production) are supported with automatic PostGIS extension enabling.

Full containerization with Docker for backend (Python 3.9)
Express.js server deployment for frontend (Vue 3 + Vite)
TypeScript for type safety and Python type hints with Pydantic
Production deployment on Railway with PostgreSQL and PostGIS

Tech Stack

Frontend

Vue 3TypeScriptVitePiniaVue RouterLeafletChart.js

Backend

FastAPIPython 3.9PostgreSQLPostGISSQLAlchemyPandasNumPyShapelyGeoAlchemy2Uvicorn

DevOps

DockerExpress.jsRailwayGit

Live Demo

Launch an interactive demo of this system environment.

Launch Demo