etsource

Data source for the Energy Transition Model

https://github.com/quintel/etsource

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.3%) to scientific vocabulary

Keywords from Contributors

projection interactive serializer measurement cycles packaging charts network-simulation archival shellcodes
Last synced: 11 months ago · JSON representation

Repository

Data source for the Energy Transition Model

Basic Info
Statistics
  • Stars: 15
  • Watchers: 19
  • Forks: 9
  • Open Issues: 94
  • Releases: 1
Created almost 15 years ago · Last pushed 11 months ago
Metadata Files
Readme License

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.

```ruby 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.

```ruby

- 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.

```ruby

- 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:

```ruby

- 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:

```ruby

- 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:

ruby ~ 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:

ruby ~ 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):

ruby 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".

ruby 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:

ruby 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.

CENTRALPRODUCTION(nodekey)

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:

ruby CENTRAL_PRODUCTION(energy_power_solar_csp_solar_radiation) # => 5678.0

PRIMARYPRODUCTION(nodekey, 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

  • Name: Quintel
  • Login: quintel
  • Kind: organization
  • Email: info@quintel.com
  • Location: Amsterdam

GitHub Events

Total
  • Create event: 128
  • Release event: 1
  • Issues event: 51
  • Watch event: 3
  • Delete event: 99
  • Issue comment event: 151
  • Push event: 548
  • Pull request review event: 155
  • Pull request review comment event: 61
  • Pull request event: 215
  • Fork event: 1
Last Year
  • Create event: 128
  • Release event: 1
  • Issues event: 51
  • Watch event: 3
  • Delete event: 99
  • Issue comment event: 151
  • Push event: 548
  • Pull request review event: 155
  • Pull request review comment event: 61
  • Pull request event: 215
  • Fork event: 1

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 10,330
  • Total Committers: 73
  • Avg Commits per committer: 141.507
  • Development Distribution Score (DDS): 0.873
Past Year
  • Commits: 241
  • Committers: 10
  • Avg Commits per committer: 24.1
  • Development Distribution Score (DDS): 0.685
Top Committers
Name Email Commits
Chael Kruip c****p@q****m 1,309
Michiel den Haan m****n@q****m 1,245
marliekeverweij m****j@q****m 1,088
Mathijs Bijkerk m****k@q****m 962
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 226
Kyra de Haan k****n@q****m 205
Mart Lubben m****n@q****m 202
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
noracato n****l@g****m 123
Koen van Bemmelen k****n@q****m 117
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...

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 141
  • Total pull requests: 512
  • Average time to close issues: 7 months
  • Average time to close pull requests: 28 days
  • Total issue authors: 17
  • Total pull request authors: 17
  • Average comments per issue: 1.47
  • Average comments per pull request: 0.67
  • Merged pull requests: 376
  • Bot issues: 1
  • Bot pull requests: 14
Past Year
  • Issues: 39
  • Pull requests: 259
  • Average time to close issues: 20 days
  • Average time to close pull requests: 7 days
  • Issue authors: 4
  • Pull request authors: 10
  • Average comments per issue: 0.59
  • Average comments per pull request: 0.42
  • Merged pull requests: 184
  • Bot issues: 0
  • Bot pull requests: 4
Top Authors
Issue Authors
  • mabijkerk (51)
  • kaskranenburgQ (30)
  • kndehaan (19)
  • DorinevanderVlies (7)
  • MartLubben (7)
  • michieldenhaan (4)
  • noracato (4)
  • marliekeverweij (4)
  • thomas-qah (3)
  • MaykThewessen (3)
  • KoenvanB (3)
  • redekok (1)
  • sentry-io[bot] (1)
  • louispt1 (1)
  • Charlottevm (1)
Pull Request Authors
  • kaskranenburgQ (171)
  • mabijkerk (98)
  • kndehaan (71)
  • Charlottevm (57)
  • KoenvanB (31)
  • louispt1 (22)
  • Max-Kerpel (14)
  • dependabot[bot] (14)
  • claudiavalkenier (9)
  • redekok (7)
  • noracato (6)
  • thomas-qah (3)
  • lottevanvlimmeren (3)
  • DorinevanderVlies (2)
  • antw (2)
Top Labels
Issue Labels
Pinned (50) Stale (14) Bugs (12) Wish list (5) Molecule graph (2) Clean Up (2) Cost methods (1) Data update (1) Minor issue (1) curves (1) Question (1)
Pull Request Labels
Pinned (25) dependencies (14) Stale (8) on hold (4) Bugs (2) feature (2) effort:3 (2) ruby (2)

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