Home

Awesome

<div align="center"> <img width="300" src="https://github.com/rebase-energy/EnergyDataModel/blob/main/assets/energydatamodel-logo.png?raw=true" alt="EnergyDataModel"/> <h2 style="margin-top: 0px;"> πŸ”‹ Represent energy systems as Python data classes for improved modularity and readability </h2> </div>

License: MIT PyPI version Join us on Slack All Contributors GitHub Repo stars

EnergyDataModel provides an open-source, Python-based data model that enables energy data scientists and modellers to write more modular and readable code. EnergyDataModel lets you:

⬇️ Installation  |  πŸ“– Documentation  |  πŸš€ Try out now in Colab  |  πŸ‘₯ Join Community Slack

Modules and Data Classes

EnergyDataModel leverages Python's Data Classes to represent energy assets as Python objects. The table below gives a summary of the available modules and data classes.

ModuleData Classes
πŸ—ΊοΈΒ geospatialGeoLocation, GeoLine, GeoPolygon, GeoMultiPolygon, GeoGraph
πŸ“ˆΒ timeseriesElectricityDemand, ElectricitySupply, HeatingDemand, HeatingSupply, ElectricityPrice, CarbonIntensity,
β˜€οΈΒ solarFixedMount, SingleAxisTrackerMount, PVArray, PVSystem, SolarPowerArea
🌬️ windWindTurbine, WindFarm, WindPowerArea
πŸ”‹Β batteryBattery
πŸ’¦Β hydroReservoir, HydroTurbine, HydroPowerPlant
♻️ heatpumpHeatPump
⚑ powergridCarrier, Bus, Line, Transformer, Link, SubNetwork, Network,

Explore the data model visually here.
Read the full documentation here.

Purpose and Philosphy

The aim of EnergyDataModel is to provide the energy data and modelling community with a Python-based open-source tool to enable improvement of software engineering aspects like code quality, maintainability, modularity, reusability and interoperability. We believe that bringing more rigorous software engineering practices to the energy data community has the potential to radically improve productivity, collaboration and usefulness of software tools, utimately leading to better energy decisions.

Our philosophy is aligned on usefulness and practicality over maximizing execution performance or some kind of esoteric theoretical rigor. A well-know quote by Abelson & Sussman comes to mind:

"Programs [software] are meant to be read by humans and only incidentally for computers to execute"

Making code explicit, readable and intuitive counts.

If you are interested in joining our mission to build open-source tools that improve productiveness and workflow of energy modellers worldwide - then join our Slack!

Basic usage

Create an energy system made up of two sites with co-located solar, wind and batteries and save as a .json-file.

import energydatamodel as edm

pvsystem_1 = edm.PVSystem(capacity=2400, surface_azimuth=180, surface_tilt=25)
windturbine_1 = edm.WindTurbine(capacity=3200, hub_height=120, rotor_diameter=100)
battery_1 = edm.Battery(storage_capacity=1000, min_soc=150, max_charge=500, max_discharge=500)

site_1 = edm.Site(assets=[pvsystem_1, windturbine_1, battery_1],
                  latitude=46, 
                  longitude=64)

pvsystem_2 = edm.PVSystem(capacity=2400, surface_azimuth=180, surface_tilt=25)
windturbine_2 = edm.WindTurbine(capacity=3200, hub_height=120, rotor_diameter=100)
battery_2 = edm.Battery(storage_capacity=1000, min_soc=150, max_charge=500, max_discharge=500)

site_2 = edm.Site(assets=[pvsystem_2, windturbine_2, battery_2],
                  latitude=51, 
                  longitude=58)

portfolio = edm.Portfolio(sites=[site_1, site_2])

portfolio.to_json()

For more examples on usage and applications of EnergyDataModel see the documentation examples page here.

Installation

Install the stable release:

pip install energydatamodel

Install the latest release:

pip install git+https://github.com/rebase-energy/EnergyDataModel

Install in editable mode for development:

git clone https://github.com/rebase-energy/EnergyDataModel.git
cd EnergyDataModel
pip install -e . 

Ways to Contribute

We welcome contributions from anyone interested in this project! Here are some ways to contribute to EnergyDataModel:

If you are interested in contributing, then feel free to join our Community Slack so that we can discuss it.

Contributors

This project uses allcontributors.org to recognize all contributors, including those that don't push code.

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/sebaheg"><img src="https://avatars.githubusercontent.com/u/26311427?v=4?s=100" width="100px;" alt="Sebastian Haglund"/><br /><sub><b>Sebastian Haglund</b></sub></a><br /><a href="#code-sebaheg" title="Code">πŸ’»</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/nelson-sommerfeldt"><img src="https://avatars.githubusercontent.com/u/95913116?v=4?s=100" width="100px;" alt="Nelson"/><br /><sub><b>Nelson</b></sub></a><br /><a href="#ideas-nelson-sommerfeldt" title="Ideas, Planning, & Feedback">πŸ€”</a></td> </tr> </tbody> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->

Licence

This project uses the MIT Licence.