Skip to content

Technical test implementation: Energy consumption analysis dashboard using Django and Python

License

Notifications You must be signed in to change notification settings

Teosany/energy_dashboard

Repository files navigation

Energy Dashboard

A Django application for analyzing and visualizing energy consumption data across French regions. This project was developed as a technical test demonstrating full-stack development capabilities with Django, Python, and data analysis.

Features

  • CSV data import through web interface
  • Interactive visualization:
    • Regional consumption chart
    • Annual consumption chart
  • Paginated data table
  • Data export API
  • Custom data analysis services:
    • Peak consumption detection
    • Custom data type sorting

Technology Stack

  • Django
  • Tailwind CSS
  • Tailwind UI (license)
  • Chart.js
  • SQLite3 (default)

Local Development Setup

  1. Clone the repository:
git clone https://github.com/teosany/energy_dashboard.git
cd energy_dashboard
  1. Create and activate virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Setup Tailwind CSS:
cd theme/static_src
npm install
cd ../..
python manage.py tailwind start
  1. Apply migrations:
python manage.py migrate
  1. Create superuser:
python manage.py createsuperuser

Follow the prompts to create admin user

  1. Run development server:
python manage.py runserver

Visit:

API Usage

Export all data in JSON format:

curl http://localhost:8000/api/export/

Response example:

[
    {
        "date": "2024-01-01",
        "region": "Île-de-France",
        "consumption": 10.5
    }
]

Testing

Run tests:

python manage.py test

License

MIT

About

Technical test implementation: Energy consumption analysis dashboard using Django and Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published