A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

ETSource

Contains the data used by Quintel energy transition modelling applications, allowing you to explore possible future energy systems for your country, region or municipality.
https://github.com/quintel/etsource

Category: Energy Systems
Sub Category: Energy System Modeling Frameworks

Keywords from Contributors

archiving measur transforms observation optimize generic animals compose projection conversion

Last synced: about 19 hours ago
JSON representation

Repository metadata

Data source for the Energy Transition Model

README.md

ETSource

Build Status

ETSource contains the data used by Quintel applications for modelling energy
transition. The files contained herein are a mixture of human-editable
"documents", source files used to do offline calculations with Atlas
and Refinery, and files containing the results of these
calculations for use in ETEngine.

You may also wish to view the Atlas readme for information on
loading the ETSource data in a console, importing data from the old InputExcel
output files, or for instructions on exporting data for ETEngine.

Open Source

ETSource is released under the MIT License.

The sole exception to this is the energy balance in datasets.
These Energy Balances come from the IEA, that does not allow
redistribution of their data. You may want to purchase this data with the
IEA
and put it in the appropiate
dataset directory to have a fully functioning ETSource for that region. You
will have to adjust and extend the energy balance with the use of
ETDataset.

Please contact us when you have questions.

Setup

Prerequisites:

  • rbenv
  • ruby
  • bundler
  • rspec

There's no additional setup required for ETSource. There are however optional
arguments you can set in a .env file in the root directory of your local
ETSource project. See the .env.default which options are available.

"Active" Documents

Files with an ".ad" extension are editable through the Atlas console
and are used by ETEngine to set up the graph structure. These files typically
contain global data which applies to all regions.

If you prefer, ActiveDocument files can be editted in your favourite text
editor. Each document is split into two sections: a comments section where
each line begins with a hash ("#"), a section containing attributes values.

# This is the comment section. You can wrap across as many lines as you want,
# but each one should begin with a hash.
#
# Paragraphs are also acceptable.

- use = energetic
- renewability = 1.0

~ demand = EB(something, something)

Comments Section

The comment section is optional, and should be placed at the top of the
document. When the file is loaded by Atlas, the comment is available as the
description attribute.

document.description
# => "String containing the file comment"

Attributes Section

The attributes section is parsed so that each one is available with a native
Ruby datatype. Attributes are specified with one on each line and preceeded
with a dash and space.

# - use = energetic
# - renewability = 1.0

document.use           # => "energetic" (String)
document.renewability  # => 1.0 (Float)

Values may also be an array of numbers or strings by wrapping each one in
square brackets.

# - range = [1, 2.0, 3, 4.5, 9]
# - strs  = [a, b, c]

document.range  # => [1, 2.0, 3, 4.5, 9]
document.strs   # => ['a', 'b', 'c']
Multi-line Attributes

An attribute value may span multiple lines so long as each line is intended
with spaces:

- description =
    Felis catus is your taxonomic nomenclature,
    An endothermic quadruped, carnivorous by nature;
    Your visual, olfactory, and auditory senses
    Contribute to your hunting skills and natural defenses.

The leading spaces will be trimmed:

# - query =
#     SUM(
#       MAX(1, 2),
#       MAX(3, 4)
#     )

puts document.query

# SUM(
#   MAX(1, 2),
#   MAX(3, 4)
# )
Hashes and Namespaces

You can specify "namespaced" attributes which are converted to hashes in the
Ruby model:

# - efficiency.gas = 0.5
# - efficiency.electricity = 0.6

document.efficiency  # => { gas: 0.5, electricity: 0.6 }

# - one.two = 2
# - one.three.four = 4

document.one # => { two: 2, three: { four: 4 } }
Dynamic Attributes

All of the attributes described so far are "static" -- they are the same for
every region and do not require any extra processing. However some
attributes, such as the demand of a node, or the share of an edge, may vary
from region-to-region, or depend on external (CSV) sources.

These values are assigned by writing a query which outputs the desired value.

Queries are prefixed with a ~ instead of the usual -, and are followed by
the query to be executed:

~ demand =
    EB(residential, gas) +
      EB(residential, electricity) +
      EB(residential, infinite_improbability_drive)

The values output by queries are used during for Refinery calculations. You
may set the following attributes using a query:

  • Node: demand.
  • Edge: parent_share, child_share, or demand.
  • Slot: share ("conversion").

Set a slot share by adding an appropriate query in the node document:

~ output.coal = CONVERSION(my_node_outputs, coal)
EB(use, carrier)

The EB() function returns the value of a cell from the energy balance data.
This data is stored in a CSV file in "data/energy_balance". Supply the use
(the name of a row in the CSV) with a carrier (a column name):

EB(industry, electricity) # => 140673.72
AREA(attribute)

Retrieve a single attribute value from the area data with the AREA()
function. The area data is stored in "data/datasets/:area/:area.ad".

