SPB Git forge

spb/countryatlas

Public
20commits 1branches 0releases
268.3 MBsize
maindefault branch
12 days agolast push
TypeScript 57% Python 38.6% JavaScript 3.6% CSS 0.6%
4.2 KB · 104 lines yaml
Raw Blame History
1# Insight templates (ARCHITECTURE §7). Every number is computed from the snapshot; the text is a plain template.2#3# kinds:4#   change_since   value at `since` (nearest year within ±3) vs latest → {v0} {v1} {y0} {y1} {delta} {pct} {abs_delta} {abs_pct}5#                  {verb} = grew|fell (up|down for `verb_style: updown`, rose|declined for `verb_style: rise`)6#   rank_in_group  rank of the country's latest value among the group's members for the same year → {rank} {n} {group} {v1} {y1}7#                  group ∈ world | region | income | <group id such as oecd, eu, g20>; needs ≥ `min_n` members with data8#   vs_median      latest value vs the group's median for the same year → {median} {ratio} {diff} {above_below} {v1} {y1}9#   avg_growth     mean of the indicator over [from, latest] (for growth-rate indicators) → {avg} {y0} {y1} {n_years}10# Placeholders {country} and {indicator} are always available. Values are formatted with the indicator's format/unit.11templates:12  - id: population-since-200013    kind: change_since14    indicator: population15    since: 200016    verb_style: grow17    text: "{country}'s population {verb} {abs_pct} between {y0} and {y1}, from {v0} to {v1}."18  - id: gdp-per-capita-since-200019    kind: change_since20    indicator: gdp-per-capita21    since: 200022    verb_style: rise23    text: "GDP per capita {verb} from {v0} in {y0} to {v1} in {y1} ({signed_pct} in current US dollars)."24  - id: gdp-growth-decade-average25    kind: avg_growth26    indicator: gdp-growth27    from: 201428    text: "GDP grew {avg} a year on average over {y0}–{y1}."29  - id: gdp-per-capita-rank-oecd30    kind: rank_in_group31    indicator: gdp-per-capita-ppp32    group: oecd33    min_n: 2034    text: "{country} ranks {rank} of {n} OECD members for GDP per capita (PPP), at {v1} in {y1}."35  - id: gdp-per-capita-rank-region36    kind: rank_in_group37    indicator: gdp-per-capita-ppp38    group: region39    min_n: 540    text: "Within {group}, {country} ranks {rank} of {n} for GDP per capita (PPP) ({v1}, {y1})."41  - id: life-expectancy-rank-region42    kind: rank_in_group43    indicator: life-expectancy44    group: region45    min_n: 546    text: "Life expectancy of {v1} ranks {rank} of {n} in {group} ({y1})."47  - id: life-expectancy-since-200048    kind: change_since49    indicator: life-expectancy50    since: 200051    verb_style: gain52    text: "Life expectancy {verb} {abs_delta} since {y0}, from {v0} to {v1} in {y1}."53  - id: renewables-since-201054    kind: change_since55    indicator: renewable-electricity-share56    since: 201057    verb_style: rise58    text: "Renewables' share of electricity generation {verb} from {v0} in {y0} to {v1} in {y1} ({signed_delta} points)."59  - id: urbanisation-since-200060    kind: change_since61    indicator: urban-population-share62    since: 200063    verb_style: rise64    text: "{v1} of the population lived in urban areas in {y1}, compared with {v0} in {y0}."65  - id: debt-since-201066    kind: change_since67    indicator: government-debt-pct-gdp68    since: 201069    verb_style: rise70    text: "Central government debt {verb} from {v0} of GDP in {y0} to {v1} in {y1}."71  - id: co2-per-capita-vs-world72    kind: vs_median73    indicator: co2-per-capita74    group: world75    text: "CO₂ emissions of {v1} per person are {ratio} the world median of {median} ({y1})."76  - id: median-age-rank-world77    kind: rank_in_group78    indicator: median-age79    group: world80    min_n: 5081    text: "With a median age of {v1}, {country} ranks {rank} of {n} countries worldwide ({y1})."82  - id: internet-users-since-201083    kind: change_since84    indicator: internet-users85    since: 201086    verb_style: rise87    text: "{v1} of people used the internet in {y1}, up from {v0} in {y0}."88  - id: unemployment-vs-region89    kind: vs_median90    indicator: unemployment-rate91    group: region92    text: "Unemployment of {v1} in {y1} is {above_below} the {group} median of {median}."93  - id: trade-vs-world94    kind: vs_median95    indicator: trade-pct-gdp96    group: world97    text: "Trade is worth {v1} of GDP ({y1}), {above_below} the world median of {median}."98  - id: fertility-since-200099    kind: change_since100    indicator: fertility-rate101    since: 2000102    verb_style: rise103    text: "The fertility rate {verb} from {v0} in {y0} to {v1} in {y1}."104