openENTRANCE/openentrance

subcountry description

sandrinecharousset opened this issue · 3 comments

The subcountry yaml file comprises different levels of 'subcountries' and it is thus not so simple to automate. e.g. I would like to work on a dataset at country level and disaggregate at highway clusters level, I could not find a way to get the list of highway clusters only, because the file subcountries.yaml not only comprises highway clusters but also aggregated highway clusters and hydrocen regions. Moreover, depending on the data source, the regions do not comprise the same 'level2' information (highway clusters have a 'ehighway' tag, while hydrocen regions have a 'hydrocen' tag
I can think of different ways to solve this:

  • separate in multiple files : ehighway.yaml, aggregated_ehighway.yaml, hydrocen.yaml
  • add a tag to all regions which would give the 'kind of region' this is (here the value of this tag could be ehighway_cluster or ehighway_cluster_aggregate or hydrocen). No idea of the name to give to this tag
  • there are certainly ways of finding out from what is already the 'type' of region, but I could not think of something simple enough ....
    @erikfilias @SarahYS @danielhuppmann any idea?

I'm not sure I understand your question, but you could try the following, maybe this helps... This will give you a subset of the regions dictionary containing only the nodes that are used in the ehighways project:

import nomenclature

ehighways = {}

for key, value in nomenclature.regions.items():
    if "ehighway2050" in value:
        ehighways[key] = value

I'm not sure I understand your question, but you could try the following, maybe this helps... This will give you a subset of the regions dictionary containing only the nodes that are used in the ehighways project:

import nomenclature

ehighways = {}

for key, value in nomenclature.regions.items():
    if "ehighway2050" in value:
        ehighways[key] = value

Hi @sandrinecharousset, I think the script provided by @danielhuppmann could help you.
Anyway, I tried to include all highways clusters. If some of them are missing, please let me know to update the file.

@erikfilias yes all ehighway clusters are there, no problem

I will give 2 examples :
ex1: I want to select the list of ehighway2050 clusters which are in the countries represented in openentrance scenarios
the script @danielhuppmann gave above will nearly work, in the sense that it will also give me the regions which are aggregated clusters like Italy|Subgrid north: which has ehighway2050: 52_IT + 53_IT ; But then I could add a test which is that there is not '+' in ehighway2050

ex2: I want to select the list of ehighway2050 clusters which are in the countries in openentrance scenarios and which are in one subregion which is an aggregation of more than 1 ehighway2050 cluster. This also should be doable.

Then thanks @danielhuppmann , I believe this closes my issue!