AREA(coast_line) # => 451.0
SHARE(file_name, attribute)

Files containing share data (application and technology splits) are found at
"data/datasets/:area/shares". Provide the name of the share file, plus the
column name, and you'll get the share value:

SHARE(cng, cars) # => 0.5

CSV files containing shares can be given whatever name you want, but it should
be consistent across every region, i.e. if you add a "cng.csv" file to
"datasets/nl/shares", then a similar file should be added for the other
regions also.

CENTRAL_PRODUCTION(node_key)

Like CHP data, the energy output of central production nodes is specified in
a separate CSV file. This is at "data/datasets/:area/central_producers.csv".
Provide the node key to retrieve the demand:

CENTRAL_PRODUCTION(energy_power_solar_csp_solar_radiation) # => 5678.0
PRIMARY_PRODUCTION(node_key, attribute)

The same as CENTRAL_PRODUCTION except that it reads from the CSV file at
"data/dataset/:area/primary_production.csv". It also takes an attribute
parameter to identify which column you wish to read.

Before Committing...

After editing documents by hand, you should run the Atlas validation to ensure
that you did not introduce any illegal changes:

$ cd ~/code/atlas
$ rake validate[../etsource/data]
OK

Special Attributes

Node

You can set a slot share ("conversion") for a node like so:

- input.gas = 0.4
- input.oil = 0.6

This tells the node that is has two input slots; gas providing 40%, and oil
providing 60% of the demanded energy. Swapping "input" for "output" does the
same for output slots.

A special "elastic" value will tell the node that this slot should fill up
whatever share is required to sum to 1.0:

- output.heat = 0.2
- output.electricity = 0.5
- output.loss = elastic

This node outputs 20% of its energy has heat, and 50% as electricity. The
elastic slot will therefore take the remaining 30%. A node may not contain
more than one elastic input slot, and one elastic output slot.

Slot share may vary depending on the share of the inputs; this is called
"carrier efficiency", and is often used to model converters whose efficiency
varies depending on the energy source given to them. In this case, you need
to provide the efficiency of the slot if the node were to be given 100% of
each input.

- output.electricity.coal = 0.4
- output.electricity.biomass = 0.5

This tells ETSource/Atlas that the "electricity" output slot has a share of 0.4
when only coal is given to the node, and a share of 0.5 when only biomass is
given. In reality, your node will likely have a split of inputs; you must
provide a share for each input:

- input.coal = 0.7
- input.biomass = 0.3
- output.electricity.coal = 0.4
- output.electricity.biomass = 0.5
- output.loss = elastic

CSV Documents

Throughout the ETSource repo are ".csv" files which contain raw data used by
Atlas for creating the processed files for ETEngine. Many are sourced from
third-parties (such as energy-balance data from the IEA), while others are
created by Quintel staff.

Directory Structure

The ETSource repository is split into many directories, each containing files
serving different purposes. Data is either global and affects all regions,
or is regional and affects only one area.

./carriers (global)

Contains a document for each type of carrier in the Energy Transition Model.
In each file is global data specifying how the carrier works, such as whether
the energy is infinite in supply.

./datasets (regional)

Inside the datasets directory is a subdirectory for each region. Inside each
of those folders is regional data: an ActiveDocument whose name matches the
folder. Each also has a "shares" subdirectory containing CSVs whose values
are used by Atlas to set edge shares.

./edges (global)

ActiveDocuments; one for each edge ("link") between nodes in the graph. Each
filename contains the supplier ("parent" or "output") node, and the consumer
("child" or "input") node, and the name of the carrier in the format:
consumer-supplier@carrier.

Edges are typically organised into subdirectories whose names match the sector
of the supplier node. This may change in the future, and presently nothing
will break if you put an edge in the wrong subdirectory.

./gqueries (global)

ActiveDocuments detailing the queries which may be performed on ETEngine by
application such as ETModel and ETFlex. The subdirectories have no
significance except to keep things organised.

./inputs (global)

Documents containing values which may be set on ETEngine by applications like
ETModel. One file per input, and the directories are purely for organisation
and have no significance.

./nodes (global)

Contains documents for nodes. One document per node, organised into
subdirectories whose names indicate the sector to which the node belongs.

./presets (global)

Contains scenarios completed by QI'ers and notable public figures which can be
viewed on ETModel.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 7 days ago

Total Commits: 10,268
Total Committers: 73
Avg Commits per committer: 140.658
Development Distribution Score (DDS): 0.873

Commits in past year: 385
Committers in past year: 11
Avg Commits per committer in past year: 35.0
Development Distribution Score (DDS) in past year: 0.584

