Announcement: how the tables are keyed, and how to join two of them
#2
by Lilambd - opened
World Seeds re-keys Wikipedia "... by country" tables to ISO 3166-1 alpha-2, so tables from different articles join.
What's in it
- One CSV per source article under
tables/. Columns:iso2, country, <original columns>. - Values are kept as printed. The
*_numtwin columns hold the parsed number where one could be read. index.csvlists each table with its source article, revision id, number of countries and last change. An article is read again when its revision id changes.
How to use
import pandas as pd
base = "https://huggingface.co/datasets/Lilambd/world-seeds/resolve/main/tables/"
age = pd.read_csv(base + "list_of_countries_by_median_age.csv")
gdp = pd.read_csv(base + "list_of_countries_by_past_and_projected_gdp_nominal_per_capita.csv")
m = age[["iso2", "2015_num"]].merge(gdp[["iso2", "2015_num"]], on="iso2", suffixes=("_age", "_gdp_pc"))
Licence: the tables come from Wikipedia, by Wikipedia contributors, under CC BY-SA 4.0. The figures come from the sources each article cites, so check them before you rely on a number.
Feedback welcome
Which "by country" article would you like added? If a country was matched to the wrong ISO2 code, please reply with the table and the row.