-
Notifications
You must be signed in to change notification settings - Fork 0
/
climate_financing_yearly.pug
66 lines (55 loc) · 2.66 KB
/
climate_financing_yearly.pug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
doctype html
html(lang="en")
head
meta(charset="utf-8")
link(href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous")
title Climate financing yearly
link(rel="stylesheet", type="text/css", href="public/style.css")
body.text-responsive
include includes/header.pug
script(src="js/climate_financing_yearly.js" type="module")
include includes/mixins.pug
div.d-flex.flex-column.flex-lg-row.justify-content-center
// Input
div(class="d-flex flex-wrap justify-content-center mb-4", style="margin:0 auto").py-3.px-3
.flex-column
div
|Annual climate finance needed to replace coal with
<br>
|renewables.
+cfUnitAnnual("Billion dollars")
include includes/common_user_inputs.pug
+energyStorage
label(for="by-region").form-label= Region
select(id="by-region", onchange="calculate()").form-select.w-80
optgroup(label="Level of development")
- var vals = ["World", "Developed Countries", "Developing Countries", "Emerging Market Countries"]
each val in vals
- var isSelected = "World" == val
option(selected= isSelected)= val
optgroup(label="Region")
- var vals = ["Asia", "Africa", "North America", "Latin America & the Carribean", "Europe", "Australia & New Zealand"]
each val in vals
option= val
//optgroup(label="Country")#all-countries
+coalExport
// Output
div#timeseries(style="@media (min-width: 1200px) {width:60%; margin:0 auto;}").mx-auto.py-3.px-3
// Data
.px-3.mb-3
+resultDataDownloadCSV
script(src="https://cdn.jsdelivr.net/npm/d3@7")
script(src="https://cdn.jsdelivr.net/npm/@observablehq/[email protected]")
script(src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous")
// Needed to enable Bootstrap tooltips
script(src="js/enable_tooltips.js")
script(type="module").
import {iso3166} from "./js/iso-3166-data.js"
import {calculate} from "./js/climate_financing_yearly.js"
window.calculate = calculate
calculate()
// Insert all countries into the region selector dropdown
//const allCountries = document.getElementById("all-countries")
//for (const e of iso3166) {
// allCountries.appendChild(new Option(e.name, e["alpha-2"]))
//}