Skip to content

Instantly share code, notes, and snippets.

@mebibou
Created October 19, 2020 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mebibou/923e76198fb6d89437c289ec53112840 to your computer and use it in GitHub Desktop.
Save mebibou/923e76198fb6d89437c289ec53112840 to your computer and use it in GitHub Desktop.
HESTIA Calculation Engine sample
from hestia_earth.calculation import Engine
engine = Engine()
# cycle: {"@context": "https://hestia.earth/Cycle.jsonld", "@id": "id", "@type": "Cycle", "site": {"@type": "Site"}, ...}
engine.import_data(cycle)
# run the calculations
engine.calculate_all()
# read the data
engine.export_data()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment