From 71481b33bce31c3a54ed6a608e8f919763f34492 Mon Sep 17 00:00:00 2001 From: kmkranenburg <150331345+kaskranenburgQ@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:12:37 +0200 Subject: [PATCH] Adding queries to refinery sankey to include industry transformation (#4342) * Adding queries to refinery sankey to include industry transformation * Minor typo and syntax fix --------- Co-authored-by: Kyra de Haan --- app/assets/javascripts/d3/sankey.coffee | 15 +++++++++++++++ .../output_elements/labels_groups/en_labels.yml | 4 +++- .../output_elements/labels_groups/nl_labels.yml | 4 +++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/d3/sankey.coffee b/app/assets/javascripts/d3/sankey.coffee index 6b05f077a..bec2a9db9 100644 --- a/app/assets/javascripts/d3/sankey.coffee +++ b/app/assets/javascripts/d3/sankey.coffee @@ -939,7 +939,9 @@ D3.sankey = {id: 'heat_input', column: 0, label: 'heat_input', color: '#d62728'}, {id: 'fuel_import', column: 0, label: 'fuel_import', color: '#854321'}, {id: 'synthetic_production', column: 0, label: 'synthetic_production', color: '#BFEFFF'}, + {id: 'non_refinery_products_input', column: 0, label: 'non_refinery_products', color: '#ff7f0e'} {id: 'refinery', column: 1, label: 'refinery', color: '#854321'}, + {id: 'industry_transformation', column: 1, label: 'industry_transformation', color: '#43464B'}, {id: 'distribution_diesel', column: 2, label: 'distribution_diesel', color: '#854321'}, {id: 'distribution_gasoline', column: 2, label: 'distribution_gasoline', color: '#8B0000'}, {id: 'distribution_lpg', column: 2, label: 'distribution_lpg', color: '#CCCCCC'}, @@ -948,6 +950,7 @@ D3.sankey = {id: 'distribution_oil_products', column: 2, label: 'distribution_oil_products', color: '#854321'}, {id: 'distribution_refinery_gas', column: 2, label: 'distribution_refinery_gas', color: '#7f7f7f'}, {id: 'loss', column: 2}, + {id: 'non_refinery_products_output', column: 2, label: 'non_refinery_products', color: '#ff7f0e'}, {id: 'households', column: 3, label: 'households'}, {id: 'buildings', column: 3, label: 'buildings'}, {id: 'transport', column: 3, label: 'transport'}, @@ -959,8 +962,12 @@ D3.sankey = ] links: [ {left: 'oil_import', right: 'refinery', gquery: 'crude_oil_import_to_refinery_in_sankey', color: '#854321'}, + {left: 'oil_import', right: 'industry_transformation', gquery: 'crude_oil_import_to_industry_transformation_in_sankey', color: '#854321'}, {left: 'extraction', right: 'refinery', gquery: 'crude_oil_extraction_to_refinery_in_sankey', color: '#854321'}, + {left: 'extraction', right: 'industry_transformation', gquery: 'crude_oil_extraction_to_industry_transformation_in_sankey', color: '#854321'}, {left: 'heat_input', right: 'refinery', gquery: 'refinery_heat_input_in_sankey', color: '#d62728'}, + {left: 'heat_input', right: 'industry_transformation', gquery: 'industry_transformation_heat_input_in_sankey', color: '#d62728'}, + {left: 'non_refinery_products_input', right: 'industry_transformation', gquery: 'non_refinery_products_to_industry_transformation_in_sankey', color: '#ff7f0e'}, {left: 'refinery', right: 'distribution_diesel', gquery: 'diesel_refinery_to_distribution_in_sankey', color: '#854321'}, {left: 'refinery', right: 'distribution_gasoline', gquery: 'gasoline_refinery_to_distribution_in_sankey', color: '#8B0000'}, {left: 'refinery', right: 'distribution_lpg', gquery: 'lpg_refinery_to_distribution_in_sankey', color: '#CCCCCC'}, @@ -969,6 +976,14 @@ D3.sankey = {left: 'refinery', right: 'distribution_oil_products',gquery: 'oil_products_refinery_to_distribution_in_sankey', color: '#854321'}, {left: 'refinery', right: 'distribution_refinery_gas',gquery: 'refinery_gas_refinery_to_distribution_in_sankey', color: '#7f7f7f'}, {left: 'refinery', right: 'loss', gquery: 'refinery_loss_in_sankey', color: '#416B86'}, + {left: 'industry_transformation', right: 'distribution_diesel', gquery: 'diesel_industry_transformation_to_distribution_in_sankey', color: '#854321'}, + {left: 'industry_transformation', right: 'distribution_gasoline', gquery: 'gasoline_industry_transformation_to_distribution_in_sankey', color: '#8B0000'}, + {left: 'industry_transformation', right: 'distribution_lpg', gquery: 'lpg_industry_transformation_to_distribution_in_sankey', color: '#CCCCCC'}, + {left: 'industry_transformation', right: 'distribution_hfo', gquery: 'hfo_industry_transformation_to_distribution_in_sankey', color: '#BA7D40'}, + {left: 'industry_transformation', right: 'distribution_kerosene', gquery: 'kerosene_industry_transformation_to_distribution_in_sankey', color: '#BFEFFF'}, + {left: 'industry_transformation', right: 'distribution_oil_products',gquery: 'oil_products_industry_transformation_to_distribution_in_sankey', color: '#854321'}, + {left: 'industry_transformation', right: 'loss', gquery: 'industry_transformation_loss_in_sankey', color: '#416B86'}, + {left: 'industry_transformation', right: 'non_refinery_products_output', gquery: 'industry_transformation_to_non_refinery_products_in_sankey', color: '#ff7f0e'}, {left: 'fuel_import', right: 'distribution_diesel', gquery: 'diesel_import_to_distribution_in_sankey', color: '#854321'}, {left: 'fuel_import', right: 'distribution_gasoline', gquery: 'gasoline_import_to_distribution_in_sankey', color: '#8B0000'}, {left: 'fuel_import', right: 'distribution_lpg', gquery: 'lpg_import_to_distribution_in_sankey', color: '#CCCCCC'}, diff --git a/config/locales/interface/output_elements/labels_groups/en_labels.yml b/config/locales/interface/output_elements/labels_groups/en_labels.yml index 8a3f964e8..271d33b5c 100644 --- a/config/locales/interface/output_elements/labels_groups/en_labels.yml +++ b/config/locales/interface/output_elements/labels_groups/en_labels.yml @@ -193,7 +193,7 @@ en: ambient_heat: "ambient heat" ammonia: "ammonia" biomass_products: "biomass products" - non_biogenic_carriers: "Non-biogenic carriers" + non_biogenic_carriers: "Non-biogenic carriers" captured: "captured" coal: "coal" coal_households: "coal for households" @@ -364,3 +364,5 @@ en: waste_mix: "waste mix" methanol: "methanol" imported_methanol: "imported methanol" + non_refinery_products: "non-refinery products" + industry_transformation: "industry transformation" diff --git a/config/locales/interface/output_elements/labels_groups/nl_labels.yml b/config/locales/interface/output_elements/labels_groups/nl_labels.yml index 0b936f1da..394e81fda 100644 --- a/config/locales/interface/output_elements/labels_groups/nl_labels.yml +++ b/config/locales/interface/output_elements/labels_groups/nl_labels.yml @@ -191,7 +191,7 @@ nl: ambient_heat: "omgevingswarmte" ammonia: "ammoniak" biomass_products: "biomassaproducten" - non_biogenic_carriers: "Niet-biogene dragers" + non_biogenic_carriers: "Niet-biogene dragers" captured: "afgevangen" coal: "kolen" coal_households: "Kolen voor huishoudens" @@ -346,3 +346,5 @@ nl: methanol: "methanol" imported_methanol: "geïmporteerde methanol" not_defined: "niet gedefinieerd" + non_refinery_products: "niet-raffinage producten" + industry_transformation: "industrie transformatie"