Data analysis · Intermediate · 20 min
Check what the energy data can and cannot show
By Padding · Updated 18 Nov 2026
Python 3.15.2 · pandas 3.1.1 · pyarrow 26.0.1 · uv 0.13 (checked on python:3.15-slim)
You will test each headline from the energy analysis against coverage changes, an older release of the data, population growth, missing measures and different start years, and end with a numbered caveats list in notes.md.
On this page
By now the analysis has numbers that read like conclusions. Northern Africa doubled its electricity generation per person between 2000 and 2024. Southern Africa fell by 13 per cent. Africa as a whole rose by 19 per cent. Before any of that goes into a report, find out how solid each figure is. A trend can come from countries joining or leaving the data, from a revision in the next release, from population growth rather than electricity, or from the year you happened to start counting.
This part runs six checks, each a short script, and writes what they find into notes.md as a numbered caveats list. Part 8 publishes the report with those caveats beside the charts. None of the checks changes your data: they all read the files you already have, plus one older release of the dataset, which you download at a second pinned commit.
You keep working in ~/energy-demo. New output goes into a checks/ folder.
Step 1 · Write down the headlines you want to test
A check needs a target. Start by computing the headline figures in one place, the same way part 4 did: kWh per person as total generation over total population, never an average of country values. Put that rule in a small module, pooled.py, so every check in this part pools countries in exactly the same way:
cd ~/energy-demo
uv run check_raw.py
mkdir -p checks
cat > pooled.py <<'PY'
"""Shared helpers for part 7: load the joined table and pool countries."""
import pandas as pd
FIRST, LAST = 2000, 2024 # part 4: 2025 covers only 7 countries
def load(path="clean/energy_africa.parquet"):
"""Country rows from FIRST to LAST that have both generation and population."""
df = pd.read_parquet(path)
df = df[df["year"].between(FIRST, LAST)]
return df.dropna(subset=["generation_twh", "population"])
def per_person(df, by):
"""kWh per person as a ratio of sums: total TWh x 1e9 / total people."""
sums = df.groupby(by)[["generation_twh", "population"]].sum()
return sums["generation_twh"] * 1e9 / sums["population"]
PYNow list the headlines: each subregion and Africa as a whole, in the first and last year, with the change between them:
cd ~/energy-demo
cat > headlines.py <<'PY'
import pandas as pd
from pooled import FIRST, LAST, load, per_person
df = load()
africa = per_person(df, "year")
regions = per_person(df, ["subregion", "year"]).unstack("year")
regions.loc["Africa"] = africa
table = pd.DataFrame({
f"kwh_{FIRST}": regions[FIRST],
f"kwh_{LAST}": regions[LAST],
"change_pct": (regions[LAST] / regions[FIRST] - 1) * 100,
})
print(table.round(1).to_string())
table.round(1).to_csv("checks/headlines.csv")
PY
uv run headlines.pyThese six numbers are what a reader would quote. Every check below asks the same question of them: does the number survive if you change one assumption?
Check it worked
check_raw.py prints OK twice. The table has six rows. Northern Africa reads 803.8 1645.7 104.7, Southern Africa 3988.6 3461.9 -13.2, Eastern Africa 162.2 229.5 41.5 and Africa 535.3 638.7 19.3. checks/headlines.csv holds the same table.
Step 2 · Find coverage changes that drive a trend
A regional figure is only comparable over time if it covers the same countries each year. When a country joins or leaves, the total jumps, and the jump looks like a change in electricity. This is why the checks read clean/energy_africa.parquet rather than clean/energy_regions.parquet: part 3's regional-totals table keeps South Sudan and Western Sahara, which part 2 dropped from the country table for having too few years, so their arrival and departure show up here instead of being decided in advance. Count the countries in each subregion and year, then compute each trend twice: once with every country that reports, and once with only the countries present in all 25 years:
cd ~/energy-demo
cat > coverage.py <<'PY'
import pandas as pd
from pooled import FIRST, LAST, load, per_person
df = load()
n_years = LAST - FIRST + 1
# Countries in each subregion and year: a change in this count is a change in what you measure.
counts = df.groupby(["subregion", "year"])["iso_code"].nunique().unstack("subregion")
changes = counts[counts.diff().fillna(0).ne(0).any(axis=1)]
print("years where the number of countries changes:")
print(changes.to_string())
years = df.groupby("iso_code")["year"].nunique()
complete = years[years == n_years].index
gaps = df[~df["iso_code"].isin(complete)].groupby("country")["year"].agg(["min", "max", "count"])
print()
print(f"countries without all {n_years} years:")
print(gaps.to_string())
every = per_person(df, ["subregion", "year"]).unstack("year")
same = per_person(df[df["iso_code"].isin(complete)], ["subregion", "year"]).unstack("year")
compare = pd.DataFrame({
"every_country_pct": (every[LAST] / every[FIRST] - 1) * 100,
"same_countries_pct": (same[LAST] / same[FIRST] - 1) * 100,
}).round(1)
compare["difference"] = compare["same_countries_pct"] - compare["every_country_pct"]
print()
print(f"change in kWh per person, {FIRST} to {LAST}")
print(compare.to_string())
east = pd.DataFrame({"every_country": every.loc["Eastern Africa"],
"same_countries": same.loc["Eastern Africa"]})
print()
print("Eastern Africa, kWh per person")
print(east.loc[2010:2013].round(1).to_string())
PY
uv run coverage.pyThree moments change the country list. Western Sahara stops reporting generation after 2009. South Sudan enters Eastern Africa in 2012, with about 10.8 million people and 0.44 TWh, which pulls the regional figure down from 203.7 to 198.9 kWh even though the countries already there did not change (the same-countries line stays at 196.4). In 2024, five places have no figures yet: Comoros, Reunion, Saint Helena, Sao Tome and Principe, and the Central African Republic. Reunion is an island with high generation per person; the Central African Republic, with about 5 million people, has low generation.
The effect on the headlines is uneven. Northern, Southern and Western Africa barely move. Eastern Africa's rise is 41.5 per cent with every country and 50.0 per cent with a fixed set, a gap of 8.5 points, because South Sudan joined at the low end and Reunion dropped out at the high end. Middle Africa goes the other way by 5.5 points. Neither version is wrong, but you must say which one you report.
Check it worked
The first table has three rows, for 2010, 2012 and 2024; the 2024 row reads 17 7 6 5 16. The second table lists seven countries, with South Sudan at 2012 2024 13. In the comparison, Eastern Africa reads 41.5 50.0 8.5 and Middle Africa 83.5 78.0 -5.5. The last table shows Eastern Africa's 2012 dip in the first column only.
Step 3 · Decide what a zero means
Look again at the 2024 row: Southern Africa still has all 5 countries. One of them is Lesotho, whose generation for 2023 and 2024 is exactly 0 TWh. Part 2 turned those zeros into missing values in clean/energy.parquet, and part 5 treated them as missing when it ranked countries, but part 3's regional-totals table keeps them as published. load() only drops empty values, so a zero passes, and every headline so far counts about 2.3 million people with no electricity at all. Measure what that choice is worth:
cd ~/energy-demo
cat > zeros.py <<'PY'
from pooled import FIRST, LAST, load, per_person
df = load()
zeros = df[df["generation_twh"] == 0]
print("populated country-years with zero generation:")
print(zeros.assign(million_people=(zeros["population"] / 1e6).round(2))
[["country", "year", "million_people"]].to_string(index=False))
# part 2's rule: a zero for a populated country is a gap, not a fact
versions = {"zeros counted": df, "zeros as gaps": df[df["generation_twh"] > 0]}
print()
for label, data in versions.items():
south = per_person(data[data["subregion"] == "Southern Africa"], "year")
africa = per_person(data, "year")
change = (south[LAST] / south[FIRST] - 1) * 100
print(f"{label}: Southern Africa {LAST} {south[LAST]:.1f} kWh, "
f"{FIRST} to {LAST} {change:.1f}%, Africa {LAST} {africa[LAST]:.1f} kWh")
PY
uv run zeros.pyOnly Lesotho's two years are affected, and only Southern Africa moves noticeably. Counting the zeros gives 3,461.9 kWh per person in 2024 and a fall of 13.2 per cent since 2000. Treating them as gaps, so Southern Africa has 4 countries in 2023 and 2024, gives 3,576.2 kWh and a fall of 10.3 per cent. Africa as a whole changes by 1 kWh.
This part keeps the zeros in every other check, so its numbers match the tables from parts 4 and 6 and the report in part 8. That is a choice, not a correction, and it goes into the caveats list with both figures. If you would rather drop them, change load() to keep only rows with generation_twh > 0 and rerun every script; the Southern Africa figures, its 2024 country count and its growth factors will all change.
Many readers will see your report as a screenshot of one table on a low-cost phone with prepaid data. Put the "with and without" figures in the same table, not in a footnote or a linked appendix.
Check it worked
The first table lists exactly two rows, Lesotho 2023 2.31 and 2024 2.34. The next two lines read 3461.9 kWh, 2000 to 2024 -13.2% with the zeros counted and 3576.2 kWh, 2000 to 2024 -10.3% with them as gaps, and Africa's 2024 figure is 638.7 against 639.7.
Step 4 · Compare two releases of the dataset
Published numbers change. A country submits late figures, an estimate is replaced by a measurement, a census resets the population. You can see this directly by comparing your file with an older release of the same dataset. The owid/energy-data repository keeps every release in its history, and the commit 7138c2f, from 14 November 2025, is the release a year before yours.
Download it next to your current file, under a name that carries the commit, and prove you have the right bytes. --compressed keeps the transfer to a few megabytes, as in part 1:
cd ~/energy-demo
OLD=7138c2f4f9315d564f8caceebe4a44c408439a5a
curl -fsSL --compressed -o raw/owid-energy-data-7138c2f.csv \
"https://raw.githubusercontent.com/owid/energy-data/$OLD/owid-energy-data.csv"
cat > check_older.py <<'PY'
import hashlib
import sys
from pathlib import Path
EXPECTED = "dd2a16d4f2b7fc061d852d072104b61a1a819d5fb5b98cd268902e91510e8c30"
actual = hashlib.sha256(Path("raw/owid-energy-data-7138c2f.csv").read_bytes()).hexdigest()
print("OK" if actual == EXPECTED else "CHANGED", "owid-energy-data-7138c2f.csv")
sys.exit(0 if actual == EXPECTED else 1)
PY
uv run check_older.py
chmod a-w raw/owid-energy-data-7138c2f.csvNow compare the two. The script keeps the same African countries in both files, matches rows on country code and year, and reports what moved:
cd ~/energy-demo
cat > revisions.py <<'PY'
import pandas as pd
from pooled import FIRST, per_person
COLUMNS = ["iso_code", "year", "population", "electricity_generation"]
codes = pd.read_parquet("clean/energy_africa.parquet")[["iso_code", "country"]].drop_duplicates()
def african(path):
df = pd.read_csv(path, usecols=COLUMNS).merge(codes, on="iso_code")
df = df[df["year"] >= FIRST].rename(columns={"electricity_generation": "generation_twh"})
return df.dropna(subset=["generation_twh", "population"])
old = african("raw/owid-energy-data-7138c2f.csv")
new = african("raw/owid-energy-data.csv")
print("countries with data, by year (old, new):")
for year in range(2021, 2026):
print(" ", year, old.loc[old["year"] == year, "iso_code"].nunique(),
new.loc[new["year"] == year, "iso_code"].nunique())
gone = new[(new["year"] == 2023) & ~new["iso_code"].isin(old.loc[old["year"] == 2023, "iso_code"])]
print("in the new 2023 but not the old:", len(gone), "countries,",
round(gone["population"].sum() / 1e6), "million people")
print(" ", ", ".join(sorted(gone["country"])))
pairs = old.merge(new, on=["iso_code", "year", "country"], suffixes=("_old", "_new"))
for column in ["population", "generation_twh"]:
pairs[column + "_pct"] = (pairs[column + "_new"] / pairs[column + "_old"] - 1) * 100
revised = pairs[pairs["generation_twh_pct"].abs() > 0.5]
print()
print("country-years in both versions:", len(pairs))
print("generation revised by more than 0.5%:", len(revised))
print(revised.groupby("year").size().tail(4).to_string())
print()
print("population revised by more than 0.5%:",
sorted(pairs.loc[pairs["population_pct"].abs() > 0.5, "country"].unique()))
togo = pairs[(pairs["iso_code"] == "TGO") & pairs["year"].isin([2000, 2023])]
print(togo[["year", "population_old", "population_new", "population_pct"]].round(1).to_string(index=False))
print()
print("Africa kWh per person, by version:")
both = pd.DataFrame({"old": per_person(old, "year"), "new": per_person(new, "year")})
print(both.loc[2021:2023].round(1).to_string())
PY
uv run revisions.pyRead the output as a picture of how this dataset matures:
- The newest year is thin. In the older release, 2023 had 44 countries and 2024 had 7. A year later, 2023 has 56. Your file's 2024, with 51 countries, is at the same stage now that 2023 was then.
- Late arrivals are not random. The 12 countries missing from the older 2023 include Chad, Madagascar, Malawi and Uganda, places with low generation per person. Leaving out 137 million people with little electricity made the older 2023 look strong: 684.3 kWh per person, up 7 per cent on 2022. The current release puts 2023 at 629.5, a small fall.
- Revisions sit at the end. 64 country-years changed generation by more than half a per cent, and 29 of them are in 2023. Figures from ten years ago hardly move.
- Population can move every year at once. Togo's population is about 11 per cent lower for 2023 in the newer release, and 7 per cent lower for 2000, so its generation per person is higher for its whole history without a single extra kilowatt-hour.
The rule this gives you: treat the last one or two years of any release as provisional, and when you quote a figure, quote the release it came from.
Check it worked
check_older.py prints OK owid-energy-data-7138c2f.csv. The comparison shows 2023 44 56 and 2024 7 51, then 12 countries and 137 million people. It reports 1337 country-years in both versions, 64 generation revisions with 29 of them in 2023, only Togo for population, and a last table ending 2023 684.3 629.5.
Step 5 · Separate population growth from electricity growth
kWh per person is a ratio, so it can rise because generation grew or because population grew more slowly than generation. Split each change into its two growth factors. Per-person growth is generation growth divided by population growth, so the three numbers always fit together:
cd ~/energy-demo
cat > population.py <<'PY'
import pandas as pd
from pooled import FIRST, LAST, load
df = load()
df["area"] = df["subregion"]
africa = df.assign(area="Africa")
sums = pd.concat([df, africa]).groupby(["area", "year"])[["generation_twh", "population"]].sum()
start = sums.xs(FIRST, level="year")
end = sums.xs(LAST, level="year")
growth = pd.DataFrame({
"generation_x": end["generation_twh"] / start["generation_twh"],
"population_x": end["population"] / start["population"],
})
# kWh per person changes by the ratio of the two growth factors.
growth["per_person_x"] = growth["generation_x"] / growth["population_x"]
growth["share_of_people_2000"] = start["population"] / start.loc["Africa", "population"] * 100
growth["share_of_people_2024"] = end["population"] / end.loc["Africa", "population"] * 100
print(f"growth factors, {FIRST} to {LAST}")
print(growth.round(2).to_string())
countries = df[df["iso_code"].isin(["NGA", "ETH", "EGY", "ZAF"]) & df["year"].isin([FIRST, LAST])]
wide = countries.pivot_table(index="country", columns="year", values=["generation_twh", "population"])
ratio = wide.xs(LAST, axis=1, level="year") / wide.xs(FIRST, axis=1, level="year")
ratio["per_person_x"] = ratio["generation_twh"] / ratio["population"]
print()
print(ratio.round(2).to_string())
PY
uv run population.pyTwo things stand out.
First, population growth hides a lot of electricity growth. Africa generated 2.18 times as much electricity in 2024 as in 2000, but it also had 1.83 times as many people, so the per-person figure rose only 1.19 times. Nigeria more than doubled its generation (2.55 times) and still gained only 38 per cent per person. A sentence like "generation per person barely moved" is true and misleading if you leave out that the system had to serve 84 per cent more people to stand still.
Second, look at the share columns. Every subregion except Southern Africa grew its per-person figure by at least 1.41 times, yet Africa as a whole managed 1.19. That is not an error. Population grew fastest where generation per person was lowest, and Southern Africa, by far the highest, fell from 6.5 to 4.9 per cent of the continent's people. When the mix of people shifts towards low-generation regions, the pooled average is dragged down even while each region improves. If you report the Africa figure, report the regional figures beside it.
Check it worked
The first table has six rows. Africa reads 2.18 1.83 1.19, Southern Africa 1.18 1.36 0.87 with shares 6.52 and 4.86, and Northern Africa 3.17 1.55 2.05. In the second table Nigeria reads 2.55 1.84 1.38 and Ethiopia 14.91 1.96 7.61.
Step 6 · Name what generation does not measure
Generation is electricity produced inside a country's borders in a year. It is not how many people are connected, how many hours a day the supply is on, or how much a household uses. Check what the dataset can tell you about those, and what it says about electricity crossing borders:
cd ~/energy-demo
cat > beyond_generation.py <<'PY'
import pandas as pd
book = pd.read_csv("raw/owid-energy-codebook.csv")
text = (book["column"] + " " + book["description"].fillna("")).str.lower()
for word in ["access", "outage", "reliab", "capacity", "import"]:
print(f"{word:9}", list(book.loc[text.str.contains(word), "column"]))
codes = pd.read_parquet("clean/energy_africa.parquet")["iso_code"].unique()
raw = pd.read_csv("raw/owid-energy-data.csv",
usecols=["country", "iso_code", "year", "electricity_generation",
"electricity_demand", "net_elec_imports_share_demand"])
y2023 = raw[raw["iso_code"].isin(codes) & (raw["year"] == 2023)]
y2023 = y2023.dropna(subset=["net_elec_imports_share_demand"])
y2023 = y2023.sort_values("net_elec_imports_share_demand", ascending=False)
cols = ["country", "electricity_generation", "electricity_demand", "net_elec_imports_share_demand"]
print()
print("biggest net importers, 2023 (share of demand, %)")
print(y2023[cols].head(5).round(2).to_string(index=False))
print()
print("biggest net exporters, 2023")
print(y2023[cols].tail(3).round(2).to_string(index=False))
print()
print("countries importing more than a quarter of demand:",
int((y2023["net_elec_imports_share_demand"] > 25).sum()), "of", len(y2023))
PY
uv run beyond_generation.pyThe codebook has no column on access, outages, reliability or installed capacity. So nothing in this analysis can say whether more Nigerians have electricity than in 2000, or whether the supply is steadier. A country can raise generation per person while most new capacity serves industry and cities, and rural households stay off the grid. Access rates and outage figures come from other sources, such as the World Bank's access to electricity indicator and its Enterprise Surveys; if your report needs them, bring them in and cite them separately.
The import columns show a second gap. In 2023 Togo generated 0.71 TWh but used 2.25 TWh, importing about two thirds of its demand, so generation per person understates its use by roughly three times. Mozambique and Zambia are the reverse: their net exports equal about a fifth of their own demand. Nine of the 56 countries imported more than a quarter of their demand. Lesotho tops the list at 100 per cent, with 0.45 TWh of demand, because its 2023 generation is the zero from the earlier step. The headlines in this part still count that zero; caveat 8 gives Southern Africa with and without it.
Check it worked
access, outage, reliab and capacity each print an empty list, and import lists two columns. The importers table starts with Lesotho at 0.00 0.45 100.00 and includes Togo at 0.71 2.25 68.44, the exporters table ends with Mozambique at 19.96 16.50 -20.97, and the last line reads 9 of 56.
Step 7 · Test how much each headline depends on your choices
The last check is about choices you made: start in 2000, include every country. Change them and see whether the headline survives. Try four start years, and try leaving out the two countries that generate the most electricity, which together produce about half of the continent's total:
cd ~/energy-demo
cat > sensitivity.py <<'PY'
import pandas as pd
from pooled import LAST, load, per_person
df = load()
largest = df[df["year"] == LAST].nlargest(2, "generation_twh")["country"].tolist()
print("two largest generators in", LAST, ":", largest)
without = df[~df["country"].isin(largest)]
africa = per_person(df, "year")
africa_without = per_person(without, "year")
western = per_person(df[df["subregion"] == "Western Africa"], "year")
rows = []
for start in [2000, 2005, 2010, 2015]:
rows.append({
"start": start,
"africa_pct": (africa[LAST] / africa[start] - 1) * 100,
"without_two_pct": (africa_without[LAST] / africa_without[start] - 1) * 100,
"western_pct": (western[LAST] / western[start] - 1) * 100,
})
table = pd.DataFrame(rows).set_index("start").round(1)
print(f"change in kWh per person to {LAST}")
print(table.to_string())
table.to_csv("checks/sensitivity.csv")
print()
print("Western Africa, last three years:", western.loc[LAST - 2:].round(1).tolist())
PY
uv run sensitivity.pyThe Africa headline is fragile. From 2000 it is a rise of 19.3 per cent. From 2010 it is 0.8 per cent, and from 2015 a small fall. Leave out South Africa and Egypt and the rise from 2000 is 61.2 per cent, because South Africa's falling generation per person weighs heavily on the pooled figure. "Africa's electricity per person rose by a fifth since 2000" is accurate, and so is "it has not grown since 2010"; a reader who sees only one of them is misled.
Western Africa holds up better: it rises from every start year. But its last three years read 223.1, 231.0 and 216.5, so ending in 2023 instead of 2024 would change its 2000 headline from 64 to 75 per cent. With 2024 still provisional, as the release comparison showed, that last dip may not survive the next update.
Check it worked
The first line names South Africa and Egypt. The table's 2000 row reads 19.3 61.2 64.1, the 2010 row 0.8 23.3 34.6 and the 2015 row -1.5 6.7 19.8. The last line lists [223.1, 231.0, 216.5], and checks/sensitivity.csv exists.
Step 8 · Write the caveats list in notes.md
Turn the six checks into caveats a reader of your report can act on. Each caveat says what the limit is, how big it is, and what you did about it. Number them, so the report in part 8 can refer to "caveat 3":
cd ~/energy-demo
cat >> notes.md <<'MD'
## Part 7: what the data can and cannot show
Data: owid-energy-data.csv at commit f8de88a (1 Oct 2026); older release for comparison at 7138c2f (14 Nov 2025).
Regional figures are ratios of sums over countries with both generation and population (pooled.py).
1. Coverage changes: South Sudan enters Eastern Africa in 2012, Western Sahara leaves after 2009,
five places (Comoros, Reunion, Saint Helena, Sao Tome and Principe, Central African Republic)
have no 2024 data. Eastern Africa 2000 to 2024 is +41.5% with every country,
+50.0% with the same 50 countries throughout; Middle Africa +83.5% against +78.0%. Report which.
2. Revisions: the latest year is provisional. 2023 had 44 countries in the older release and 56 now;
Africa 2023 moved from 684.3 to 629.5 kWh per person. 29 of 64 generation revisions are in 2023.
Treat 2024 (51 countries) the same way. Togo's population was revised down by about 7 to 12% for every year.
3. Population: Africa's generation grew 2.18x and population 1.83x, so per person only 1.19x.
Every subregion except Southern Africa rose at least 1.41x; the Africa figure is lower because
population grew fastest in low-generation regions. Always show regions beside Africa.
4. Not measured: generation is not access, reliability, capacity or household use. The dataset has
no columns for them. 9 of 56 countries imported over a quarter of demand in 2023 (Togo 68%),
while Mozambique and Zambia exported the equivalent of about a fifth of demand.
5. Start year: Africa per person is +19.3% from 2000, +0.8% from 2010 and -1.5% from 2015.
6. Largest countries: without South Africa and Egypt, Africa from 2000 is +61.2%, not +19.3%.
7. End year: Western Africa fell from 231.0 to 216.5 kWh in 2024, a provisional year. Ending in 2023
gives +75% from 2000 instead of +64%.
8. Zeros: Lesotho's generation is 0 TWh in 2023 and 2024, probably a gap (part 2), but these figures
count it. Southern Africa 2024 is 3461.9 kWh per person (-13.2% from 2000) with it and
3576.2 kWh (-10.3%) with Lesotho left out as missing. Africa barely moves (638.7 against 639.7).
MD
sed -n '/^## Part 7/,$p' notes.md | grep -c "^[0-9]\."Keep the caveats next to the numbers they qualify. A caveat buried in an appendix is one nobody reads; part 8 puts each one under the chart it applies to.
Check it worked
The command prints 8. Open notes.md and check that every figure in the new section matches what your scripts printed. ls checks lists headlines.csv and sensitivity.csv, and raw/ now holds three read-only files: the two from part 1 and owid-energy-data-7138c2f.csv.
Next steps
- Publish the analysis with its charts and these caveats as a report anyone can rebuild: publish the energy analysis as a reproducible report, part 8 of this series.
- Add a fixed-coverage line or a start-year note to the charts from part 6: chart the energy data with small multiples.
- Apply the same habits to a different kind of data: read survey results without fooling yourself.
- Revisit the ratio-of-sums rule that every check here depends on: summarise the energy data by region and decade.
Part of these paths
Related tutorials
- Chart the energy data with small multiplesYou will draw three charts of African electricity from your series tables, a panel per subregion on one shared scale, a slope chart of 2000 against 2024 and stacked areas of generation by source, each labelled directly, credited to OWID and Ember, saved as SVG and PNG with written alt text.
- Read survey results without fooling yourselfYou will check who answered your survey, put a margin of error on each headline number, decide which group differences are too small to report, and write a results summary that states its own limits.
- Summarise electricity by region and decade with group-byYou will turn the country-level energy table into regional totals by year, per-person figures computed from those totals, a subregion by decade table and a ranking of countries within each subregion, all checked against the dataset's own Africa total.
Need this done for you?
Padding does this work for growing companies, from the first diagnosis to a system that keeps working.
Get new tutorials