KAYA model - table, selected values (old)

carbon emissions projection using KAYA identity (old approach)
input values ⚙️
stepp = 0
mutable playing = Mutable {}
playing = 0

Code
mutable spec_now = spec_post_process(c_spec1)

x = vega_interactive(spec_now, { renderer: 'svg'})
OJS Runtime Error (line 54, column 20)

spec_post_process is not defined

OJS Runtime Error (line 54, column 20)

spec_post_process is not defined

OJS Runtime Error

spec_post_process is not defined

I need sep./addl. UIs for this.

domains11 = Object {year_in: Array(6), formulae: Array(5), formula: Array(11)}
p = Array(11) [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]
OJS Runtime Error

ui is not defined

Array(11) [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]
population = () => {
  if (year() <= 2023) return population_2023();
  else if (year() <= 2050)
    return (
      population_2023() +
      ((population_2050() - population_2023()) * (year() - 2023)) /
        (2050 - 2023)
    );
  else
    return (
      population_2050() +
      ((population_2100() - population_2050()) * (year() - 2050)) /
        (2100 - 2050)
    );
};

population_factor = () => population() / population_2023();

per_capita_gdp_factor = () => {
  if (year() <= 2023) return 1;
  else
    return (
      per_capita_gdp_factor({ year_in: year() - 1 }) *
      (1 + per_capita_gdp_rate())
    );
};

per_capita_gdp = () =>
  per_capita_gdp_2023() * per_capita_gdp_factor();

energy_intensity_factor = () => {
  // energy intensity of economy

  if (year() <= 2023) return 1;
  else
    return (
      energy_intensity_factor({ year_in: year() - 1 }) *
      (1 + energy_intensity_rate())
    );
};

energy_intensity = () =>
  energy_intensity_2023() * energy_intensity_factor();

carbon_intensity_factor = () => {
  // carbon intensity of energy sources

  if (year() <= 2023) return 1;
  else
    return (
      carbon_intensity_factor({ year_in: year() - 1 }) *
      (1 + carbon_intensity_rate())
    );
};

carbon_intensity = () =>
  carbon_intensity_2023() * carbon_intensity_factor();

technology_factor = () =>
  energy_intensity_factor() * carbon_intensity_factor();

income_factor = () => per_capita_gdp_factor();

carbon_emissions = () =>
  population() * per_capita_gdp() * energy_intensity() * carbon_intensity();

formula-input dependence map (todo pre-pop all values?):