Name Email Commits
Chael Kruip c****p@q****m 1309
Michiel den Haan m****n@q****m 1245
marliekeverweij m****j@q****m 1088
Mathijs Bijkerk m****k@q****m 936
Anthony Williams hi@a****o 825
Rob Terwel r****l@q****m 505
Wouter van Lelyveld w****d@q****m 376
Joris Berkhout j****t@q****m 336
Roos de Kok r****k@q****m 301
Dorine van der Vlies d****s@q****m 267
Sebi Burkhard s****d@g****m 262
Kas Kranenburg k****g@q****m 214
Mart Lubben m****n@q****m 202
Kyra de Haan k****n@q****m 196
Alexander Wirtz a****z@q****m 189
Dennis Schoenmakers d****s@q****m 188
Chris c****s@q****m 185
Lotte van Vlimmeren l****n@q****m 168
Paolo Zaccagnini p****c@g****m 135
Koen van Bemmelen k****n@q****m 117
noracato n****l@g****m 116
Charlotte von Meijenfeldt c****t@q****m 105
Gerard Westerhof g****d@g****l 101
markquintel m****r@q****m 101
Charlotte vm c****m@C****l 98
wmeyers w****s@q****m 92
Wouter Terlouw A****n@Q****l 80
Richard Deuchler r****r@q****m 72
Berend Smits b****s@q****m 70
Wouter Terlouw w****w@q****m 61
and 43 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 167
Total pull requests: 327
Average time to close issues: 7 months
Average time to close pull requests: 23 days
Total issue authors: 17
Total pull request authors: 17
Average comments per issue: 2.03
Average comments per pull request: 0.73
Merged pull request: 262
Bot issues: 1
Bot pull requests: 10

Past year issues: 66
Past year pull requests: 183
Past year average time to close issues: about 2 months
Past year average time to close pull requests: 12 days
Past year issue authors: 6
Past year pull request authors: 10
Past year average comments per issue: 1.89
Past year average comments per pull request: 0.73
Past year merged pull request: 141
Past year bot issues: 0
Past year bot pull requests: 4

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/quintel/etsource

Top Issue Authors

  • mabijkerk (61)
  • kaskranenburgQ (31)
  • kndehaan (22)
  • DorinevanderVlies (11)
  • MartLubben (10)
  • marliekeverweij (6)
  • michieldenhaan (5)
  • noracato (5)
  • thomas-qah (3)
  • MaykThewessen (3)
  • KoenvanB (3)
  • Charlottevm (2)
  • redekok (1)
  • sentry-io[bot] (1)
  • louispt1 (1)

Top Pull Request Authors

  • kaskranenburgQ (89)
  • mabijkerk (65)
  • Charlottevm (56)
  • kndehaan (45)
  • KoenvanB (22)
  • dependabot[bot] (10)
  • louispt1 (10)
  • redekok (8)
  • Max-Kerpel (5)
  • thomas-qah (4)
  • claudiavalkenier (3)
  • lottevanvlimmeren (3)
  • marliekeverweij (2)
  • noracato (2)
  • antw (1)

Top Issue Labels

  • Pinned (88)
  • Stale (16)
  • Bugs (15)
  • Wish list (9)
  • Molecule graph (6)
  • Cost methods (3)
  • Data update (3)
  • sankey (3)
  • Clean Up (2)
  • Minor issue (1)
  • enhancement (1)
  • curves (1)
  • Question (1)

Top Pull Request Labels

  • Pinned (15)
  • dependencies (10)
  • Stale (5)
  • on hold (3)
  • Bugs (2)
  • feature (1)
  • effort:3 (1)

Dependencies

Gemfile rubygems
  • atlas >= 0 development
  • refinery >= 0 development
  • roo >= 0 development
  • rspec >= 0 development
  • rspec_junit_formatter >= 0 development
  • rubel >= 0 development
  • rake >= 0
Gemfile.lock rubygems
  • activemodel 7.0.2.3
  • activesupport 7.0.2.3
  • atlas 1.0.0
  • axiom-types 0.1.1
  • coercible 1.0.0
  • concurrent-ruby 1.1.9
  • csv 3.2.2
  • descendants_tracker 0.0.4
  • diff-lcs 1.3
  • equalizer 0.0.11
  • gpgme 2.0.20
  • i18n 1.10.0
  • ice_nine 0.11.2
  • mini_portile2 2.7.1
  • minitest 5.15.0
  • nokogiri 1.13.1
  • racc 1.6.0
  • rake 12.3.3
  • refinery 0.0.1
  • roo 2.7.1
  • rspec 3.8.0
  • rspec-core 3.8.0
  • rspec-expectations 3.8.2
  • rspec-mocks 3.8.0
  • rspec-support 3.8.0
  • rspec_junit_formatter 0.4.1
  • rubel 0.1.1
  • ruby-graphviz 1.2.4
  • rubyzip 1.3.0
  • terminal-table 1.8.0
  • thread_safe 0.3.6
  • turbine-graph 0.1.3
  • tzinfo 2.0.4
  • unicode-display_width 1.6.0
  • virtus 1.0.5
.github/workflows/stale.yml actions
  • actions/stale v3 composite

Score: 8.925188429378027