|
Interest Generator 3.0.1
Religion, hobbies and favourite media by country, age and sex for C++23
|
The data in resources/ and how interest-generator uses it (rule 6 of the dasmig standard). For using the library, see the usage guide.
There are five tables. religion.tsv gives each country's religion shares. The other four describe hobbies and favourite film, game, book and music genres, and how likely each is for a person of a given sex, age and country.
What is measured and what is curated. The religion shares are measured (CIA World Factbook), with some estimates marked below. For hobbies and media, only the sex, age and country differences in how much people do an activity class are measured (Eurostat time-use surveys, Europe only). The catalogue itself (which hobbies and genres exist, their base popularity) and every genre-level preference are curated: no open dataset gives them. Each factor row says which in its basis column.
| Tier | Countries | Hobbies and genres | Affinity rows | Notes |
|---|---|---|---|---|
lite | 195 independent states | 56 hobbies, 12 genres per medium (104) | 651 | Religion by major group. Sex and age factors, and region factors for Europe |
full | 248 countries and territories (all but Antarctica and the US Minor Outlying Islands) | 106 hobbies, 20-22 genres per medium (188) | 1,433 | Detailed religions, plus country factors and curated regional tastes |
| Column | Tier | Meaning | Source |
|---|---|---|---|
country_code | both | ISO 3166-1 alpha-2 code (the key used by country-generator and biodata-generator) | Matched to the Factbook's GEC codes, see below |
religion | both | Label. In lite it is the group name | World Factbook text, cleaned; curated rows as listed below |
group | both | Major group: christian, muslim, hindu, buddhist, jewish, unaffiliated or other | Assigned by keyword from the label (scripts/religion_groups.py) |
weight | both | Share of the population in percent; only the ratios matter | World Factbook, or curated |
year | full | Survey or estimate year the Factbook gives; 0 when unknown | World Factbook |
basis | full | factbook, parent: XX, or a note on a curated row | See below |
| Data | Source | Reliability |
|---|---|---|
| Shares for 220 countries and territories | CIA World Factbook, "People and Society: Religions", as archived in factbook/factbook.json (CC0). The Factbook is a US government work and is in the public domain. The CIA closed the Factbook in February 2026, so this is a frozen copy | Survey years run from 2006 to 2024 and the sources differ by country (censuses, surveys, estimates). Some countries count affiliation by registration (Japan: Shinto 48.6% and Buddhism 46.4% add to 95%, with no "unaffiliated" row) |
| Curated rows (about 25 countries) | Hand-written in resources/raw/religion_curated.tsv | See below |
| 14 territories with no shares | The parent country's rows (basis = parent: XX) | A guess: Mayotte is about 98% Muslim, not like France. Antarctica and the US Minor Outlying Islands have no population and are left out |
basis says what each curated row is based on:
factbook (CD, ZA, CN, PS, LB, VU): the Factbook gives numbers, but the text could not be parsed, or needed a fix. Palestine combines the West Bank and Gaza profiles by population (3.1 and 2.1 million). Lebanon splits the Druze out of the Muslim total. Vanuatu's Protestant share is 67.1%, the sum of the Factbook's own denominations, because its 39.9% total contradicts them.approximate (Eritrea, Sudan, Western Sahara, Saudi Arabia, Ukraine, Russia, North Korea, Guernsey, Greenland, Northern Mariana Islands, Saint-Martin, San Marino, Saint Kitts and Nevis): the Factbook lists groups without shares, or its Russian figures (2006) are incomplete. These shares are rough estimates from general knowledge and public polling, not citations. They have not been checked against a source. Replace them with a sourced figure when one is at hand.The Factbook uses GEC (formerly FIPS) codes. scripts/fetch_religion.py matches each profile to country-generator's list by the country's common name, then its official name, then its internet domain. The US Virgin Islands are forced (vq), because they share a name with the British ones. The European Union profile is skipped.
| Column | Meaning | Source |
|---|---|---|
kind | hobby, film, game, book or music | - |
key, label | Stable identifier and display name | Curated |
weight | Base popularity, relative within its kind (0.2 to 1.6) | Curated: a judgement of how common each is among people in general, not a measurement |
class | The activity class whose measured factors apply (sport, reading, gaming, ...); empty for cooking, baking and home brewing, which no time-use category covers | Curated mapping |
category | Grouping for display and for other generators | Curated |
tags | ;-separated themes (physical, social, calm, creative, ...) for the game and for trait links; not used for drawing | Curated |
min_age, max_age | Hard limits, such as 18 for clubbing and 12 for children's songs | Curated |
The catalogue is in resources/raw/interests_curated.tsv with a tier column saying which tier it belongs to. The genres follow common usage (film: action, comedy, drama...), not a formal taxonomy; Wikidata's genre lists (CC0) were not imported.
A row is a multiplier (factor, >= 0, 1 is neutral) on an item's weight.
| Column | Meaning |
|---|---|
target | An item key, or class: and an activity class (applies to every item of that class) |
dimension | sex (male, female), age_band (a band of age_bands.tsv), region (a UN subregion from regions.tsv), country (an alpha-2 code) or religion (a religion group) |
value | The dimension's value |
factor | The multiplier |
basis | eurostat HETUS 2000/2010 for measured rows, otherwise curated and a note |
An item's weight for a person is weight times, for the item and for its class, the factor for the person's sex, age band, religion group, and country (or, if the target has no country row for that country, region). A missing row is 1.
age_bands.tsv (key band, min_age, max_age): 5-12, 13-17, 18-24, 25-34, 35-49, 50-64, 65+. A person younger than the first band draws no hobbies or media. regions.tsv (key country_code, region) is country-generator's UN subregion for every country in the tier, built by prepare_interests.py.
Source: Eurostat, Harmonised European Time Use Surveys, dataset tus_00age (participation rate by sex, age group and main activity), 22 countries, waves 2000 and 2010. Eurostat's reuse policy allows reuse with attribution. Participation rate is the percentage of people who did the activity on a diary day.
| Class | Eurostat activity | Class | Eurostat activity |
|---|---|---|---|
sport | AC6A Sports and outdoor activities | socialising | AC51A Visiting and feasts |
outdoors | AC611 Walking and hiking | culture | AC52 Entertainment and culture |
handicraft | AC33A Handicraft and textiles | computing | AC7A Computing |
gardening | AC34A Gardening | hobbyist | AC7B Hobbies and games (not computing) |
pets | AC343 Caring for pets | gaming | AC733 Computer games |
diy | AC35 Construction and repairs | reading | AC812 Reading books |
volunteering | AC41 Organisational work | screen | AC82 Television and video |
religious | AC43 Participatory activities (mostly religious) | music | AC83 Radio and music |
study | AC22 Free time study |
Per class: the sex factor is the mean participation of men (or women) divided by the mean of all; the age_band factor is the age group's mean divided by the mean of all (13-17 uses the 15-20 group, 25-34 and 35-49 both use 25-44, 65+ uses 65 and over). The country factor (full) is a country's participation over the mean of the countries, and the region factor is the mean of its countries'. Each country's latest wave is used. Factors are clipped to 0.2-5 (sex, age) or 0.4-2.5 (country, region), and those within 5% of 1 are left out. A class with a mean participation under 1% is skipped.
resources/raw/affinity_curated.tsv (written by hand; each row's basis is curated):
religion dimension): the religious class is higher for any religion than for the unaffiliated (0.15), and Islam lowers pubs and bars, home brewing and betting (0.15), which its teaching forbids and many Muslims still do. Gospel music leans Christian. Nothing else depends on religion in the base data; a game or mod can add more through extend().full only): sports and music tied to places, for example baseball in the US, Japan, Korea and the Caribbean, cricket in South Asia and Australia, rugby in New Zealand and South Africa, K-pop in Korea, country music in the US, skiing nearly absent in the tropics.Outside Europe the measured sex and age differences are assumed to hold as they are; country and region factors for the rest of the world come only from the curated list above.
"country" stream of the call seed). The data has no population, so pass a country chosen by country-generator to weight by population.weight from that country's rows ("religion" stream). A row with weight 0 is loaded but never drawn."hobby", "film", "game", "book", "music" streams): every item the person is old enough (and young enough) for gets its weight as above, then items are drawn one at a time without replacement. Fewer are returned if fewer have a positive weight.An unknown sex or age applies no factor and no age limit.
fetch_religion.py downloads the Factbook profiles and parses the shares. It prints what it could not parse (these are the countries that need curated rows). Ranges such as "15-20%" use the midpoint, and "<1%" counts as half a percent.merge_religion.py applies the curated rows over the Factbook rows, fills territories from their parent, assigns groups and reports any country whose shares do not add up to between 90 and 110.prepare_religion.py writes both religion tiers. lite takes the independent states from country-generator's table.compare_religion.py checks the shares against the Pew Research Center's 2020 estimates as republished by Our World in Data. Pew's data has no open licence, so it is only used to flag rows to look at; it is not part of the repository.fetch_timeuse.py downloads the Eurostat rates.prepare_interests.py computes the measured factors, combines them with the curated catalogue and factors, checks every curated target, region, country and band exists, and writes both tiers.full religions are free text. Labels are kept as the Factbook has them ("Roman Catholic", "Church of Norway", "Kimbanguist"), so the same church can appear under different names in different countries. Use group to compare.