formula carbon_intensity_2023_in carbon_intensity_rate_in energy_intensity_2023_in energy_intensity_rate_in per_capita_gdp_2023_in per_capita_gdp_rate_in population_2023_in population_2050_in population_2100_in year_in
population ✔️ ✔️ ✔️ ✔️
population_factor ✔️ ✔️ ✔️ ✔️
per_capita_gdp_factor ✔️ ✔️
per_capita_gdp ✔️ ✔️ ✔️
energy_intensity_factor ✔️ ✔️
energy_intensity ✔️ ✔️ ✔️
carbon_intensity_factor ✔️ ✔️
carbon_intensity ✔️ ✔️ ✔️
technology_factor ✔️ ✔️ ✔️
income_factor ✔️ ✔️
carbon_emissions ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
fixedDot = `digraph {subgraph cluster_0 { style=filled;color=lightgrey; node [style=filled,color=white];label = "inputs"; "0_carbon_intensity_2023_in" [cul_scope_id=0,name=carbon_intensity_2023_in,cul_source_scope_id=0,reason="input definition",inputs=carbon_intensity_2023_in,label="0_carbon_intensity_2023_in inputs: carbon_intensity_2023_in"]; "0_carbon_intensity_2023" [cul_scope_id=0,name=carbon_intensity_2023,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs=carbon_intensity_2023_in,label="0_carbon_intensity_2023 inputs: carbon_intensity_2023_in"]; "0_carbon_intensity_rate_in" [cul_scope_id=0,name=carbon_intensity_rate_in,cul_source_scope_id=0,reason="input definition",inputs=carbon_intensity_rate_in,label="0_carbon_intensity_rate_in inputs: carbon_intensity_rate_in"]; "0_carbon_intensity_rate" [cul_scope_id=0,name=carbon_intensity_rate,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs=carbon_intensity_rate_in,label="0_carbon_intensity_rate inputs: carbon_intensity_rate_in"]; "0_energy_intensity_2023_in" [cul_scope_id=0,name=energy_intensity_2023_in,cul_source_scope_id=0,reason="input definition",inputs=energy_intensity_2023_in,label="0_energy_intensity_2023_in inputs: energy_intensity_2023_in"]; "0_energy_intensity_2023" [cul_scope_id=0,name=energy_intensity_2023,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs=energy_intensity_2023_in,label="0_energy_intensity_2023 inputs: energy_intensity_2023_in"]; "0_energy_intensity_rate_in" [cul_scope_id=0,name=energy_intensity_rate_in,cul_source_scope_id=0,reason="input definition",inputs=energy_intensity_rate_in,label="0_energy_intensity_rate_in inputs: energy_intensity_rate_in"]; "0_energy_intensity_rate" [cul_scope_id=0,name=energy_intensity_rate,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs=energy_intensity_rate_in,label="0_energy_intensity_rate inputs: energy_intensity_rate_in"]; "0_per_capita_gdp_2023_in" [cul_scope_id=0,name=per_capita_gdp_2023_in,cul_source_scope_id=0,reason="input definition",inputs=per_capita_gdp_2023_in,label="0_per_capita_gdp_2023_in inputs: per_capita_gdp_2023_in"]; "0_per_capita_gdp_2023" [cul_scope_id=0,name=per_capita_gdp_2023,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs=per_capita_gdp_2023_in,label="0_per_capita_gdp_2023 inputs: per_capita_gdp_2023_in"]; "0_per_capita_gdp_rate_in" [cul_scope_id=0,name=per_capita_gdp_rate_in,cul_source_scope_id=0,reason="input definition",inputs=per_capita_gdp_rate_in,label="0_per_capita_gdp_rate_in inputs: per_capita_gdp_rate_in"]; "0_per_capita_gdp_rate" [cul_scope_id=0,name=per_capita_gdp_rate,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs=per_capita_gdp_rate_in,label="0_per_capita_gdp_rate inputs: per_capita_gdp_rate_in"]; "0_population_2023_in" [cul_scope_id=0,name=population_2023_in,cul_source_scope_id=0,reason="input definition",inputs=population_2023_in,label="0_population_2023_in inputs: population_2023_in"]; "0_population_2023" [cul_scope_id=0,name=population_2023,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs=population_2023_in,label="0_population_2023 inputs: population_2023_in"]; "0_population_2050_in" [cul_scope_id=0,name=population_2050_in,cul_source_scope_id=0,reason="input definition",inputs=population_2050_in,label="0_population_2050_in inputs: population_2050_in"]; "0_population_2050" [cul_scope_id=0,name=population_2050,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs=population_2050_in,label="0_population_2050 inputs: population_2050_in"]; "0_population_2100_in" [cul_scope_id=0,name=population_2100_in,cul_source_scope_id=0,reason="input definition",inputs=population_2100_in,label="0_population_2100_in inputs: population_2100_in"]; "0_population_2100" [cul_scope_id=0,name=population_2100,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs=population_2100_in,label="0_population_2100 inputs: population_2100_in"]; "0_year_in" [cul_scope_id=0,name=year_in,cul_source_scope_id=0,reason="input definition",inputs=year_in,label="0_year_in inputs: year_in"]; "0_year" [cul_scope_id=0,name=year,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs=year_in,label="0_year inputs: year_in"]} "0_population" [cul_scope_id=0,name=population,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs="year_in,population_2023_in,population_2050_in,population_2100_in",label="0_population inputs: year_in,population_2023_in,population_2050_in,population_2100_in"] "0_population_factor" [cul_scope_id=0,name=population_factor,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs="year_in,population_2023_in,population_2050_in,population_2100_in",label="0_population_factor inputs: year_in,population_2023_in,population_2050_in,population_2100_in"] "0_per_capita_gdp_factor" [cul_scope_id=0,name=per_capita_gdp_factor,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs="year_in,per_capita_gdp_rate_in",label="0_per_capita_gdp_factor inputs: year_in,per_capita_gdp_rate_in"] "0_per_capita_gdp" [cul_scope_id=0,name=per_capita_gdp,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs="per_capita_gdp_2023_in,year_in,per_capita_gdp_rate_in",label="0_per_capita_gdp inputs: per_capita_gdp_2023_in,year_in,per_capita_gdp_rate_in"] "0_energy_intensity_factor" [cul_scope_id=0,name=energy_intensity_factor,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs="year_in,energy_intensity_rate_in",label="0_energy_intensity_factor inputs: year_in,energy_intensity_rate_in"] "0_energy_intensity" [cul_scope_id=0,name=energy_intensity,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs="energy_intensity_2023_in,year_in,energy_intensity_rate_in",label="0_energy_intensity inputs: energy_intensity_2023_in,year_in,energy_intensity_rate_in"] "0_carbon_intensity_factor" [cul_scope_id=0,name=carbon_intensity_factor,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs="year_in,carbon_intensity_rate_in",label="0_carbon_intensity_factor inputs: year_in,carbon_intensity_rate_in"] "0_carbon_intensity" [cul_scope_id=0,name=carbon_intensity,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs="carbon_intensity_2023_in,year_in,carbon_intensity_rate_in",label="0_carbon_intensity inputs: carbon_intensity_2023_in,year_in,carbon_intensity_rate_in"] "0_technology_factor" [cul_scope_id=0,name=technology_factor,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs="year_in,energy_intensity_rate_in,carbon_intensity_rate_in",label="0_technology_factor inputs: year_in,energy_intensity_rate_in,carbon_intensity_rate_in"] "0_income_factor" [cul_scope_id=0,name=income_factor,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs="year_in,per_capita_gdp_rate_in",label="0_income_factor inputs: year_in,per_capita_gdp_rate_in"] "0_carbon_emissions" [cul_scope_id=0,name=carbon_emissions,cul_source_scope_id=0,reason=definition,loc="[object Object]",inputs="year_in,population_2023_in,population_2050_in,population_2100_in,per_capita_gdp_2023_in,per_capita_gdp_rate_in,energy_intensity_2023_in,energy_intensity_rate_in,carbon_intensity_2023_in,carbon_intensity_rate_in",label="0_carbon_emissions inputs: year_in,population_2023_in,population_2050_in,population_2100_in,per_capita_gdp_2023_in,per_capita_gdp_rate_in,energy_intensity_2023_in,energy_intensity_rate_in,carbon_intensity_2023_in,carbon_intensity_rate_in"] "0_year_in" -> "0_year" [value="[object Object]",label="input +year_in"] "0_population_2023_in" -> "0_population_2023" [value="[object Object]",label="input +population_2023_in"] "0_population_2050_in" -> "0_population_2050" [value="[object Object]",label="input +population_2050_in"] "0_population_2100_in" -> "0_population_2100" [value="[object Object]",label="input +population_2100_in"] "0_year" -> "0_population" [value="[object Object]",label="call -"] "0_population_2023" -> "0_population" [value="[object Object]",label="call -"] "0_population_2050" -> "0_population" [value="[object Object]",label="call -"] "0_population_2100" -> "0_population" [value="[object Object]",label="call -"]Show 32 truncated lines
%0 cluster_0 inputs 0_carbon_intensity_2023_in 0_carbon_intensity_2023_in inputs: carbon_intensity_2023_in 0_carbon_intensity_2023 0_carbon_intensity_2023 inputs: carbon_intensity_2023_in 0_carbon_intensity_2023_in->0_carbon_intensity_2023 input +carbon_intensity_2023_in 0_carbon_intensity 0_carbon_intensity inputs: carbon_intensity_2023_in,year_in,carbon_intensity_rate_in 0_carbon_intensity_2023->0_carbon_intensity call - 0_carbon_intensity_rate_in 0_carbon_intensity_rate_in inputs: carbon_intensity_rate_in 0_carbon_intensity_rate 0_carbon_intensity_rate inputs: carbon_intensity_rate_in 0_carbon_intensity_rate_in->0_carbon_intensity_rate input +carbon_intensity_rate_in 0_carbon_intensity_factor 0_carbon_intensity_factor inputs: year_in,carbon_intensity_rate_in 0_carbon_intensity_rate->0_carbon_intensity_factor call - 0_energy_intensity_2023_in 0_energy_intensity_2023_in inputs: energy_intensity_2023_in 0_energy_intensity_2023 0_energy_intensity_2023 inputs: energy_intensity_2023_in 0_energy_intensity_2023_in->0_energy_intensity_2023 input +energy_intensity_2023_in 0_energy_intensity 0_energy_intensity inputs: energy_intensity_2023_in,year_in,energy_intensity_rate_in 0_energy_intensity_2023->0_energy_intensity call - 0_energy_intensity_rate_in 0_energy_intensity_rate_in inputs: energy_intensity_rate_in 0_energy_intensity_rate 0_energy_intensity_rate inputs: energy_intensity_rate_in 0_energy_intensity_rate_in->0_energy_intensity_rate input +energy_intensity_rate_in 0_energy_intensity_factor 0_energy_intensity_factor inputs: year_in,energy_intensity_rate_in 0_energy_intensity_rate->0_energy_intensity_factor call - 0_per_capita_gdp_2023_in 0_per_capita_gdp_2023_in inputs: per_capita_gdp_2023_in 0_per_capita_gdp_2023 0_per_capita_gdp_2023 inputs: per_capita_gdp_2023_in 0_per_capita_gdp_2023_in->0_per_capita_gdp_2023 input +per_capita_gdp_2023_in 0_per_capita_gdp 0_per_capita_gdp inputs: per_capita_gdp_2023_in,year_in,per_capita_gdp_rate_in 0_per_capita_gdp_2023->0_per_capita_gdp call - 0_per_capita_gdp_rate_in 0_per_capita_gdp_rate_in inputs: per_capita_gdp_rate_in 0_per_capita_gdp_rate 0_per_capita_gdp_rate inputs: per_capita_gdp_rate_in 0_per_capita_gdp_rate_in->0_per_capita_gdp_rate input +per_capita_gdp_rate_in 0_per_capita_gdp_factor 0_per_capita_gdp_factor inputs: year_in,per_capita_gdp_rate_in 0_per_capita_gdp_rate->0_per_capita_gdp_factor call - 0_population_2023_in 0_population_2023_in inputs: population_2023_in 0_population_2023 0_population_2023 inputs: population_2023_in 0_population_2023_in->0_population_2023 input +population_2023_in 0_population 0_population inputs: year_in,population_2023_in,population_2050_in,population_2100_in 0_population_2023->0_population call - 0_population_factor 0_population_factor inputs: year_in,population_2023_in,population_2050_in,population_2100_in 0_population_2023->0_population_factor call - 0_population_2050_in 0_population_2050_in inputs: population_2050_in 0_population_2050 0_population_2050 inputs: population_2050_in 0_population_2050_in->0_population_2050 input +population_2050_in 0_population_2050->0_population call - 0_population_2100_in 0_population_2100_in inputs: population_2100_in 0_population_2100 0_population_2100 inputs: population_2100_in 0_population_2100_in->0_population_2100 input +population_2100_in 0_population_2100->0_population call - 0_year_in 0_year_in inputs: year_in 0_year 0_year inputs: year_in 0_year_in->0_year input +year_in 0_year->0_population call - 0_year->0_per_capita_gdp_factor call - 0_year->0_energy_intensity_factor call - 0_year->0_carbon_intensity_factor call - 0_population->0_population_factor call - 0_carbon_emissions 0_carbon_emissions inputs: year_in,population_2023_in,population_2050_in,population_2100_in,per_capita_gdp_2023_in,per_capita_gdp_rate_in,energy_intensity_2023_in,energy_intensity_rate_in,carbon_intensity_2023_in,carbon_intensity_rate_in 0_population->0_carbon_emissions call - 0_per_capita_gdp_factor->0_per_capita_gdp_factor call -year_in 0_per_capita_gdp_factor->0_per_capita_gdp call - 0_income_factor 0_income_factor inputs: year_in,per_capita_gdp_rate_in 0_per_capita_gdp_factor->0_income_factor call - 0_per_capita_gdp->0_carbon_emissions call - 0_energy_intensity_factor->0_energy_intensity_factor call -year_in 0_energy_intensity_factor->0_energy_intensity call - 0_technology_factor 0_technology_factor inputs: year_in,energy_intensity_rate_in,carbon_intensity_rate_in 0_energy_intensity_factor->0_technology_factor call - 0_energy_intensity->0_carbon_emissions call - 0_carbon_intensity_factor->0_carbon_intensity_factor call -year_in 0_carbon_intensity_factor->0_carbon_intensity call - 0_carbon_intensity_factor->0_technology_factor call - 0_carbon_intensity->0_carbon_emissions call -
population = ({ year_in, population_2023_in, population_2050_in, population_2100_in }) => {
  if (year({ year_in }) <= 2023) return population_2023({ population_2023_in });else
  if (year({ year_in }) <= 2050)
  return (
    population_2023({ population_2023_in }) +
    (population_2050({ population_2050_in }) - population_2023({ population_2023_in })) * (year({ year_in }) - 2023) / (
    2050 - 2023));else


  return (
    population_2050({ population_2050_in }) +
    (population_2100({ population_2100_in }) - population_2050({ population_2050_in })) * (year({ year_in }) - 2050) / (
    2100 - 2050));

};

population_factor = ({ year_in, population_2023_in, population_2050_in, population_2100_in }) => population({ year_in, population_2023_in, population_2050_in, population_2100_in }) / population_2023({ population_2023_in });

per_capita_gdp_factor = ({ year_in, per_capita_gdp_rate_in }) => {
  if (year({ year_in }) <= 2023) return 1;else

  return (
    per_capita_gdp_factor({ per_capita_gdp_rate_in, year_in: year({ year_in }) - 1 }) * (
    1 + per_capita_gdp_rate({ per_capita_gdp_rate_in })));

};

per_capita_gdp = ({ per_capita_gdp_2023_in, year_in, per_capita_gdp_rate_in }) =>
per_capita_gdp_2023({ per_capita_gdp_2023_in }) * per_capita_gdp_factor({ year_in, per_capita_gdp_rate_in });

energy_intensity_factor = ({ year_in, energy_intensity_rate_in }) => {
  // energy intensity of economy

  if (year({ year_in }) <= 2023) return 1;else

  return (
    energy_intensity_factor({ energy_intensity_rate_in, year_in: year({ year_in }) - 1 }) * (
    1 + energy_intensity_rate({ energy_intensity_rate_in })));

};

energy_intensity = ({ energy_intensity_2023_in, year_in, energy_intensity_rate_in }) =>
energy_intensity_2023({ energy_intensity_2023_in }) * energy_intensity_factor({ year_in, energy_intensity_rate_in });

carbon_intensity_factor = ({ year_in, carbon_intensity_rate_in }) => {
  // carbon intensity of energy sources

  if (year({ year_in }) <= 2023) return 1;else

  return (
    carbon_intensity_factor({ carbon_intensity_rate_in, year_in: year({ year_in }) - 1 }) * (
    1 + carbon_intensity_rate({ carbon_intensity_rate_in })));

};

carbon_intensity = ({ carbon_intensity_2023_in, year_in, carbon_intensity_rate_in }) =>
carbon_intensity_2023({ carbon_intensity_2023_in }) * carbon_intensity_factor({ year_in, carbon_intensity_rate_in });

technology_factor = ({ year_in, energy_intensity_rate_in, carbon_intensity_rate_in }) =>
energy_intensity_factor({ year_in, energy_intensity_rate_in }) * carbon_intensity_factor({ year_in, carbon_intensity_rate_in });

income_factor = ({ year_in, per_capita_gdp_rate_in }) => per_capita_gdp_factor({ year_in, per_capita_gdp_rate_in });

carbon_emissions = ({ year_in, population_2023_in, population_2050_in, population_2100_in, per_capita_gdp_2023_in, per_capita_gdp_rate_in, energy_intensity_2023_in, energy_intensity_rate_in, carbon_intensity_2023_in, carbon_intensity_rate_in }) =>
population({ year_in, population_2023_in, population_2050_in, population_2100_in }) * per_capita_gdp({ per_capita_gdp_2023_in, year_in, per_capita_gdp_rate_in }) * energy_intensity({ energy_intensity_2023_in, year_in, energy_intensity_rate_in }) * carbon_intensity({ carbon_intensity_2023_in, year_in, carbon_intensity_rate_in });
raw = "nomemo"
population_2023_inpopulation_2050_inpopulation_2100_inper_capita_gdp_2023_inenergy_intensity_2023_incarbon_intensity_2023_inper_capita_gdp_rate_inenergy_intensity_rate_incarbon_intensity_rate_inyear_informulavalue
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,023carbon_emissions38,237,760,000,000
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,023population_factor1
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,023per_capita_gdp_factor1
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,023energy_intensity_factor1
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,023carbon_intensity_factor1
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,030carbon_emissions37,923,539,881,066.43
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,030population_factor1.065
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,030per_capita_gdp_factor1.072
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,030energy_intensity_factor0.932
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,030carbon_intensity_factor0.932
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,050carbon_emissions36,339,592,789,115.5
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,050population_factor1.25
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,050per_capita_gdp_factor1.308
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,050energy_intensity_factor0.762
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,050carbon_intensity_factor0.762
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,070carbon_emissions30,849,537,347,483.902
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,070population_factor1.3
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,070per_capita_gdp_factor1.596
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,070energy_intensity_factor0.624
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,070carbon_intensity_factor0.624
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,090carbon_emissions26,150,158,830,197.906
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,090population_factor1.35
8,000,000,00010,000,000,00011,000,000,00015,3001.420.220.01-0.01-0.012,090per_capita_gdp_factor1.948
OJS Runtime Error

spec_post_process is not defined

.

.

.

.

You may ignore notebook workings below this line

debug

formula must be defined in here:
OJS Error

TypeError: input_combos_projection is not a function

Object {population_2023_in: Array(1), population_2050_in: Array(1), population_2100_in: Array(1), per_capita_gdp_2023_in: Array(1), energy_intensity_2023_in: Array(1), carbon_intensity_2023_in: Array(1), per_capita_gdp_rate_in: Array(1), energy_intensity_rate_in: Array(1), carbon_intensity_rate_in: Array(1), year_in: Array(6), formulae: Array(5)}
Object {cul_functions: Object, cul_links: Array(48), cul_scope_ids_to_resource: Object, import_sources_to_resource: Object, cul_input_map: Object, dot: "digraph {\n \"0_year\" [cul_scope_id=0,name=year,cul…ions\" [value=\"[object Object]\",label=\"call -\"]\n}\n"}
Array(11) ["population", "population_factor", "per_capita_gdp_factor", "per_capita_gdp", "energy_intensity_factor", "energy_intensity", "carbon_intensity_factor", "carbon_intensity", "technology_factor", "income_factor", "carbon_emissions"]
Object {year_in: Array(6), formulae: Array(5)}
Object {population_2023_in: 8000000000, population_2050_in: 10000000000, population_2100_in: 11000000000, per_capita_gdp_2023_in: 15300, energy_intensity_2023_in: 1.42, carbon_intensity_2023_in: 0.22, per_capita_gdp_rate_in: 0.01, energy_intensity_rate_in: -0.01, carbon_intensity_rate_in: -0.01}
here
Object {year_in: Array(6), formulae: Array(5)}
Object {population_2023_in: Array(1), population_2050_in: Array(1), population_2100_in: Array(1), per_capita_gdp_2023_in: Array(1), energy_intensity_2023_in: Array(1), carbon_intensity_2023_in: Array(1), per_capita_gdp_rate_in: Array(1), energy_intensity_rate_in: Array(1), carbon_intensity_rate_in: Array(1), year_in: Array(6), formulae: Array(5)}
Array(30) [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, …]
Array(2) ["year_in", "formulae"]
Array(30) [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, …]
encodings:
Array(4) [Object, Object, Object, Object]

other

formulae = Array(11) ["population", "population_factor", "per_capita_gdp_factor", "per_capita_gdp", "energy_intensity_factor", "energy_intensity", "carbon_intensity_factor", "carbon_intensity", "technology_factor", "income_factor", "carbon_emissions"]
formulae_next = Array(11) ["population", "population_factor", "per_capita_gdp_factor", "per_capita_gdp", "energy_intensity_factor", "energy_intensity", "carbon_intensity_factor", "carbon_intensity", "technology_factor", "income_factor", "carbon_emissions"]
formulae_objs = Array(11) [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]
mutable inputs_history = Mutable {}
inputs_history = Array(1) [Object]
Object {year_in: Array(6), formulae: Array(5)}
input_domains = Object {year_in: Array(6), formulae: Array(5)}
input_domains_next = Object {year_in: Array(6), formulae: Array(5)}
input_combos_projection = Array(30) [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, …]
input_combos_projection_next = Array(30) [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, …]
projection_fn = ƒ(…)
projection = Array(30) [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, …]
projection_next = Array(30) [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, …]
inputs = Array(10) ["carbon_intensity_2023_in", "carbon_intensity_rate_in", "energy_intensity_2023_in", "energy_intensity_rate_in", "per_capita_gdp_2023_in", "per_capita_gdp_rate_in", "population_2023_in", "population_2050_in", "population_2100_in", "year_in"]
inputs_next = Array(10) ["carbon_intensity_2023_in", "carbon_intensity_rate_in", "energy_intensity_2023_in", "energy_intensity_rate_in", "per_capita_gdp_2023_in", "per_capita_gdp_rate_in", "population_2023_in", "population_2050_in", "population_2100_in", "year_in"]
input_domains_projection = Object {population_2023_in: Array(1), population_2050_in: Array(1), population_2100_in: Array(1), per_capita_gdp_2023_in: Array(1), energy_intensity_2023_in: Array(1), carbon_intensity_2023_in: Array(1), per_capita_gdp_rate_in: Array(1), energy_intensity_rate_in: Array(1), carbon_intensity_rate_in: Array(1), year_in: Array(6), formulae: Array(5)}
input_domains_projection_next = Object {population_2023_in: Array(1), population_2050_in: Array(1), population_2100_in: Array(1), per_capita_gdp_2023_in: Array(1), energy_intensity_2023_in: Array(1), carbon_intensity_2023_in: Array(1), per_capita_gdp_rate_in: Array(1), energy_intensity_rate_in: Array(1), carbon_intensity_rate_in: Array(1), year_in: Array(6), formulae: Array(5)}
cartesianProduct = ƒ(input, current)
copy = ƒ(obj)
json2csv = Object {AsyncParser: ƒ(opts, transformOpts), Parser: ƒ(opts), Transform: ƒ(opts, transformOpts), default: Object, parse: ƒ(data, opts), parseAsync: ƒ(data, opts, transformOpts), transforms: Object}
serialize = ƒ(data)
serializeJSON = ƒ(data)
OJS Runtime Error

mapped_0 is not defined

encodings = Array(4) [Object, Object, Object, Object]
OJS Runtime Error

spec_0 is not defined

OJS Runtime Error

spec_0 is not defined

OJS Runtime Error

spec_0 is not defined

OJS Runtime Error

spec_0 is not defined

serializeSVG = ƒ(svg)
  import {inputs_default as inputs_default} from "./kaya.ojs"
  import {viewof ui as viewof ui, ui as ui} with {uis as uis, introspection as introspection, mutable inputs_history as mutable inputs_history, inputs_history as inputs_history} from "./kaya.ojs"
  import {introspection as introspection_0, spec_post_process as spec_post_process, viewof field as viewof field, field as field, uis as uis_0, spec as spec_0, mapped as mapped_0} from "./kaya.ojs"
  import {domains as domains_0} with {viewof ui as viewof ui, ui as ui} from "./kaya.ojs"
model_0 = Module {year$m: ƒ(key), year: ƒ(a), population_2023$m: ƒ(key), population_2023: ƒ(a), population_2050$m: ƒ(key), population_2050: ƒ(a), population_2100$m: ƒ(key), population_2100: ƒ(a), population$m: ƒ(key), population: ƒ(a), population_factor$m: ƒ(key), population_factor: ƒ(a), per_capita_gdp_2023$m: ƒ(key), per_capita_gdp_2023: ƒ(a), per_capita_gdp_rate$m: ƒ(key), per_capita_gdp_rate: ƒ(a), per_capita_gdp_factor$m: ƒ(key), per_capita_gdp_factor: ƒ(a), per_capita_gdp$m: ƒ(key), per_capita_gdp: ƒ(a), …}
cul_0_0 = `export const year = () => year_in; // modelling population linearly between some points: export const population_2023 = () => population_2023_in; export const population_2050 = () => population_2050_in; export const population_2100 = () => population_2100_in; export const population = () => { if (year() <= 2023) return population_2023(); else if (year() <= 2050) return ( population_2023() + ((population_2050() - population_2023()) * (year() - 2023)) / (2050 - 2023) ); else return ( population_2050() + ((population_2100() - population_2050()) * (year() - 2050)) /Show 73 truncated lines
esm_0_0 = `export const year = ({ year_in }) => year_in; // modelling population linearly between some points: export const population_2023 = ({ population_2023_in }) => population_2023_in; export const population_2050 = ({ population_2050_in }) => population_2050_in; export const population_2100 = ({ population_2100_in }) => population_2100_in; export const population = ({ year_in, population_2023_in, population_2050_in, population_2100_in }) => { if (year({ year_in }) <= 2023) return population_2023({ population_2023_in });else if (year({ year_in }) <= 2050) return ( population_2023({ population_2023_in }) + (population_2050({ population_2050_in }) - population_2023({ population_2023_in })) * (year({ year_in }) - 2023) / ( 2050 - 2023));else return ( population_2050({ population_2050_in }) + (population_2100({ population_2100_in }) - population_2050({ population_2050_in })) * (year({ year_in }) - 2050) / (Show 72 truncated lines
models = Array(1) [Module]
uis1 = Array(1) [Object]
specs = Array(1) [Object]
cul_0s = Array(1) ["export const year = () => year_in;\n\n// modelling p…gdp() * energy_intensity() * carbon_intensity();\n"]
esm_0s = Array(1) ["export const year = ({ year_in }) => year_in;\n\n// …ty_2023_in, year_in, carbon_intensity_rate_in });"]
introspections = Array(1) [Object]
domains1 = Array(1) [Object]
mappeds = Array(1) [Array(2)]
step = 0
shadow_step = 0
step_next = 0
emojis = Array(7) ["⏮️", "➡️1️⃣", "➡️2️⃣", "➡️3️⃣", "➡️4️⃣", "➡️5️⃣", "➡️6️⃣"]
model = Module {year$m: ƒ(key), year: ƒ(a), population_2023$m: ƒ(key), population_2023: ƒ(a), population_2050$m: ƒ(key), population_2050: ƒ(a), population_2100$m: ƒ(key), population_2100: ƒ(a), population$m: ƒ(key), population: ƒ(a), population_factor$m: ƒ(key), population_factor: ƒ(a), per_capita_gdp_2023$m: ƒ(key), per_capita_gdp_2023: ƒ(a), per_capita_gdp_rate$m: ƒ(key), per_capita_gdp_rate: ƒ(a), per_capita_gdp_factor$m: ƒ(key), per_capita_gdp_factor: ƒ(a), per_capita_gdp$m: ƒ(key), per_capita_gdp: ƒ(a), …}
uis = Object {population_2023_in: HTMLFormElement, population_2050_in: HTMLFormElement, population_2100_in: HTMLFormElement, per_capita_gdp_2023_in: HTMLFormElement, energy_intensity_2023_in: HTMLFormElement, carbon_intensity_2023_in: HTMLFormElement, per_capita_gdp_rate_in: HTMLFormElement, energy_intensity_rate_in: HTMLFormElement, carbon_intensity_rate_in: HTMLFormElement}
spec = Object {mark: "text", height: 40, channels: Object}
cul_0 = `export const year = () => year_in; // modelling population linearly between some points: export const population_2023 = () => population_2023_in; export const population_2050 = () => population_2050_in; export const population_2100 = () => population_2100_in; export const population = () => { if (year() <= 2023) return population_2023(); else if (year() <= 2050) return ( population_2023() + ((population_2050() - population_2023()) * (year() - 2023)) / (2050 - 2023) ); else return ( population_2050() + ((population_2100() - population_2050()) * (year() - 2050)) /Show 73 truncated lines
esm_0 = `export const year = ({ year_in }) => year_in; // modelling population linearly between some points: export const population_2023 = ({ population_2023_in }) => population_2023_in; export const population_2050 = ({ population_2050_in }) => population_2050_in; export const population_2100 = ({ population_2100_in }) => population_2100_in; export const population = ({ year_in, population_2023_in, population_2050_in, population_2100_in }) => { if (year({ year_in }) <= 2023) return population_2023({ population_2023_in });else if (year({ year_in }) <= 2050) return ( population_2023({ population_2023_in }) + (population_2050({ population_2050_in }) - population_2023({ population_2023_in })) * (year({ year_in }) - 2023) / ( 2050 - 2023));else return ( population_2050({ population_2050_in }) + (population_2100({ population_2100_in }) - population_2050({ population_2050_in })) * (year({ year_in }) - 2050) / (Show 72 truncated lines
introspection = Object {cul_functions: Object, cul_links: Array(48), cul_scope_ids_to_resource: Object, import_sources_to_resource: Object, cul_input_map: Object, dot: "digraph {\n \"0_year\" [cul_scope_id=0,name=year,cul…ions\" [value=\"[object Object]\",label=\"call -\"]\n}\n"}
domains = Object {year_in: Array(6), formulae: Array(5)}
mapped = Array(2) ["year_in", "formulae"]
domains_next = Object {year_in: Array(6), formulae: Array(5)}
mapped_next = Array(2) ["year_in", "formulae"]
model_next = Module {year$m: ƒ(key), year: ƒ(a), population_2023$m: ƒ(key), population_2023: ƒ(a), population_2050$m: ƒ(key), population_2050: ƒ(a), population_2100$m: ƒ(key), population_2100: ƒ(a), population$m: ƒ(key), population: ƒ(a), population_factor$m: ƒ(key), population_factor: ƒ(a), per_capita_gdp_2023$m: ƒ(key), per_capita_gdp_2023: ƒ(a), per_capita_gdp_rate$m: ƒ(key), per_capita_gdp_rate: ƒ(a), per_capita_gdp_factor$m: ƒ(key), per_capita_gdp_factor: ƒ(a), per_capita_gdp$m: ƒ(key), per_capita_gdp: ƒ(a), …}
introspection_next = Object {cul_functions: Object, cul_links: Array(48), cul_scope_ids_to_resource: Object, import_sources_to_resource: Object, cul_input_map: Object, dot: "digraph {\n \"0_year\" [cul_scope_id=0,name=year,cul…ions\" [value=\"[object Object]\",label=\"call -\"]\n}\n"}
|