Enviro Impact Tracker is a full-stack educational project designed to estimate and compare the environmental impact of different facility types in Norway.
It calculates annual energy usage, CO₂ emissions, and energy costs based on:
- Region
- Facility type
- Size
- (Optional) Custom usage and emission factors
The tool prioritizes transparent, explainable calculations — not a black box.
All baseline assumptions are documented and sourced from public Norwegian data.
- Real-time environmental impact calculation
- Live electricity price + CO₂ emission factor APIs
- Visual comparison against national benchmarks
- Region-specific modeling (NO1-NO5 grid zones)
- Support for multiple facility types (industry, farms, schools, hospitals, offices, data centers, residential, etc.)
- Custom overrides (kWh, emission factor, electricity price)
- Full documentation of baseline assumptions (baseline_data.md)
- Full test suite with automated CI checks on GitHub Actions
- Responsive UI with clear "About" and transparency statements
- FastAPI – high-performance API framework
- Pydantic – strict request validation
- Uvicorn – ASGI server
- Starlette – routing and middleware
- Live APIs:
- hvakosterstrommen.no — electricity price API
- electricityMap.org — CO₂ intensity API
- Modular architecture: services, config_loader, benchmark_loader
- ASP.NET Core Razor Pages (.NET Core MVC)
- Bootstrap 5 – responsive UI
- Chart.js – dynamic visualization
- JavaScript – interactive client logic
- "About" page with full project transparency
- Pytest test suite
- Parametrized tests for core
/calculateendpoint - Negative tests for invalid input handling
- Mocking tests for API fallback paths
- Endpoints tested:
/calculate/regions/facility-types
- GitHub Actions CI:
- Automatic test run on pull requests to
main - Prevents broken builds from being merged
- Automatic test run on pull requests to
- Add more advanced metrics that give the end user more value.
- Find a usable price api that can return historical price data as well.
- Update UI to feature more modern elements.
- Consider setting up persistant storage through a DB for own metrics and values based on the areas in Norway so we can better show estimates over a time period.
-
Clone the repository:
git clone https://github.com/yourusername/EnviroImpactTracker.git cd EnviroImpactTracker -
Install requirements:
pip install -r requirements.txt
-
Run backend:
uvicorn app.main:app --reload
Open the EnviroImpactFrontend project in Visual Studio.
Run the frontend with IIS Express or:
dotnet run