From d151203cf14319dd5058d1ca4062793fd09ed828 Mon Sep 17 00:00:00 2001 From: Matthieu Bergel Date: Fri, 19 Jan 2024 17:15:22 +0000 Subject: [PATCH 1/6] export live headerMenu.json --- site/SiteNavigation.json | 1126 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 1126 insertions(+) create mode 100644 site/SiteNavigation.json diff --git a/site/SiteNavigation.json b/site/SiteNavigation.json new file mode 100644 index 00000000000..8d5f761d2b7 --- /dev/null +++ b/site/SiteNavigation.json @@ -0,0 +1,1126 @@ +{ + "categories": [ + { + "name": "Population and Demographic Change", + "slug": "population", + "entries": [], + "subcategories": [ + { + "name": "Population Change", + "slug": "population-change", + "entries": [ + { + "slug": "population-growth", + "title": "Population Growth", + "excerpt": "Explore global and country data on population growth, demography, and how this is changing.", + "kpi": "" + }, + { + "slug": "age-structure", + "title": "Age Structure", + "excerpt": "What is the age profile of populations around the world? How did it change and what will the age structure of populations look like in the future?", + "kpi": "

The global median age increased from 22 years in 1970 to 31 years.

\n

25% of the world are younger than 14 years. 9% are older than 65.

\n" + }, + { + "slug": "gender-ratio", + "title": "Gender Ratio", + "excerpt": "How does the number of men and women differ between countries? And why?", + "kpi": "

In some countries gender discrimination leads to skewed sex ratios at birth.

\n" + } + ] + }, + { + "name": "Life and Death", + "slug": "life-and-death", + "entries": [ + { + "slug": "life-expectancy", + "title": "Life Expectancy", + "excerpt": "When and why did the average age at which people die increase and how can we make further progress against early death?", + "kpi": "

The global average life expectancy is 73 years.

\n

The global inequality is large.

\n" + }, + { + "slug": "child-mortality", + "title": "Child and Infant Mortality", + "excerpt": "Why are children dying and what can be done to prevent it?", + "kpi": "

5.2 million children younger than five die every year.

\n

The global child mortality rate is 3.8%.

\n" + }, + { + "slug": "fertility-rate", + "title": "Fertility Rate", + "excerpt": "How does the number of children vary across the world and over time? What is driving the rapid global change?", + "kpi": "

The global average fertility rate is 2.4 children per woman.

\n

In the last 50 years this rate has halved.

\n" + } + ] + }, + { + "name": "Distribution of the World Population", + "slug": "distribution-of-the-world-population", + "entries": [ + { + "slug": "urbanization", + "title": "Urbanization", + "excerpt": "The world population is moving to cities. Why is urbanization happening and what are the consequences?", + "kpi": "

56% of the world population live in urban areas.

\n

In 1960 it was 34%.

\n" + }, + { + "slug": "migration", + "title": "Migration", + "excerpt": "Migration has been an important source of economic development and poverty reduction. Explore data on global migration.", + "kpi": "" + } + ] + } + ] + }, + { + "name": "Health", + "slug": "health", + "entries": [ + { + "slug": "tuberculosis", + "title": "Tuberculosis", + "excerpt": "", + "kpi": "" + }, + { + "slug": "pandemics", + "title": "Pandemics", + "excerpt": "", + "kpi": "" + }, + { + "slug": "cardiovascular-diseases", + "title": "Cardiovascular Diseases", + "excerpt": "", + "kpi": "" + } + ], + "subcategories": [ + { + "name": "Health Risks", + "slug": "health-risks", + "entries": [ + { + "slug": "lead-pollution", + "title": "Lead Pollution", + "excerpt": "Lead pollution is a widespread problem that receives little attention. What is the scale of the problem and how can we tackle it?", + "kpi": "

Around one-in-three children globally suffer from lead poisoning.

\n" + }, + { + "slug": "air-pollution", + "title": "Air Pollution", + "excerpt": "Our overview on both indoor and outdoor air pollution.", + "kpi": "

6.7 million people die prematurely from air pollution each year.

\n" + }, + { + "slug": "outdoor-air-pollution", + "title": "Outdoor Air Pollution", + "excerpt": "Outdoor air pollution is one of the world’s largest health and environmental problems.", + "kpi": "

4.5 million people die prematurely from outdoor air pollution every year.

\n

44% are younger than 70 years old.

\n" + }, + { + "slug": "indoor-air-pollution", + "title": "Indoor Air Pollution", + "excerpt": "Indoor air pollution – caused by the burning of firewood, crop waste, and dung for cooking and heating – is a major health risk of the world’s poorest.", + "kpi": "

2.3 million people die prematurely from indoor air pollution every year.

\n

58% are younger than 70 years old.

\n" + }, + { + "slug": "obesity", + "title": "Obesity", + "excerpt": "When did obesity increase? How do rates vary across the world? What is the health impact?", + "kpi": "

13% of adults are obese, globally.

\n

Obesity is responsible for 5 million premature deaths every year.

\n" + }, + { + "slug": "smoking", + "title": "Smoking", + "excerpt": "Tobacco smoking is one of the world’s largest health problems today.", + "kpi": "

7.7 million people die prematurely from smoking every year.

\n

46% are younger than 70 years old.

\n" + }, + { + "slug": "alcohol-consumption", + "title": "Alcohol Consumption", + "excerpt": "Who consumes the most alcohol? How has consumption changed over time? And what are the health impacts?", + "kpi": "

2.4 million people die prematurely from alcohol consumption every year.

\n

71% are younger than 70 years old.

\n" + }, + { + "slug": "illicit-drug-use", + "title": "Opioids, Cocaine, Cannabis, and Other Illicit Drugs", + "excerpt": "How common is the use and addiction to opioids, cocaine, amphetamines and cannabis? What is the impact?", + "kpi": "

620,000 people die prematurely from illicit drug use every year.

\n

45% are younger than 50 years old.

\n" + } + ] + }, + { + "name": "Infectious Diseases", + "slug": "infectious-diseases", + "entries": [ + { + "slug": "influenza", + "title": "Influenza", + "excerpt": "Flu epidemics kill hundreds of thousands of people globally each year, but countries can respond and save lives with better data.", + "kpi": "" + }, + { + "slug": "monkeypox", + "title": "Mpox (monkeypox)", + "excerpt": "Explore the latest data on the Monkeypox outbreak.", + "kpi": "" + }, + { + "slug": "coronavirus", + "title": "Coronavirus Pandemic (COVID-19)", + "excerpt": "Country-by-country data and research on the pandemic. Updated daily.", + "kpi": "

COVID-19 developed into a global pandemic.

\n" + }, + { + "slug": "hiv-aids", + "title": "HIV / AIDS", + "excerpt": "A global epidemic and the leading cause of death in some countries.", + "kpi": "

860,000 people die from HIV/AIDS each year.

\n

77% are younger than 50 years old.

\n" + }, + { + "slug": "malaria", + "title": "Malaria", + "excerpt": "The deadly disease transmitted by mosquitoes is one of the leading causes of death in children. How did we eliminate the disease in some world regions and how can we continue progress against malaria?", + "kpi": "

630,000 people die from malaria every year.

\n

55% are children younger than 5 years old.

\n" + }, + { + "slug": "eradication-of-diseases", + "title": "Eradication of Diseases", + "excerpt": "Which ones could we eradicate in our lifetimes and how?", + "kpi": "

Humanity has already eradicated one severe disease.

\n" + }, + { + "slug": "diarrheal-diseases", + "title": "Diarrheal Diseases", + "excerpt": "Diarrheal diseases are one of the leading cause of child deaths while they are largely preventable.\nHow can we continue to make progress against these diseases?", + "kpi": "

1.5 million people die from diarrheal diseases every year.

\n

One-third are children under five years old.

\n" + }, + { + "slug": "smallpox", + "title": "Smallpox", + "excerpt": "Humanity eradicated this infectious disease globally. How was this possible?", + "kpi": "

In the past smallpox killed millions every year.

\n" + }, + { + "slug": "polio", + "title": "Polio", + "excerpt": "Now the world can possibly eradicate it: polio remains endemic in only 2 countries.", + "kpi": "

One generation ago polio paralyzed hundreds of thousands of children every year.

\n" + }, + { + "slug": "pneumonia", + "title": "Pneumonia", + "excerpt": "Pneumonia is the leading cause of death for children younger than 5 years.", + "kpi": "

2.5 million people die from pneumonia every year.

\n

One-fourth are children younger than five years old.

\n" + }, + { + "slug": "tetanus", + "title": "Tetanus", + "excerpt": "Tetanus is a bacterial infection that leads to painful muscle contractions and possibly death.", + "kpi": "

35,000 people die from Tetanus every year.

\n

Half are children under the age of five.

\n" + } + ] + }, + { + "name": "Health Institutions and Interventions", + "slug": "health-institutions-and-interventions", + "entries": [ + { + "slug": "financing-healthcare", + "title": "Healthcare Spending", + "excerpt": "Healthcare is key to make progress against poor health. How is it financed?", + "kpi": "

Healthcare funding is essential for good health.

\n" + }, + { + "slug": "vaccination", + "title": "Vaccination", + "excerpt": "Vaccines are key in making progress against infectious diseases and save millions of lives every year.", + "kpi": "\n" + } + ] + }, + { + "name": "Life and Death", + "slug": "life-death-health", + "entries": [ + { + "slug": "life-expectancy", + "title": "Life Expectancy", + "excerpt": "When and why did the average age at which people die increase and how can we make further progress against early death?", + "kpi": "

The global average life expectancy is 73 years.

\n

The global inequality is large.

\n" + }, + { + "slug": "child-mortality", + "title": "Child and Infant Mortality", + "excerpt": "Why are children dying and what can be done to prevent it?", + "kpi": "

5.2 million children younger than five die every year.

\n

The global child mortality rate is 3.8%.

\n" + }, + { + "slug": "maternal-mortality", + "title": "Maternal Mortality", + "excerpt": "What could be more tragic than a mother losing her life in the moment that she is giving birth to her newborn? Why are mothers dying and what can be done to prevent these deaths?", + "kpi": "

295,000 women die from pregnancy-related causes every year.

\n" + }, + { + "slug": "health-meta", + "title": "Global Health", + "excerpt": "An overview of our research on global health.", + "kpi": "

The world has seen great improvements in health.

\n

But there are still large inequalities.

\n" + }, + { + "slug": "causes-of-death", + "title": "Causes of Death", + "excerpt": "How did the causes of death change over time?", + "kpi": "

57 million people die every year.

\n

What do they die from?

\n" + }, + { + "slug": "burden-of-disease", + "title": "Burden of Disease", + "excerpt": "How is the burden of disease distributed and how did it change over time?", + "kpi": "

The global burden of disease is large.

\n

Per year 2.5 billion healthy life years are lost due to diseases, accidents, and premature deaths

\n" + }, + { + "slug": "cancer", + "title": "Cancer", + "excerpt": "Cancers are one of the leading causes of death globally. Are we making progress against cancer?", + "kpi": "

10.1 million people die from cancer every year.

\n

51% are younger than 70 years old.

\n" + }, + { + "slug": "mental-health", + "title": "Mental Health", + "excerpt": "Mental health has a significant impact on people’s lives and wellbeing. To support people with mental illnesses, we need better data to understand them.", + "kpi": "" + }, + { + "slug": "suicide", + "title": "Suicides", + "excerpt": "Suicide rates can be reduced with greater understanding and support for people at risk.", + "kpi": "

760,000 die from suicide per year.

\n

59% are younger than 50 years old.

\n" + } + ] + } + ] + }, + { + "name": "Energy and Environment", + "slug": "environment", + "entries": [], + "subcategories": [ + { + "name": "Energy", + "slug": "energy", + "entries": [ + { + "slug": "nuclear-energy", + "title": "Nuclear Energy", + "excerpt": "Explore global data on nuclear energy production, and the safety of nuclear technologies.", + "kpi": "

Nuclear is a safe and low-carbon source of energy.

\n" + }, + { + "slug": "energy-access", + "title": "Access to Energy", + "excerpt": "Access to electricity and clean cooking fuels are vital for a good standard of living and good health.", + "kpi": "

10% of the world do not have access to electricity.

\n

40% do not have access to clean fuels for cooking.

\n" + }, + { + "slug": "energy", + "title": "Energy", + "excerpt": "What energy sources does the world rely on? What is this energy used for? And how does it change over time?", + "kpi": "

Global energy production has grown 2.5-fold in the past 50 years.

\n" + }, + { + "slug": "renewable-energy", + "title": "Renewable Energy", + "excerpt": "Solar, wind, hydropower, and other renewable energy sources currently account for a small share of global energy. But they’re growing quickly and can play a key role in tackling climate change.", + "kpi": "

10% of global primary energy production comes from modern renewable sources.

\n" + }, + { + "slug": "fossil-fuels", + "title": "Fossil Fuels", + "excerpt": "Coal, gas and oil were key to industrialization and rising prosperity, but their large impact on health and the climate mean that we should transition away from these sources of energy.", + "kpi": "

84% of global primary energy comes from fossil fuels.

\n

Deaths per TWh range from 2.8 for gas to 24.6 for coal.

\n" + } + ] + }, + { + "name": "Waste and Pollution", + "slug": "waste", + "entries": [ + { + "slug": "lead-pollution", + "title": "Lead Pollution", + "excerpt": "Lead pollution is a widespread problem that receives little attention. What is the scale of the problem and how can we tackle it?", + "kpi": "

Around one-in-three children globally suffer from lead poisoning.

\n" + }, + { + "slug": "plastic-pollution", + "title": "Plastic Pollution", + "excerpt": "The use of plastics has many benefits – it is affordable, versatile, resistant, and can help reduce other forms of waste – especially food waste. However, when poorly managed it can pollute the environment and our oceans.\nWhere does the plastic in our oceans come from and what can we do to reduce plastic pollution?", + "kpi": "\n" + }, + { + "slug": "oil-spills", + "title": "Oil Spills", + "excerpt": "How often do oil spills happen? How did the frequency of oil spills change over time?", + "kpi": "

Oil spills can have a large negative impact on the environment.

\n" + } + ] + }, + { + "name": "Air and Climate", + "slug": "air-and-climate", + "entries": [ + { + "slug": "co2-and-greenhouse-gas-emissions", + "title": "CO₂ and Greenhouse Gas Emissions", + "excerpt": "Who is emitting greenhouse gases? Which countries and which sectors? And what needs to happen to reduce emissions?", + "kpi": "

35 billion tonnes of CO₂ are emitted every year.

\n" + }, + { + "slug": "climate-change", + "title": "Climate Change", + "excerpt": "How are increasing greenhouse gas emissions affecting the climate? What are the implications for sea level rise; sea ice area; and other impacts?", + "kpi": "

Average global temperature has increased by 1.2°C since pre-industrial times

\n" + }, + { + "slug": "air-pollution", + "title": "Air Pollution", + "excerpt": "Our overview on both indoor and outdoor air pollution.", + "kpi": "

6.7 million people die prematurely from air pollution each year.

\n" + }, + { + "slug": "outdoor-air-pollution", + "title": "Outdoor Air Pollution", + "excerpt": "Outdoor air pollution is one of the world’s largest health and environmental problems.", + "kpi": "

4.5 million people die prematurely from outdoor air pollution every year.

\n

44% are younger than 70 years old.

\n" + }, + { + "slug": "indoor-air-pollution", + "title": "Indoor Air Pollution", + "excerpt": "Indoor air pollution – caused by the burning of firewood, crop waste, and dung for cooking and heating – is a major health risk of the world’s poorest.", + "kpi": "

2.3 million people die prematurely from indoor air pollution every year.

\n

58% are younger than 70 years old.

\n" + }, + { + "slug": "ozone-layer", + "title": "Ozone Layer", + "excerpt": "Humans were emitting large amounts of gases that depleted the ozone layer. But in the 1980s the world came together to tackle the problem. Emissions have fallen by more than 99%.", + "kpi": "

Emissions of ozone-depleting gases have fallen by 98%.

\n

But it will take decades for the ozone layer to recover.

\n" + } + ] + }, + { + "name": "Water", + "slug": "water", + "entries": [ + { + "slug": "clean-water-sanitation", + "title": "Clean Water and Sanitation", + "excerpt": "Explore global access to clean water and sanitation.", + "kpi": "

One-quarter of the world do not have access to safe drinking water

\n" + }, + { + "slug": "water-access", + "title": "Clean Water", + "excerpt": "Clean and safe water is essential for good health.\nHow did access change over time? Where do people lack access?", + "kpi": "

2.1 billion people do not have access to safe drinking water.

\n

That's 26% of the world population.

\n" + }, + { + "slug": "sanitation", + "title": "Sanitation", + "excerpt": "Access to safe sanitation is essential for reducing deaths from infectious disease, preventing malnutrition and providing dignity. \nWhat is the global situation today and how can we make progress?", + "kpi": "

3.7 billion people do not have access to safely managed sanitation.

\n

That's 46% of the world population.

\n" + }, + { + "slug": "water-use-stress", + "title": "Water Use and Stress", + "excerpt": "Freshwater resources across the world are the focus of this entry. How much water do we use? How did it change over time?", + "kpi": "\n" + } + ] + }, + { + "name": "Land and Ecosystems", + "slug": "land-and-ecosystems", + "entries": [ + { + "slug": "biodiversity", + "title": "Biodiversity", + "excerpt": "Explore the diversity of wildlife across the planet. What are species threatened with? What can we do to prevent biodiversity loss?", + "kpi": "

Global trends in biodiversity are mixed, but overall it's in steep decline

\n" + }, + { + "slug": "environmental-impacts-of-food", + "title": "Environmental Impacts of Food Production", + "excerpt": "What are the environmental impacts of food production? How do we reduce the impacts of agriculture on the environment?", + "kpi": "

26% of global greenhouse gas emissions come from food production.

\n

50% of the world's habitable land is used for agriculture.

\n" + }, + { + "slug": "forests-and-deforestation", + "title": "Forests and Deforestation", + "excerpt": "How are forests distributed across the world? How much do we lose to deforestation every year?", + "kpi": "

31% of the world’s land area is covered by forest.

\n" + }, + { + "slug": "land-use", + "title": "Land Use", + "excerpt": "How is humanity using the Earth’s land? And how can we decrease our land use so that more land is left for wildlife?", + "kpi": "\n" + }, + { + "slug": "natural-disasters", + "title": "Natural Disasters", + "excerpt": "Where and from which disasters do people die? What can we do to prevent deaths from natural disasters?", + "kpi": "\n" + } + ] + } + ] + }, + { + "name": "Food and Agriculture", + "slug": "food", + "entries": [ + { + "slug": "animal-welfare", + "title": "Animal Welfare", + "excerpt": "", + "kpi": "" + } + ], + "subcategories": [ + { + "name": "Nutrition", + "slug": "nutrition", + "entries": [ + { + "slug": "hunger-and-undernourishment", + "title": "Hunger and Undernourishment", + "excerpt": "What are the consequences of undernourishment and how can we make progress against hunger and undernourishment?", + "kpi": "

9% of the world population – 660 million people – are undernourished.

\n

22% of children younger than five are ‘stunted’.

\n" + }, + { + "slug": "famines", + "title": "Famines", + "excerpt": "In many parts of the world famines have been common in the past. What causes famines? How can famines be averted?", + "kpi": "

Around 130 million people died in famines during the last 150 years.

\n

This estimate is based on our historical reconstructions.

\n" + }, + { + "slug": "food-supply", + "title": "Food Supply", + "excerpt": "How had the availability of food changed over time? How does food supply vary across the world today?", + "kpi": "

2,861 kcal per day is the global average food supply per person.

\n

There are large inequalities in food supply across countries.

\n" + }, + { + "slug": "human-height", + "title": "Human Height", + "excerpt": "The average height of a population can inform us about the nutrition and living conditions of populations in the past for which we have little other data.", + "kpi": "

The average young adult is about 5% taller today than 100 years ago.

\n

Human height gives us an indicator of changes in health and nutrition in the past.

\n" + }, + { + "slug": "micronutrient-deficiency", + "title": "Micronutrient Deficiency", + "excerpt": "Food is not only a source of energy and protein, but also micronutrients – vitamins and minerals – which are essential to good health.\nWho is most affected by the ‘hidden hunger’ of micronutrient deficiency?", + "kpi": "

An estimated 2 billion people are deficient in essential micronutrients.

\n" + }, + { + "slug": "diet-compositions", + "title": "Diet Compositions", + "excerpt": "What do people across the world eat?", + "kpi": "

A diverse diet is essential for good nutrition.

\n

There are large inequalities in dietary diversity between countries.

\n" + }, + { + "slug": "food-prices", + "title": "Food Prices", + "excerpt": "Food needs to be affordable for people, and at the same it is a key source of income for one-quarter of the world’s labor force.", + "kpi": "

Three billion people cannot afford a healthy diet.

\n

Food prices are important for both consumers and farmers.

\n" + }, + { + "slug": "obesity", + "title": "Obesity", + "excerpt": "When did obesity increase? How do rates vary across the world? What is the health impact?", + "kpi": "

13% of adults are obese, globally.

\n

Obesity is responsible for 5 million premature deaths every year.

\n" + }, + { + "slug": "alcohol-consumption", + "title": "Alcohol Consumption", + "excerpt": "Who consumes the most alcohol? How has consumption changed over time? And what are the health impacts?", + "kpi": "

2.4 million people die prematurely from alcohol consumption every year.

\n

71% are younger than 70 years old.

\n" + } + ] + }, + { + "name": "Food Production", + "slug": "food-production", + "entries": [ + { + "slug": "farm-size", + "title": "Farm Size and Productivity", + "excerpt": "How does farm size vary across the world? How much of farmland is held by smallholders?", + "kpi": "

Most of the world's farmers are smallholders, with less than two hectares of land

\n" + }, + { + "slug": "agricultural-production", + "title": "Agricultural Production", + "excerpt": "How much, and what types of food, do countries produce across the world?", + "kpi": "

The world produces more than enough food for everyone.

\n

But it's unequally distributed across the world.

\n" + }, + { + "slug": "environmental-impacts-of-food", + "title": "Environmental Impacts of Food Production", + "excerpt": "What are the environmental impacts of food production? How do we reduce the impacts of agriculture on the environment?", + "kpi": "

26% of global greenhouse gas emissions come from food production.

\n

50% of the world's habitable land is used for agriculture.

\n" + }, + { + "slug": "crop-yields", + "title": "Crop Yields", + "excerpt": "Increasing crop yields is crucial to improve food security, living standards, and reduce human impacts on the environment.", + "kpi": "

Global average cereal yield is 4 tonnes per hectare.

\n

But in many regions yields are much lower.

\n" + }, + { + "slug": "meat-production", + "title": "Meat and Dairy Production", + "excerpt": "Meat is an important source of nutrition for people around the world. How quickly is demand growing? And what are the implications for animal welfare and the earth’s environment?", + "kpi": "

72 billion animals are slaughtered every year for meat production.

\n" + } + ] + }, + { + "name": "Agricultural Inputs", + "slug": "agricultural-inputs", + "entries": [ + { + "slug": "employment-in-agriculture", + "title": "Employment in Agriculture", + "excerpt": "Once the majority of human labor was dedicated to food production. When and how did this change? What is the global distribution of agricultural labor today?", + "kpi": "

27% of the world’s labor force is employed in agriculture.

\n" + }, + { + "slug": "land-use", + "title": "Land Use", + "excerpt": "How is humanity using the Earth’s land? And how can we decrease our land use so that more land is left for wildlife?", + "kpi": "\n" + }, + { + "slug": "fertilizers", + "title": "Fertilizers", + "excerpt": "Fertilizers supply plants with nutrients that are essential for growth.\nHow important are fertilizers? How does their use vary across the world?", + "kpi": "

The world produces more than 200 million tonnes of fertilizer each year.

\n" + }, + { + "slug": "pesticides", + "title": "Pesticides", + "excerpt": "Pesticides are used to protect plants from weeds, fungi, or insects. Where are they used? What is their impact?", + "kpi": "

Pesticides are often used to protect crop yields.

\n

There are large differences in its use across the world.

\n" + } + ] + } + ] + }, + { + "name": "Poverty and Economic Development", + "slug": "growth-inequality", + "entries": [], + "subcategories": [ + { + "name": "Public Sector", + "slug": "public-sector", + "entries": [ + { + "slug": "government-spending", + "title": "Government Spending", + "excerpt": "What do governments spend their financial resources on?", + "kpi": "

Government spending has increased significantly, but with large differences across the world.

\n" + }, + { + "slug": "taxation", + "title": "Taxation", + "excerpt": "Taxes are the most important source of government revenue. Who is paying how much and how do tax systems differ?", + "kpi": "

Tax revenues account for more than 80% of total government revenue in about half of the countries in the world.

\n

And for more than 50% in almost every country.

\n" + }, + { + "slug": "military-personnel-spending", + "title": "Military Personnel and Spending", + "excerpt": "How large are countries’ militaries? How much do they spend on their armed forces? Explore global data on military personnel and spending.", + "kpi": "\n" + }, + { + "slug": "financing-healthcare", + "title": "Healthcare Spending", + "excerpt": "Healthcare is key to make progress against poor health. How is it financed?", + "kpi": "

Healthcare funding is essential for good health.

\n" + }, + { + "slug": "financing-education", + "title": "Education Spending", + "excerpt": "How is education financed? How much do we spend on it? What are the returns?", + "kpi": "

Funding for education is growing across the world, but large gaps still exist.

\n" + } + ] + }, + { + "name": "Poverty and Prosperity", + "slug": "poverty-and-prosperity", + "entries": [ + { + "slug": "economic-inequality", + "title": "Economic Inequality", + "excerpt": "", + "kpi": "

Many countries have high levels of economic inequality. Inequality across the world as a whole has fallen but remains vast.

\n" + }, + { + "slug": "poverty", + "title": "Poverty", + "excerpt": "How has poverty changed over time? And what can the world do to win the fight against poverty?", + "kpi": "

8% of the world population were living on less than $2.15 per day before the pandemic.

\n

59% were living on less than $10 per day.

\n" + }, + { + "slug": "economic-growth", + "title": "Economic Growth", + "excerpt": "All of today’s rich countries were poor in the past – how do poor countries become rich?", + "kpi": "

The world has become much more prosperous, but in some countries incomes remain very low.

\n" + } + ] + }, + { + "name": "Economic Inequality", + "slug": "economic-inequality", + "entries": [ + { + "slug": "economic-inequality-by-gender", + "title": "Economic Inequality by Gender", + "excerpt": "What is determining the inequality in incomes, jobs, and wealth between men and women?", + "kpi": "

In most countries the gender pay gap has reduced, but inequalities are still large and common.

\n" + } + ] + }, + { + "name": "Labor", + "slug": "labor", + "entries": [ + { + "slug": "child-labor", + "title": "Child Labor", + "excerpt": "Why and where do children work? How did child labor change over time?", + "kpi": "

An estimated 17% of children globally work.

\n" + }, + { + "slug": "working-hours", + "title": "Working Hours", + "excerpt": "How much time do people across the world spend working? How have working hours changed over time, and what do these changes matter for people’s lives? Explore data and research on working hours.", + "kpi": "

Many people have to work long hours for very low incomes.

\n" + }, + { + "slug": "female-labor-supply", + "title": "Women’s Employment", + "excerpt": "What is determining whether women participate in the labor market? How is it changing?", + "kpi": "

Women’s labor force participation is 47% globally with large differences between countries.

\n" + } + ] + }, + { + "name": "Corruption", + "slug": "corruption", + "entries": [ + { + "slug": "corruption", + "title": "Corruption", + "excerpt": "How common is corruption? What impact does it have? And what can be done to reduce it?", + "kpi": "

Corruption is a common problem in many countries and sectors.

\n" + } + ] + }, + { + "name": "Trade and Migration", + "slug": "trade-migration", + "entries": [ + { + "slug": "migration", + "title": "Migration", + "excerpt": "Migration has been an important source of economic development and poverty reduction. Explore data on global migration.", + "kpi": "" + }, + { + "slug": "trade-and-globalization", + "title": "Trade and Globalization", + "excerpt": "How did international trade and globalization change over time? What is the structure today? And what is its impact?", + "kpi": "" + }, + { + "slug": "tourism", + "title": "Tourism", + "excerpt": "How often do people travel for pleasure? What role does tourism play in economies across the world? Explore global data on tourism.", + "kpi": "

Many people travel for pleasure, and tourism plays a big role in many economies across the world.

\n" + } + ] + } + ] + }, + { + "name": "Education and Knowledge", + "slug": "education", + "entries": [], + "subcategories": [ + { + "name": "Educational Access and Outcomes", + "slug": "educational-outcomes", + "entries": [ + { + "slug": "global-education", + "title": "Global Education", + "excerpt": "The overview of our research on global education.", + "kpi": "

Global education has improved over recent decades, but much more progress is possible.

\n" + }, + { + "slug": "literacy", + "title": "Literacy", + "excerpt": "Being able to read and write opens up the world of education and knowledge.\nWhen and why did more people become literate? How can progress continue?", + "kpi": "\n" + }, + { + "slug": "research-and-development", + "title": "Research and Development", + "excerpt": "Research and development underpin nearly all of the transformative changes the world has seen.", + "kpi": "" + } + ] + }, + { + "name": "Inputs to Education", + "slug": "inputs-to-education", + "entries": [ + { + "slug": "financing-education", + "title": "Education Spending", + "excerpt": "How is education financed? How much do we spend on it? What are the returns?", + "kpi": "

Funding for education is growing across the world, but large gaps still exist.

\n" + } + ] + }, + { + "name": "Media", + "slug": "media-education", + "entries": [ + { + "slug": "books", + "title": "Books", + "excerpt": "Books have been at the center of science and the arts for centuries. How has the production and sales of books changed over time?", + "kpi": "

Book publication has been a key driver of knowledge-sharing and education.

\n" + }, + { + "slug": "internet", + "title": "Internet", + "excerpt": "More than half of the world is online. But the internet is still young.", + "kpi": "\n" + } + ] + } + ] + }, + { + "name": "Innovation and Technological Change", + "slug": "technology", + "entries": [], + "subcategories": [ + { + "name": "Technological Change", + "slug": "technological-change", + "entries": [ + { + "slug": "artificial-intelligence", + "title": "Artificial Intelligence", + "excerpt": "AI is already having a large impact on our world. Explore research and data to understand the trajectory of this important technology.", + "kpi": "" + }, + { + "slug": "space-exploration-satellites", + "title": "Space Exploration and Satellites", + "excerpt": "Explore data and developments in space travel and satellite technologies.", + "kpi": "" + }, + { + "slug": "transport", + "title": "Transport", + "excerpt": "Explore trends in transport technologies and emissions across the world.", + "kpi": "

Transport is an important measure of technological progress

\n" + }, + { + "slug": "internet", + "title": "Internet", + "excerpt": "More than half of the world is online. But the internet is still young.", + "kpi": "\n" + }, + { + "slug": "research-and-development", + "title": "Research and Development", + "excerpt": "Research and development underpin nearly all of the transformative changes the world has seen.", + "kpi": "" + }, + { + "slug": "technological-change", + "title": "Technological Change", + "excerpt": "Technological change underpins so many of the developments we’ve seen in health, agriculture, energy and global development.", + "kpi": "

Technological progress has been a key driver of improved living standards.

\n" + } + ] + } + ] + }, + { + "name": "Living Conditions, Community and Wellbeing", + "slug": "work-life", + "entries": [], + "subcategories": [ + { + "name": "Culture", + "slug": "culture", + "entries": [ + { + "slug": "trust", + "title": "Trust", + "excerpt": "Trust is essential for community, wellbeing, and effective cooperation. How does trust vary between different societies and locations and what matters for levels of trust?", + "kpi": "

Trust levels can vary a lot between countries and groups of society.

\n" + } + ] + }, + { + "name": "Housing", + "slug": "housing", + "entries": [ + { + "slug": "clean-water-sanitation", + "title": "Clean Water and Sanitation", + "excerpt": "Explore global access to clean water and sanitation.", + "kpi": "

One-quarter of the world do not have access to safe drinking water

\n" + }, + { + "slug": "energy-access", + "title": "Access to Energy", + "excerpt": "Access to electricity and clean cooking fuels are vital for a good standard of living and good health.", + "kpi": "

10% of the world do not have access to electricity.

\n

40% do not have access to clean fuels for cooking.

\n" + }, + { + "slug": "water-access", + "title": "Clean Water", + "excerpt": "Clean and safe water is essential for good health.\nHow did access change over time? Where do people lack access?", + "kpi": "

2.1 billion people do not have access to safe drinking water.

\n

That's 26% of the world population.

\n" + }, + { + "slug": "homelessness", + "title": "Homelessness", + "excerpt": "How many are homeless? How did homelessness change over time?", + "kpi": "

Homelessness is a problem in countries around the world.

\n" + }, + { + "slug": "indoor-air-pollution", + "title": "Indoor Air Pollution", + "excerpt": "Indoor air pollution – caused by the burning of firewood, crop waste, and dung for cooking and heating – is a major health risk of the world’s poorest.", + "kpi": "

2.3 million people die prematurely from indoor air pollution every year.

\n

58% are younger than 70 years old.

\n" + }, + { + "slug": "light-at-night", + "title": "Light at Night", + "excerpt": "Light at night was once expensive everywhere. In some places people are still lacking light at night, while in other places light became extremely cheap.", + "kpi": "

Light at night was once expensive everywhere. While prices have plummeted, many people still do not have access to artificial light.

\n" + }, + { + "slug": "sanitation", + "title": "Sanitation", + "excerpt": "Access to safe sanitation is essential for reducing deaths from infectious disease, preventing malnutrition and providing dignity. \nWhat is the global situation today and how can we make progress?", + "kpi": "

3.7 billion people do not have access to safely managed sanitation.

\n

That's 46% of the world population.

\n" + } + ] + }, + { + "name": "Time Use", + "slug": "time-use", + "entries": [ + { + "slug": "time-use", + "title": "Time Use", + "excerpt": "How do people across the world spend their time? How do daily activities differ across countries, and how do these differences matter for people’s lives? Explore data and research on time use.", + "kpi": "

Time is the ultimate limited resource

\n" + }, + { + "slug": "working-hours", + "title": "Working Hours", + "excerpt": "How much time do people across the world spend working? How have working hours changed over time, and what do these changes matter for people’s lives? Explore data and research on working hours.", + "kpi": "

Many people have to work long hours for very low incomes.

\n" + }, + { + "slug": "tourism", + "title": "Tourism", + "excerpt": "How often do people travel for pleasure? What role does tourism play in economies across the world? Explore global data on tourism.", + "kpi": "

Many people travel for pleasure, and tourism plays a big role in many economies across the world.

\n" + } + ] + }, + { + "name": "Relationships", + "slug": "relationships", + "entries": [ + { + "slug": "marriages-and-divorces", + "title": "Marriages and Divorces", + "excerpt": "How is the institution of marriage changing? What percentage of marriages end in divorce? Explore global data on marriages and divorces.", + "kpi": "

The institution of marriage is changing quickly

\n" + }, + { + "slug": "social-connections-and-loneliness", + "title": "Loneliness and Social Connections", + "excerpt": "Family and friends are important for our well-being. In this article we explore data on loneliness and social connections, and review available evidence on the link between social connections and well-being.", + "kpi": "

Loneliness is common across the world.

\n" + } + ] + }, + { + "name": "Happiness and Wellbeing", + "slug": "happiness-wellbeing", + "entries": [ + { + "slug": "happiness-and-life-satisfaction", + "title": "Happiness and Life Satisfaction", + "excerpt": "Self-reported life satisfaction differs widely between people and between countries. What explains these differences?", + "kpi": "

Life satisfaction and happiness vary widely both within and among countries.

\n" + }, + { + "slug": "human-development-index", + "title": "Human Development Index (HDI)", + "excerpt": "The HDI is a measure of human development that captures health, education, and income. How does the index vary around the world, and how did it change over time?", + "kpi": "

Health, education and living standards have increased in recent decades, but more progress is needed.

\n" + } + ] + } + ] + }, + { + "name": "Human Rights and Democracy", + "slug": "politics", + "entries": [], + "subcategories": [ + { + "name": "Human Rights", + "slug": "human-rights", + "entries": [ + { + "slug": "state-capacity", + "title": "State Capacity", + "excerpt": "", + "kpi": "" + }, + { + "slug": "lgbt-rights", + "title": "LGBT+ Rights", + "excerpt": "How has the protection of LGBT+ rights changed over time? How does it differ across countries? Explore global data on LGBT+ rights.", + "kpi": "

LGBT+ rights are much more protected than in the past, but are often a lot less protected than those of straight and cisgender people.

\n" + }, + { + "slug": "women-rights", + "title": "Women’s Rights", + "excerpt": "How has the protection of women’s rights changed over time? How does it differ across countries? Explore global data and research on women’s rights.", + "kpi": "

Women's rights are much more protected than in the past, but are often a lot less protected than those of men.

\n" + }, + { + "slug": "child-labor", + "title": "Child Labor", + "excerpt": "Why and where do children work? How did child labor change over time?", + "kpi": "

An estimated 17% of children globally work.

\n" + }, + { + "slug": "human-rights", + "title": "Human Rights", + "excerpt": "How has the protection of human rights changed over time? How does it differ across countries, and between social and demographic groups? Explore global data on human rights.", + "kpi": "

Human rights are much more protected than in the past, but there are big differences between countries.

\n" + } + ] + }, + { + "name": "Democracy and Corruption", + "slug": "democracy", + "entries": [ + { + "slug": "democracy", + "title": "Democracy", + "excerpt": "How has democracy spread across countries? Are we moving towards a more democratic world? Explore global data and research on democracy.", + "kpi": "\n" + }, + { + "slug": "corruption", + "title": "Corruption", + "excerpt": "How common is corruption? What impact does it have? And what can be done to reduce it?", + "kpi": "

Corruption is a common problem in many countries and sectors.

\n" + } + ] + } + ] + }, + { + "name": "Violence and War", + "slug": "violence-rights", + "entries": [], + "subcategories": [ + { + "name": "War and Peace", + "slug": "war-peace", + "entries": [ + { + "slug": "biological-and-chemical-weapons", + "title": "Biological and Chemical Weapons", + "excerpt": "Which countries have pursued, possessed, or used biological and chemical weapons recently and historically? Which countries have joined the international treaties to eliminate them?", + "kpi": "

Fewer countries use, possess, and pursue biological and chemical weapons.

\n" + }, + { + "slug": "war-and-peace", + "title": "War and Peace", + "excerpt": "Humans are capable of atrocious cruelty – the history of war makes this all too clear. How many died in war? And what are the prospects for making the world more peaceful?", + "kpi": "\n" + }, + { + "slug": "military-personnel-spending", + "title": "Military Personnel and Spending", + "excerpt": "How large are countries’ militaries? How much do they spend on their armed forces? Explore global data on military personnel and spending.", + "kpi": "\n" + }, + { + "slug": "terrorism", + "title": "Terrorism", + "excerpt": "The attacks of terrorists receive a lot of attention from the media and often dominate the public discourse. How many people die from these attacks and how did it change over time?", + "kpi": "\n" + }, + { + "slug": "nuclear-weapons", + "title": "Nuclear Weapons", + "excerpt": "The world’s nuclear powers possess around 9,500 nuclear warheads in total. These weapons have the capacity to kill hundreds of millions of people directly, and billions due to subsequent effects on agriculture.", + "kpi": "

The world’s nuclear powers have more than 9,000 nuclear warheads.

\n" + } + ] + }, + { + "name": "Violence", + "slug": "violence", + "entries": [ + { + "slug": "state-capacity", + "title": "State Capacity", + "excerpt": "", + "kpi": "" + }, + { + "slug": "violence-against-rights-for-children", + "title": "Violence Against Children and Children’s Rights", + "excerpt": "How common is physical and emotional violence against children? How did it change over time?", + "kpi": "

Violence against children in various forms has fallen, but still occurs today.

\n" + }, + { + "slug": "homicides", + "title": "Homicides", + "excerpt": "How common are homicides? How does this differ across countries? And how is this changing over time? Explore global data on homicides.", + "kpi": "

Globally around 400,000 people die from homicide each year.

\n" + } + ] + } + ] + } + ] +} \ No newline at end of file From 8a35723f45d2fbd4880af90de24ed562a9edc293 Mon Sep 17 00:00:00 2001 From: Matthieu Bergel Date: Fri, 19 Jan 2024 17:19:35 +0000 Subject: [PATCH 2/6] (nav) remove excerpt and kpi keys --- db/wpdb.ts | 8 - site/SiteNavigation.json | 564 ++++++++++----------------------------- 2 files changed, 141 insertions(+), 431 deletions(-) diff --git a/db/wpdb.ts b/db/wpdb.ts index c5f99787aa7..e349bcb8a61 100644 --- a/db/wpdb.ts +++ b/db/wpdb.ts @@ -310,18 +310,12 @@ export const getDocumentsInfo = async ( const getEntryNode = ({ slug, title, - excerpt, - kpi, }: EntryNode): { slug: string title: string - excerpt: string - kpi: string } => ({ slug, title: decodeHTML(title), - excerpt: excerpt === null ? "" : decodeHTML(excerpt), - kpi, }) const isEntryInSubcategories = (entry: EntryNode, subcategories: any): any => { @@ -374,8 +368,6 @@ export const getEntriesByCategory = async (): Promise< nodes { slug title - excerpt - kpi } } } diff --git a/site/SiteNavigation.json b/site/SiteNavigation.json index 8d5f761d2b7..609dbbbeb15 100644 --- a/site/SiteNavigation.json +++ b/site/SiteNavigation.json @@ -11,21 +11,15 @@ "entries": [ { "slug": "population-growth", - "title": "Population Growth", - "excerpt": "Explore global and country data on population growth, demography, and how this is changing.", - "kpi": "" + "title": "Population Growth" }, { "slug": "age-structure", - "title": "Age Structure", - "excerpt": "What is the age profile of populations around the world? How did it change and what will the age structure of populations look like in the future?", - "kpi": "

The global median age increased from 22 years in 1970 to 31 years.

\n

25% of the world are younger than 14 years. 9% are older than 65.

\n" + "title": "Age Structure" }, { "slug": "gender-ratio", - "title": "Gender Ratio", - "excerpt": "How does the number of men and women differ between countries? And why?", - "kpi": "

In some countries gender discrimination leads to skewed sex ratios at birth.

\n" + "title": "Gender Ratio" } ] }, @@ -35,21 +29,15 @@ "entries": [ { "slug": "life-expectancy", - "title": "Life Expectancy", - "excerpt": "When and why did the average age at which people die increase and how can we make further progress against early death?", - "kpi": "

The global average life expectancy is 73 years.

\n

The global inequality is large.

\n" + "title": "Life Expectancy" }, { "slug": "child-mortality", - "title": "Child and Infant Mortality", - "excerpt": "Why are children dying and what can be done to prevent it?", - "kpi": "

5.2 million children younger than five die every year.

\n

The global child mortality rate is 3.8%.

\n" + "title": "Child and Infant Mortality" }, { "slug": "fertility-rate", - "title": "Fertility Rate", - "excerpt": "How does the number of children vary across the world and over time? What is driving the rapid global change?", - "kpi": "

The global average fertility rate is 2.4 children per woman.

\n

In the last 50 years this rate has halved.

\n" + "title": "Fertility Rate" } ] }, @@ -59,15 +47,11 @@ "entries": [ { "slug": "urbanization", - "title": "Urbanization", - "excerpt": "The world population is moving to cities. Why is urbanization happening and what are the consequences?", - "kpi": "

56% of the world population live in urban areas.

\n

In 1960 it was 34%.

\n" + "title": "Urbanization" }, { "slug": "migration", - "title": "Migration", - "excerpt": "Migration has been an important source of economic development and poverty reduction. Explore data on global migration.", - "kpi": "" + "title": "Migration" } ] } @@ -79,21 +63,15 @@ "entries": [ { "slug": "tuberculosis", - "title": "Tuberculosis", - "excerpt": "", - "kpi": "" + "title": "Tuberculosis" }, { "slug": "pandemics", - "title": "Pandemics", - "excerpt": "", - "kpi": "" + "title": "Pandemics" }, { "slug": "cardiovascular-diseases", - "title": "Cardiovascular Diseases", - "excerpt": "", - "kpi": "" + "title": "Cardiovascular Diseases" } ], "subcategories": [ @@ -103,51 +81,35 @@ "entries": [ { "slug": "lead-pollution", - "title": "Lead Pollution", - "excerpt": "Lead pollution is a widespread problem that receives little attention. What is the scale of the problem and how can we tackle it?", - "kpi": "

Around one-in-three children globally suffer from lead poisoning.

\n" + "title": "Lead Pollution" }, { "slug": "air-pollution", - "title": "Air Pollution", - "excerpt": "Our overview on both indoor and outdoor air pollution.", - "kpi": "

6.7 million people die prematurely from air pollution each year.

\n" + "title": "Air Pollution" }, { "slug": "outdoor-air-pollution", - "title": "Outdoor Air Pollution", - "excerpt": "Outdoor air pollution is one of the world’s largest health and environmental problems.", - "kpi": "

4.5 million people die prematurely from outdoor air pollution every year.

\n

44% are younger than 70 years old.

\n" + "title": "Outdoor Air Pollution" }, { "slug": "indoor-air-pollution", - "title": "Indoor Air Pollution", - "excerpt": "Indoor air pollution – caused by the burning of firewood, crop waste, and dung for cooking and heating – is a major health risk of the world’s poorest.", - "kpi": "

2.3 million people die prematurely from indoor air pollution every year.

\n

58% are younger than 70 years old.

\n" + "title": "Indoor Air Pollution" }, { "slug": "obesity", - "title": "Obesity", - "excerpt": "When did obesity increase? How do rates vary across the world? What is the health impact?", - "kpi": "

13% of adults are obese, globally.

\n

Obesity is responsible for 5 million premature deaths every year.

\n" + "title": "Obesity" }, { "slug": "smoking", - "title": "Smoking", - "excerpt": "Tobacco smoking is one of the world’s largest health problems today.", - "kpi": "

7.7 million people die prematurely from smoking every year.

\n

46% are younger than 70 years old.

\n" + "title": "Smoking" }, { "slug": "alcohol-consumption", - "title": "Alcohol Consumption", - "excerpt": "Who consumes the most alcohol? How has consumption changed over time? And what are the health impacts?", - "kpi": "

2.4 million people die prematurely from alcohol consumption every year.

\n

71% are younger than 70 years old.

\n" + "title": "Alcohol Consumption" }, { "slug": "illicit-drug-use", - "title": "Opioids, Cocaine, Cannabis, and Other Illicit Drugs", - "excerpt": "How common is the use and addiction to opioids, cocaine, amphetamines and cannabis? What is the impact?", - "kpi": "

620,000 people die prematurely from illicit drug use every year.

\n

45% are younger than 50 years old.

\n" + "title": "Opioids, Cocaine, Cannabis, and Other Illicit Drugs" } ] }, @@ -157,69 +119,47 @@ "entries": [ { "slug": "influenza", - "title": "Influenza", - "excerpt": "Flu epidemics kill hundreds of thousands of people globally each year, but countries can respond and save lives with better data.", - "kpi": "" + "title": "Influenza" }, { "slug": "monkeypox", - "title": "Mpox (monkeypox)", - "excerpt": "Explore the latest data on the Monkeypox outbreak.", - "kpi": "" + "title": "Mpox (monkeypox)" }, { "slug": "coronavirus", - "title": "Coronavirus Pandemic (COVID-19)", - "excerpt": "Country-by-country data and research on the pandemic. Updated daily.", - "kpi": "

COVID-19 developed into a global pandemic.

\n" + "title": "Coronavirus Pandemic (COVID-19)" }, { "slug": "hiv-aids", - "title": "HIV / AIDS", - "excerpt": "A global epidemic and the leading cause of death in some countries.", - "kpi": "

860,000 people die from HIV/AIDS each year.

\n

77% are younger than 50 years old.

\n" + "title": "HIV / AIDS" }, { "slug": "malaria", - "title": "Malaria", - "excerpt": "The deadly disease transmitted by mosquitoes is one of the leading causes of death in children. How did we eliminate the disease in some world regions and how can we continue progress against malaria?", - "kpi": "

630,000 people die from malaria every year.

\n

55% are children younger than 5 years old.

\n" + "title": "Malaria" }, { "slug": "eradication-of-diseases", - "title": "Eradication of Diseases", - "excerpt": "Which ones could we eradicate in our lifetimes and how?", - "kpi": "

Humanity has already eradicated one severe disease.

\n" + "title": "Eradication of Diseases" }, { "slug": "diarrheal-diseases", - "title": "Diarrheal Diseases", - "excerpt": "Diarrheal diseases are one of the leading cause of child deaths while they are largely preventable.\nHow can we continue to make progress against these diseases?", - "kpi": "

1.5 million people die from diarrheal diseases every year.

\n

One-third are children under five years old.

\n" + "title": "Diarrheal Diseases" }, { "slug": "smallpox", - "title": "Smallpox", - "excerpt": "Humanity eradicated this infectious disease globally. How was this possible?", - "kpi": "

In the past smallpox killed millions every year.

\n" + "title": "Smallpox" }, { "slug": "polio", - "title": "Polio", - "excerpt": "Now the world can possibly eradicate it: polio remains endemic in only 2 countries.", - "kpi": "

One generation ago polio paralyzed hundreds of thousands of children every year.

\n" + "title": "Polio" }, { "slug": "pneumonia", - "title": "Pneumonia", - "excerpt": "Pneumonia is the leading cause of death for children younger than 5 years.", - "kpi": "

2.5 million people die from pneumonia every year.

\n

One-fourth are children younger than five years old.

\n" + "title": "Pneumonia" }, { "slug": "tetanus", - "title": "Tetanus", - "excerpt": "Tetanus is a bacterial infection that leads to painful muscle contractions and possibly death.", - "kpi": "

35,000 people die from Tetanus every year.

\n

Half are children under the age of five.

\n" + "title": "Tetanus" } ] }, @@ -229,15 +169,11 @@ "entries": [ { "slug": "financing-healthcare", - "title": "Healthcare Spending", - "excerpt": "Healthcare is key to make progress against poor health. How is it financed?", - "kpi": "

Healthcare funding is essential for good health.

\n" + "title": "Healthcare Spending" }, { "slug": "vaccination", - "title": "Vaccination", - "excerpt": "Vaccines are key in making progress against infectious diseases and save millions of lives every year.", - "kpi": "\n" + "title": "Vaccination" } ] }, @@ -247,57 +183,39 @@ "entries": [ { "slug": "life-expectancy", - "title": "Life Expectancy", - "excerpt": "When and why did the average age at which people die increase and how can we make further progress against early death?", - "kpi": "

The global average life expectancy is 73 years.

\n

The global inequality is large.

\n" + "title": "Life Expectancy" }, { "slug": "child-mortality", - "title": "Child and Infant Mortality", - "excerpt": "Why are children dying and what can be done to prevent it?", - "kpi": "

5.2 million children younger than five die every year.

\n

The global child mortality rate is 3.8%.

\n" + "title": "Child and Infant Mortality" }, { "slug": "maternal-mortality", - "title": "Maternal Mortality", - "excerpt": "What could be more tragic than a mother losing her life in the moment that she is giving birth to her newborn? Why are mothers dying and what can be done to prevent these deaths?", - "kpi": "

295,000 women die from pregnancy-related causes every year.

\n" + "title": "Maternal Mortality" }, { "slug": "health-meta", - "title": "Global Health", - "excerpt": "An overview of our research on global health.", - "kpi": "

The world has seen great improvements in health.

\n

But there are still large inequalities.

\n" + "title": "Global Health" }, { "slug": "causes-of-death", - "title": "Causes of Death", - "excerpt": "How did the causes of death change over time?", - "kpi": "

57 million people die every year.

\n

What do they die from?

\n" + "title": "Causes of Death" }, { "slug": "burden-of-disease", - "title": "Burden of Disease", - "excerpt": "How is the burden of disease distributed and how did it change over time?", - "kpi": "

The global burden of disease is large.

\n

Per year 2.5 billion healthy life years are lost due to diseases, accidents, and premature deaths

\n" + "title": "Burden of Disease" }, { "slug": "cancer", - "title": "Cancer", - "excerpt": "Cancers are one of the leading causes of death globally. Are we making progress against cancer?", - "kpi": "

10.1 million people die from cancer every year.

\n

51% are younger than 70 years old.

\n" + "title": "Cancer" }, { "slug": "mental-health", - "title": "Mental Health", - "excerpt": "Mental health has a significant impact on people’s lives and wellbeing. To support people with mental illnesses, we need better data to understand them.", - "kpi": "" + "title": "Mental Health" }, { "slug": "suicide", - "title": "Suicides", - "excerpt": "Suicide rates can be reduced with greater understanding and support for people at risk.", - "kpi": "

760,000 die from suicide per year.

\n

59% are younger than 50 years old.

\n" + "title": "Suicides" } ] } @@ -314,33 +232,23 @@ "entries": [ { "slug": "nuclear-energy", - "title": "Nuclear Energy", - "excerpt": "Explore global data on nuclear energy production, and the safety of nuclear technologies.", - "kpi": "

Nuclear is a safe and low-carbon source of energy.

\n" + "title": "Nuclear Energy" }, { "slug": "energy-access", - "title": "Access to Energy", - "excerpt": "Access to electricity and clean cooking fuels are vital for a good standard of living and good health.", - "kpi": "

10% of the world do not have access to electricity.

\n

40% do not have access to clean fuels for cooking.

\n" + "title": "Access to Energy" }, { "slug": "energy", - "title": "Energy", - "excerpt": "What energy sources does the world rely on? What is this energy used for? And how does it change over time?", - "kpi": "

Global energy production has grown 2.5-fold in the past 50 years.

\n" + "title": "Energy" }, { "slug": "renewable-energy", - "title": "Renewable Energy", - "excerpt": "Solar, wind, hydropower, and other renewable energy sources currently account for a small share of global energy. But they’re growing quickly and can play a key role in tackling climate change.", - "kpi": "

10% of global primary energy production comes from modern renewable sources.

\n" + "title": "Renewable Energy" }, { "slug": "fossil-fuels", - "title": "Fossil Fuels", - "excerpt": "Coal, gas and oil were key to industrialization and rising prosperity, but their large impact on health and the climate mean that we should transition away from these sources of energy.", - "kpi": "

84% of global primary energy comes from fossil fuels.

\n

Deaths per TWh range from 2.8 for gas to 24.6 for coal.

\n" + "title": "Fossil Fuels" } ] }, @@ -350,21 +258,15 @@ "entries": [ { "slug": "lead-pollution", - "title": "Lead Pollution", - "excerpt": "Lead pollution is a widespread problem that receives little attention. What is the scale of the problem and how can we tackle it?", - "kpi": "

Around one-in-three children globally suffer from lead poisoning.

\n" + "title": "Lead Pollution" }, { "slug": "plastic-pollution", - "title": "Plastic Pollution", - "excerpt": "The use of plastics has many benefits – it is affordable, versatile, resistant, and can help reduce other forms of waste – especially food waste. However, when poorly managed it can pollute the environment and our oceans.\nWhere does the plastic in our oceans come from and what can we do to reduce plastic pollution?", - "kpi": "\n" + "title": "Plastic Pollution" }, { "slug": "oil-spills", - "title": "Oil Spills", - "excerpt": "How often do oil spills happen? How did the frequency of oil spills change over time?", - "kpi": "

Oil spills can have a large negative impact on the environment.

\n" + "title": "Oil Spills" } ] }, @@ -374,39 +276,27 @@ "entries": [ { "slug": "co2-and-greenhouse-gas-emissions", - "title": "CO₂ and Greenhouse Gas Emissions", - "excerpt": "Who is emitting greenhouse gases? Which countries and which sectors? And what needs to happen to reduce emissions?", - "kpi": "

35 billion tonnes of CO₂ are emitted every year.

\n" + "title": "CO₂ and Greenhouse Gas Emissions" }, { "slug": "climate-change", - "title": "Climate Change", - "excerpt": "How are increasing greenhouse gas emissions affecting the climate? What are the implications for sea level rise; sea ice area; and other impacts?", - "kpi": "

Average global temperature has increased by 1.2°C since pre-industrial times

\n" + "title": "Climate Change" }, { "slug": "air-pollution", - "title": "Air Pollution", - "excerpt": "Our overview on both indoor and outdoor air pollution.", - "kpi": "

6.7 million people die prematurely from air pollution each year.

\n" + "title": "Air Pollution" }, { "slug": "outdoor-air-pollution", - "title": "Outdoor Air Pollution", - "excerpt": "Outdoor air pollution is one of the world’s largest health and environmental problems.", - "kpi": "

4.5 million people die prematurely from outdoor air pollution every year.

\n

44% are younger than 70 years old.

\n" + "title": "Outdoor Air Pollution" }, { "slug": "indoor-air-pollution", - "title": "Indoor Air Pollution", - "excerpt": "Indoor air pollution – caused by the burning of firewood, crop waste, and dung for cooking and heating – is a major health risk of the world’s poorest.", - "kpi": "

2.3 million people die prematurely from indoor air pollution every year.

\n

58% are younger than 70 years old.

\n" + "title": "Indoor Air Pollution" }, { "slug": "ozone-layer", - "title": "Ozone Layer", - "excerpt": "Humans were emitting large amounts of gases that depleted the ozone layer. But in the 1980s the world came together to tackle the problem. Emissions have fallen by more than 99%.", - "kpi": "

Emissions of ozone-depleting gases have fallen by 98%.

\n

But it will take decades for the ozone layer to recover.

\n" + "title": "Ozone Layer" } ] }, @@ -416,27 +306,19 @@ "entries": [ { "slug": "clean-water-sanitation", - "title": "Clean Water and Sanitation", - "excerpt": "Explore global access to clean water and sanitation.", - "kpi": "

One-quarter of the world do not have access to safe drinking water

\n" + "title": "Clean Water and Sanitation" }, { "slug": "water-access", - "title": "Clean Water", - "excerpt": "Clean and safe water is essential for good health.\nHow did access change over time? Where do people lack access?", - "kpi": "

2.1 billion people do not have access to safe drinking water.

\n

That's 26% of the world population.

\n" + "title": "Clean Water" }, { "slug": "sanitation", - "title": "Sanitation", - "excerpt": "Access to safe sanitation is essential for reducing deaths from infectious disease, preventing malnutrition and providing dignity. \nWhat is the global situation today and how can we make progress?", - "kpi": "

3.7 billion people do not have access to safely managed sanitation.

\n

That's 46% of the world population.

\n" + "title": "Sanitation" }, { "slug": "water-use-stress", - "title": "Water Use and Stress", - "excerpt": "Freshwater resources across the world are the focus of this entry. How much water do we use? How did it change over time?", - "kpi": "\n" + "title": "Water Use and Stress" } ] }, @@ -446,33 +328,23 @@ "entries": [ { "slug": "biodiversity", - "title": "Biodiversity", - "excerpt": "Explore the diversity of wildlife across the planet. What are species threatened with? What can we do to prevent biodiversity loss?", - "kpi": "

Global trends in biodiversity are mixed, but overall it's in steep decline

\n" + "title": "Biodiversity" }, { "slug": "environmental-impacts-of-food", - "title": "Environmental Impacts of Food Production", - "excerpt": "What are the environmental impacts of food production? How do we reduce the impacts of agriculture on the environment?", - "kpi": "

26% of global greenhouse gas emissions come from food production.

\n

50% of the world's habitable land is used for agriculture.

\n" + "title": "Environmental Impacts of Food Production" }, { "slug": "forests-and-deforestation", - "title": "Forests and Deforestation", - "excerpt": "How are forests distributed across the world? How much do we lose to deforestation every year?", - "kpi": "

31% of the world’s land area is covered by forest.

\n" + "title": "Forests and Deforestation" }, { "slug": "land-use", - "title": "Land Use", - "excerpt": "How is humanity using the Earth’s land? And how can we decrease our land use so that more land is left for wildlife?", - "kpi": "\n" + "title": "Land Use" }, { "slug": "natural-disasters", - "title": "Natural Disasters", - "excerpt": "Where and from which disasters do people die? What can we do to prevent deaths from natural disasters?", - "kpi": "\n" + "title": "Natural Disasters" } ] } @@ -484,9 +356,7 @@ "entries": [ { "slug": "animal-welfare", - "title": "Animal Welfare", - "excerpt": "", - "kpi": "" + "title": "Animal Welfare" } ], "subcategories": [ @@ -496,57 +366,39 @@ "entries": [ { "slug": "hunger-and-undernourishment", - "title": "Hunger and Undernourishment", - "excerpt": "What are the consequences of undernourishment and how can we make progress against hunger and undernourishment?", - "kpi": "

9% of the world population – 660 million people – are undernourished.

\n

22% of children younger than five are ‘stunted’.

\n" + "title": "Hunger and Undernourishment" }, { "slug": "famines", - "title": "Famines", - "excerpt": "In many parts of the world famines have been common in the past. What causes famines? How can famines be averted?", - "kpi": "

Around 130 million people died in famines during the last 150 years.

\n

This estimate is based on our historical reconstructions.

\n" + "title": "Famines" }, { "slug": "food-supply", - "title": "Food Supply", - "excerpt": "How had the availability of food changed over time? How does food supply vary across the world today?", - "kpi": "

2,861 kcal per day is the global average food supply per person.

\n

There are large inequalities in food supply across countries.

\n" + "title": "Food Supply" }, { "slug": "human-height", - "title": "Human Height", - "excerpt": "The average height of a population can inform us about the nutrition and living conditions of populations in the past for which we have little other data.", - "kpi": "

The average young adult is about 5% taller today than 100 years ago.

\n

Human height gives us an indicator of changes in health and nutrition in the past.

\n" + "title": "Human Height" }, { "slug": "micronutrient-deficiency", - "title": "Micronutrient Deficiency", - "excerpt": "Food is not only a source of energy and protein, but also micronutrients – vitamins and minerals – which are essential to good health.\nWho is most affected by the ‘hidden hunger’ of micronutrient deficiency?", - "kpi": "

An estimated 2 billion people are deficient in essential micronutrients.

\n" + "title": "Micronutrient Deficiency" }, { "slug": "diet-compositions", - "title": "Diet Compositions", - "excerpt": "What do people across the world eat?", - "kpi": "

A diverse diet is essential for good nutrition.

\n

There are large inequalities in dietary diversity between countries.

\n" + "title": "Diet Compositions" }, { "slug": "food-prices", - "title": "Food Prices", - "excerpt": "Food needs to be affordable for people, and at the same it is a key source of income for one-quarter of the world’s labor force.", - "kpi": "

Three billion people cannot afford a healthy diet.

\n

Food prices are important for both consumers and farmers.

\n" + "title": "Food Prices" }, { "slug": "obesity", - "title": "Obesity", - "excerpt": "When did obesity increase? How do rates vary across the world? What is the health impact?", - "kpi": "

13% of adults are obese, globally.

\n

Obesity is responsible for 5 million premature deaths every year.

\n" + "title": "Obesity" }, { "slug": "alcohol-consumption", - "title": "Alcohol Consumption", - "excerpt": "Who consumes the most alcohol? How has consumption changed over time? And what are the health impacts?", - "kpi": "

2.4 million people die prematurely from alcohol consumption every year.

\n

71% are younger than 70 years old.

\n" + "title": "Alcohol Consumption" } ] }, @@ -556,33 +408,23 @@ "entries": [ { "slug": "farm-size", - "title": "Farm Size and Productivity", - "excerpt": "How does farm size vary across the world? How much of farmland is held by smallholders?", - "kpi": "

Most of the world's farmers are smallholders, with less than two hectares of land

\n" + "title": "Farm Size and Productivity" }, { "slug": "agricultural-production", - "title": "Agricultural Production", - "excerpt": "How much, and what types of food, do countries produce across the world?", - "kpi": "

The world produces more than enough food for everyone.

\n

But it's unequally distributed across the world.

\n" + "title": "Agricultural Production" }, { "slug": "environmental-impacts-of-food", - "title": "Environmental Impacts of Food Production", - "excerpt": "What are the environmental impacts of food production? How do we reduce the impacts of agriculture on the environment?", - "kpi": "

26% of global greenhouse gas emissions come from food production.

\n

50% of the world's habitable land is used for agriculture.

\n" + "title": "Environmental Impacts of Food Production" }, { "slug": "crop-yields", - "title": "Crop Yields", - "excerpt": "Increasing crop yields is crucial to improve food security, living standards, and reduce human impacts on the environment.", - "kpi": "

Global average cereal yield is 4 tonnes per hectare.

\n

But in many regions yields are much lower.

\n" + "title": "Crop Yields" }, { "slug": "meat-production", - "title": "Meat and Dairy Production", - "excerpt": "Meat is an important source of nutrition for people around the world. How quickly is demand growing? And what are the implications for animal welfare and the earth’s environment?", - "kpi": "

72 billion animals are slaughtered every year for meat production.

\n" + "title": "Meat and Dairy Production" } ] }, @@ -592,27 +434,19 @@ "entries": [ { "slug": "employment-in-agriculture", - "title": "Employment in Agriculture", - "excerpt": "Once the majority of human labor was dedicated to food production. When and how did this change? What is the global distribution of agricultural labor today?", - "kpi": "

27% of the world’s labor force is employed in agriculture.

\n" + "title": "Employment in Agriculture" }, { "slug": "land-use", - "title": "Land Use", - "excerpt": "How is humanity using the Earth’s land? And how can we decrease our land use so that more land is left for wildlife?", - "kpi": "\n" + "title": "Land Use" }, { "slug": "fertilizers", - "title": "Fertilizers", - "excerpt": "Fertilizers supply plants with nutrients that are essential for growth.\nHow important are fertilizers? How does their use vary across the world?", - "kpi": "

The world produces more than 200 million tonnes of fertilizer each year.

\n" + "title": "Fertilizers" }, { "slug": "pesticides", - "title": "Pesticides", - "excerpt": "Pesticides are used to protect plants from weeds, fungi, or insects. Where are they used? What is their impact?", - "kpi": "

Pesticides are often used to protect crop yields.

\n

There are large differences in its use across the world.

\n" + "title": "Pesticides" } ] } @@ -629,33 +463,23 @@ "entries": [ { "slug": "government-spending", - "title": "Government Spending", - "excerpt": "What do governments spend their financial resources on?", - "kpi": "

Government spending has increased significantly, but with large differences across the world.

\n" + "title": "Government Spending" }, { "slug": "taxation", - "title": "Taxation", - "excerpt": "Taxes are the most important source of government revenue. Who is paying how much and how do tax systems differ?", - "kpi": "

Tax revenues account for more than 80% of total government revenue in about half of the countries in the world.

\n

And for more than 50% in almost every country.

\n" + "title": "Taxation" }, { "slug": "military-personnel-spending", - "title": "Military Personnel and Spending", - "excerpt": "How large are countries’ militaries? How much do they spend on their armed forces? Explore global data on military personnel and spending.", - "kpi": "\n" + "title": "Military Personnel and Spending" }, { "slug": "financing-healthcare", - "title": "Healthcare Spending", - "excerpt": "Healthcare is key to make progress against poor health. How is it financed?", - "kpi": "

Healthcare funding is essential for good health.

\n" + "title": "Healthcare Spending" }, { "slug": "financing-education", - "title": "Education Spending", - "excerpt": "How is education financed? How much do we spend on it? What are the returns?", - "kpi": "

Funding for education is growing across the world, but large gaps still exist.

\n" + "title": "Education Spending" } ] }, @@ -665,21 +489,15 @@ "entries": [ { "slug": "economic-inequality", - "title": "Economic Inequality", - "excerpt": "", - "kpi": "

Many countries have high levels of economic inequality. Inequality across the world as a whole has fallen but remains vast.

\n" + "title": "Economic Inequality" }, { "slug": "poverty", - "title": "Poverty", - "excerpt": "How has poverty changed over time? And what can the world do to win the fight against poverty?", - "kpi": "

8% of the world population were living on less than $2.15 per day before the pandemic.

\n

59% were living on less than $10 per day.

\n" + "title": "Poverty" }, { "slug": "economic-growth", - "title": "Economic Growth", - "excerpt": "All of today’s rich countries were poor in the past – how do poor countries become rich?", - "kpi": "

The world has become much more prosperous, but in some countries incomes remain very low.

\n" + "title": "Economic Growth" } ] }, @@ -689,9 +507,7 @@ "entries": [ { "slug": "economic-inequality-by-gender", - "title": "Economic Inequality by Gender", - "excerpt": "What is determining the inequality in incomes, jobs, and wealth between men and women?", - "kpi": "

In most countries the gender pay gap has reduced, but inequalities are still large and common.

\n" + "title": "Economic Inequality by Gender" } ] }, @@ -701,21 +517,15 @@ "entries": [ { "slug": "child-labor", - "title": "Child Labor", - "excerpt": "Why and where do children work? How did child labor change over time?", - "kpi": "

An estimated 17% of children globally work.

\n" + "title": "Child Labor" }, { "slug": "working-hours", - "title": "Working Hours", - "excerpt": "How much time do people across the world spend working? How have working hours changed over time, and what do these changes matter for people’s lives? Explore data and research on working hours.", - "kpi": "

Many people have to work long hours for very low incomes.

\n" + "title": "Working Hours" }, { "slug": "female-labor-supply", - "title": "Women’s Employment", - "excerpt": "What is determining whether women participate in the labor market? How is it changing?", - "kpi": "

Women’s labor force participation is 47% globally with large differences between countries.

\n" + "title": "Women’s Employment" } ] }, @@ -725,9 +535,7 @@ "entries": [ { "slug": "corruption", - "title": "Corruption", - "excerpt": "How common is corruption? What impact does it have? And what can be done to reduce it?", - "kpi": "

Corruption is a common problem in many countries and sectors.

\n" + "title": "Corruption" } ] }, @@ -737,21 +545,15 @@ "entries": [ { "slug": "migration", - "title": "Migration", - "excerpt": "Migration has been an important source of economic development and poverty reduction. Explore data on global migration.", - "kpi": "" + "title": "Migration" }, { "slug": "trade-and-globalization", - "title": "Trade and Globalization", - "excerpt": "How did international trade and globalization change over time? What is the structure today? And what is its impact?", - "kpi": "" + "title": "Trade and Globalization" }, { "slug": "tourism", - "title": "Tourism", - "excerpt": "How often do people travel for pleasure? What role does tourism play in economies across the world? Explore global data on tourism.", - "kpi": "

Many people travel for pleasure, and tourism plays a big role in many economies across the world.

\n" + "title": "Tourism" } ] } @@ -768,21 +570,15 @@ "entries": [ { "slug": "global-education", - "title": "Global Education", - "excerpt": "The overview of our research on global education.", - "kpi": "

Global education has improved over recent decades, but much more progress is possible.

\n" + "title": "Global Education" }, { "slug": "literacy", - "title": "Literacy", - "excerpt": "Being able to read and write opens up the world of education and knowledge.\nWhen and why did more people become literate? How can progress continue?", - "kpi": "\n" + "title": "Literacy" }, { "slug": "research-and-development", - "title": "Research and Development", - "excerpt": "Research and development underpin nearly all of the transformative changes the world has seen.", - "kpi": "" + "title": "Research and Development" } ] }, @@ -792,9 +588,7 @@ "entries": [ { "slug": "financing-education", - "title": "Education Spending", - "excerpt": "How is education financed? How much do we spend on it? What are the returns?", - "kpi": "

Funding for education is growing across the world, but large gaps still exist.

\n" + "title": "Education Spending" } ] }, @@ -804,15 +598,11 @@ "entries": [ { "slug": "books", - "title": "Books", - "excerpt": "Books have been at the center of science and the arts for centuries. How has the production and sales of books changed over time?", - "kpi": "

Book publication has been a key driver of knowledge-sharing and education.

\n" + "title": "Books" }, { "slug": "internet", - "title": "Internet", - "excerpt": "More than half of the world is online. But the internet is still young.", - "kpi": "\n" + "title": "Internet" } ] } @@ -829,39 +619,27 @@ "entries": [ { "slug": "artificial-intelligence", - "title": "Artificial Intelligence", - "excerpt": "AI is already having a large impact on our world. Explore research and data to understand the trajectory of this important technology.", - "kpi": "" + "title": "Artificial Intelligence" }, { "slug": "space-exploration-satellites", - "title": "Space Exploration and Satellites", - "excerpt": "Explore data and developments in space travel and satellite technologies.", - "kpi": "" + "title": "Space Exploration and Satellites" }, { "slug": "transport", - "title": "Transport", - "excerpt": "Explore trends in transport technologies and emissions across the world.", - "kpi": "

Transport is an important measure of technological progress

\n" + "title": "Transport" }, { "slug": "internet", - "title": "Internet", - "excerpt": "More than half of the world is online. But the internet is still young.", - "kpi": "\n" + "title": "Internet" }, { "slug": "research-and-development", - "title": "Research and Development", - "excerpt": "Research and development underpin nearly all of the transformative changes the world has seen.", - "kpi": "" + "title": "Research and Development" }, { "slug": "technological-change", - "title": "Technological Change", - "excerpt": "Technological change underpins so many of the developments we’ve seen in health, agriculture, energy and global development.", - "kpi": "

Technological progress has been a key driver of improved living standards.

\n" + "title": "Technological Change" } ] } @@ -878,9 +656,7 @@ "entries": [ { "slug": "trust", - "title": "Trust", - "excerpt": "Trust is essential for community, wellbeing, and effective cooperation. How does trust vary between different societies and locations and what matters for levels of trust?", - "kpi": "

Trust levels can vary a lot between countries and groups of society.

\n" + "title": "Trust" } ] }, @@ -890,45 +666,31 @@ "entries": [ { "slug": "clean-water-sanitation", - "title": "Clean Water and Sanitation", - "excerpt": "Explore global access to clean water and sanitation.", - "kpi": "

One-quarter of the world do not have access to safe drinking water

\n" + "title": "Clean Water and Sanitation" }, { "slug": "energy-access", - "title": "Access to Energy", - "excerpt": "Access to electricity and clean cooking fuels are vital for a good standard of living and good health.", - "kpi": "

10% of the world do not have access to electricity.

\n

40% do not have access to clean fuels for cooking.

\n" + "title": "Access to Energy" }, { "slug": "water-access", - "title": "Clean Water", - "excerpt": "Clean and safe water is essential for good health.\nHow did access change over time? Where do people lack access?", - "kpi": "

2.1 billion people do not have access to safe drinking water.

\n

That's 26% of the world population.

\n" + "title": "Clean Water" }, { "slug": "homelessness", - "title": "Homelessness", - "excerpt": "How many are homeless? How did homelessness change over time?", - "kpi": "

Homelessness is a problem in countries around the world.

\n" + "title": "Homelessness" }, { "slug": "indoor-air-pollution", - "title": "Indoor Air Pollution", - "excerpt": "Indoor air pollution – caused by the burning of firewood, crop waste, and dung for cooking and heating – is a major health risk of the world’s poorest.", - "kpi": "

2.3 million people die prematurely from indoor air pollution every year.

\n

58% are younger than 70 years old.

\n" + "title": "Indoor Air Pollution" }, { "slug": "light-at-night", - "title": "Light at Night", - "excerpt": "Light at night was once expensive everywhere. In some places people are still lacking light at night, while in other places light became extremely cheap.", - "kpi": "

Light at night was once expensive everywhere. While prices have plummeted, many people still do not have access to artificial light.

\n" + "title": "Light at Night" }, { "slug": "sanitation", - "title": "Sanitation", - "excerpt": "Access to safe sanitation is essential for reducing deaths from infectious disease, preventing malnutrition and providing dignity. \nWhat is the global situation today and how can we make progress?", - "kpi": "

3.7 billion people do not have access to safely managed sanitation.

\n

That's 46% of the world population.

\n" + "title": "Sanitation" } ] }, @@ -938,21 +700,15 @@ "entries": [ { "slug": "time-use", - "title": "Time Use", - "excerpt": "How do people across the world spend their time? How do daily activities differ across countries, and how do these differences matter for people’s lives? Explore data and research on time use.", - "kpi": "

Time is the ultimate limited resource

\n" + "title": "Time Use" }, { "slug": "working-hours", - "title": "Working Hours", - "excerpt": "How much time do people across the world spend working? How have working hours changed over time, and what do these changes matter for people’s lives? Explore data and research on working hours.", - "kpi": "

Many people have to work long hours for very low incomes.

\n" + "title": "Working Hours" }, { "slug": "tourism", - "title": "Tourism", - "excerpt": "How often do people travel for pleasure? What role does tourism play in economies across the world? Explore global data on tourism.", - "kpi": "

Many people travel for pleasure, and tourism plays a big role in many economies across the world.

\n" + "title": "Tourism" } ] }, @@ -962,15 +718,11 @@ "entries": [ { "slug": "marriages-and-divorces", - "title": "Marriages and Divorces", - "excerpt": "How is the institution of marriage changing? What percentage of marriages end in divorce? Explore global data on marriages and divorces.", - "kpi": "

The institution of marriage is changing quickly

\n" + "title": "Marriages and Divorces" }, { "slug": "social-connections-and-loneliness", - "title": "Loneliness and Social Connections", - "excerpt": "Family and friends are important for our well-being. In this article we explore data on loneliness and social connections, and review available evidence on the link between social connections and well-being.", - "kpi": "

Loneliness is common across the world.

\n" + "title": "Loneliness and Social Connections" } ] }, @@ -980,15 +732,11 @@ "entries": [ { "slug": "happiness-and-life-satisfaction", - "title": "Happiness and Life Satisfaction", - "excerpt": "Self-reported life satisfaction differs widely between people and between countries. What explains these differences?", - "kpi": "

Life satisfaction and happiness vary widely both within and among countries.

\n" + "title": "Happiness and Life Satisfaction" }, { "slug": "human-development-index", - "title": "Human Development Index (HDI)", - "excerpt": "The HDI is a measure of human development that captures health, education, and income. How does the index vary around the world, and how did it change over time?", - "kpi": "

Health, education and living standards have increased in recent decades, but more progress is needed.

\n" + "title": "Human Development Index (HDI)" } ] } @@ -1005,33 +753,23 @@ "entries": [ { "slug": "state-capacity", - "title": "State Capacity", - "excerpt": "", - "kpi": "" + "title": "State Capacity" }, { "slug": "lgbt-rights", - "title": "LGBT+ Rights", - "excerpt": "How has the protection of LGBT+ rights changed over time? How does it differ across countries? Explore global data on LGBT+ rights.", - "kpi": "

LGBT+ rights are much more protected than in the past, but are often a lot less protected than those of straight and cisgender people.

\n" + "title": "LGBT+ Rights" }, { "slug": "women-rights", - "title": "Women’s Rights", - "excerpt": "How has the protection of women’s rights changed over time? How does it differ across countries? Explore global data and research on women’s rights.", - "kpi": "

Women's rights are much more protected than in the past, but are often a lot less protected than those of men.

\n" + "title": "Women’s Rights" }, { "slug": "child-labor", - "title": "Child Labor", - "excerpt": "Why and where do children work? How did child labor change over time?", - "kpi": "

An estimated 17% of children globally work.

\n" + "title": "Child Labor" }, { "slug": "human-rights", - "title": "Human Rights", - "excerpt": "How has the protection of human rights changed over time? How does it differ across countries, and between social and demographic groups? Explore global data on human rights.", - "kpi": "

Human rights are much more protected than in the past, but there are big differences between countries.

\n" + "title": "Human Rights" } ] }, @@ -1041,15 +779,11 @@ "entries": [ { "slug": "democracy", - "title": "Democracy", - "excerpt": "How has democracy spread across countries? Are we moving towards a more democratic world? Explore global data and research on democracy.", - "kpi": "\n" + "title": "Democracy" }, { "slug": "corruption", - "title": "Corruption", - "excerpt": "How common is corruption? What impact does it have? And what can be done to reduce it?", - "kpi": "

Corruption is a common problem in many countries and sectors.

\n" + "title": "Corruption" } ] } @@ -1066,33 +800,23 @@ "entries": [ { "slug": "biological-and-chemical-weapons", - "title": "Biological and Chemical Weapons", - "excerpt": "Which countries have pursued, possessed, or used biological and chemical weapons recently and historically? Which countries have joined the international treaties to eliminate them?", - "kpi": "

Fewer countries use, possess, and pursue biological and chemical weapons.

\n" + "title": "Biological and Chemical Weapons" }, { "slug": "war-and-peace", - "title": "War and Peace", - "excerpt": "Humans are capable of atrocious cruelty – the history of war makes this all too clear. How many died in war? And what are the prospects for making the world more peaceful?", - "kpi": "\n" + "title": "War and Peace" }, { "slug": "military-personnel-spending", - "title": "Military Personnel and Spending", - "excerpt": "How large are countries’ militaries? How much do they spend on their armed forces? Explore global data on military personnel and spending.", - "kpi": "\n" + "title": "Military Personnel and Spending" }, { "slug": "terrorism", - "title": "Terrorism", - "excerpt": "The attacks of terrorists receive a lot of attention from the media and often dominate the public discourse. How many people die from these attacks and how did it change over time?", - "kpi": "\n" + "title": "Terrorism" }, { "slug": "nuclear-weapons", - "title": "Nuclear Weapons", - "excerpt": "The world’s nuclear powers possess around 9,500 nuclear warheads in total. These weapons have the capacity to kill hundreds of millions of people directly, and billions due to subsequent effects on agriculture.", - "kpi": "

The world’s nuclear powers have more than 9,000 nuclear warheads.

\n" + "title": "Nuclear Weapons" } ] }, @@ -1102,21 +826,15 @@ "entries": [ { "slug": "state-capacity", - "title": "State Capacity", - "excerpt": "", - "kpi": "" + "title": "State Capacity" }, { "slug": "violence-against-rights-for-children", - "title": "Violence Against Children and Children’s Rights", - "excerpt": "How common is physical and emotional violence against children? How did it change over time?", - "kpi": "

Violence against children in various forms has fallen, but still occurs today.

\n" + "title": "Violence Against Children and Children’s Rights" }, { "slug": "homicides", - "title": "Homicides", - "excerpt": "How common are homicides? How does this differ across countries? And how is this changing over time? Explore global data on homicides.", - "kpi": "

Globally around 400,000 people die from homicide each year.

\n" + "title": "Homicides" } ] } From 82bebf4c1d05b7aee20cead971f37cd50f207633 Mon Sep 17 00:00:00 2001 From: Matthieu Bergel Date: Tue, 23 Jan 2024 09:39:32 +0000 Subject: [PATCH 3/6] =?UTF-8?q?=E2=9C=A8(nav)=20use=20static=20navigation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- baker/siteRenderers.tsx | 5 +- db/wpdb.ts | 96 +- .../types/src/domainTypes/ContentGraph.ts | 5 +- site/SiteNavigation.json | 844 ----------------- site/SiteNavigation.tsx | 845 ++++++++++++++++++ site/SiteNavigationTopics.tsx | 2 +- 6 files changed, 853 insertions(+), 944 deletions(-) delete mode 100644 site/SiteNavigation.json diff --git a/baker/siteRenderers.tsx b/baker/siteRenderers.tsx index b488ed5f3f7..9e1b2a1610d 100644 --- a/baker/siteRenderers.tsx +++ b/baker/siteRenderers.tsx @@ -62,7 +62,6 @@ import { CountryProfileSpec } from "../site/countryProfileProjects.js" import { formatPost } from "./formatWordpressPost.js" import { getBlogIndex, - getEntriesByCategory, getLatestPostRevision, getPostBySlug, isPostCitable, @@ -92,6 +91,7 @@ import { postsTable } from "../db/model/Post.js" import { GdocPost } from "../db/model/Gdoc/GdocPost.js" import { logErrorAndMaybeSendToBugsnag } from "../serverUtils/errorLog.js" import { GdocFactory } from "../db/model/Gdoc/GdocFactory.js" +import { SiteNavigationStatic } from "../site/SiteNavigation.js" export const renderToHtmlPage = (element: any) => `${ReactDOMServer.renderToStaticMarkup(element)}` @@ -204,8 +204,7 @@ export const renderPreview = async (postId: number): Promise => { } export const renderMenuJson = async () => { - const categories = await getEntriesByCategory() - return JSON.stringify({ categories: categories }) + return JSON.stringify(SiteNavigationStatic) } export const renderPost = async ( diff --git a/db/wpdb.ts b/db/wpdb.ts index e349bcb8a61..287b692a61e 100644 --- a/db/wpdb.ts +++ b/db/wpdb.ts @@ -49,6 +49,7 @@ import { import { TOPICS_CONTENT_GRAPH } from "../settings/clientSettings.js" import { GdocPost } from "./model/Gdoc/GdocPost.js" import { Link } from "./model/Link.js" +import {SiteNavigationStatic} from "../site/SiteNavigation.js" let _knexInstance: Knex @@ -326,102 +327,12 @@ const isEntryInSubcategories = (entry: EntryNode, subcategories: any): any => { }) } -// Retrieve a list of categories and their associated entries -let cachedEntries: CategoryWithEntries[] = [] -export const getEntriesByCategory = async (): Promise< - CategoryWithEntries[] -> => { - if (!isWordpressAPIEnabled) return [] - if (cachedEntries.length) return cachedEntries - - const first = 100 - // The filtering of cached entries below makes the $first argument - // less accurate, as it does not represent the exact number of entries - // returned per subcategories but rather their maximum number of entries. - const orderby = "TERM_ORDER" - - // hack: using the description field ("01", "02", etc.) to order the top - // categories as TERM_ORDER doesn't seem to work as expected anymore. - const query = ` - query getEntriesByCategory($first: Int, $orderby: TermObjectsConnectionOrderbyEnum!) { - categories(first: $first, where: {termTaxonomId: ${ENTRIES_CATEGORY_ID}, orderby: $orderby}) { - nodes { - name - children(first: $first, where: {orderby: DESCRIPTION}) { - nodes { - ...categoryWithEntries - children(first: $first, where: {orderby: $orderby}) { - nodes { - ...categoryWithEntries - } - } - } - } - } - } - } - - fragment categoryWithEntries on Category { - name - slug - pages(first: $first, where: {orderby: {field: MENU_ORDER, order: ASC}}) { - nodes { - slug - title - } - } - } - ` - const categories = await graphqlQuery(query, { first, orderby }) - - cachedEntries = categories.data.categories.nodes[0].children.nodes.map( - ({ name, slug, pages, children }: CategoryNode) => ({ - name: decodeHTML(name), - slug, - entries: pages.nodes - .filter( - (node: EntryNode) => - /* As entries are sometimes listed at all levels of the category hierarchy - (e.g. "Entries" > "Demographic Change" > "Life and Death" for "Child and - Infant Mortality"), it is necessary to filter out duplicates, by giving precedent to - the deepest level. In other words, if an entry is present in category 1 and category - 1.1, it will only show in category 1.1. - - N.B. Pre wp-graphql 0.6.0, entries would be returned at all levels of the category - hierarchy, no matter what categories were effectively selected. 0.6.0 fixes that - (cf. https://github.com/wp-graphql/wp-graphql/issues/1100). Even though this behaviour - has been fixed, we still have potential duplicates, from the multiple hierarchical - selection as noted above. The only difference is the nature of the duplicate, which can - now be considered more intentional as it is coming from the data / CMS. - Ultimately, this discrepency in the data should be addressed to make the system - less permissive. */ - !isEntryInSubcategories(node, children.nodes) - ) - .map((node: EntryNode) => getEntryNode(node)), - subcategories: children.nodes - .filter( - (subcategory: CategoryNode) => - subcategory.pages.nodes.length !== 0 - ) - .map(({ name, slug, pages }: CategoryNode) => ({ - name: decodeHTML(name), - slug, - entries: pages.nodes.map((node: EntryNode) => - getEntryNode(node) - ), - })), - }) - ) - - return cachedEntries -} - export const isPostCitable = async (post: FullPost): Promise => { - const entries = await getEntriesByCategory() + const entries = SiteNavigationStatic.categories return entries.some((category) => { return ( category.entries.some((entry) => entry.slug === post.slug) || - category.subcategories.some((subcategory: CategoryWithEntries) => { + (category.subcategories ?? []).some((subcategory: CategoryWithEntries) => { return subcategory.entries.some( (subCategoryEntry) => subCategoryEntry.slug === post.slug ) @@ -997,7 +908,6 @@ export const getTables = async (): Promise> => { export const flushCache = (): void => { cachedAuthorship = undefined - cachedEntries = [] cachedFeaturedImages = undefined getBlogIndex.cache.clear?.() cachedTables = undefined diff --git a/packages/@ourworldindata/types/src/domainTypes/ContentGraph.ts b/packages/@ourworldindata/types/src/domainTypes/ContentGraph.ts index 4f1763c371f..b0ed950b1b0 100644 --- a/packages/@ourworldindata/types/src/domainTypes/ContentGraph.ts +++ b/packages/@ourworldindata/types/src/domainTypes/ContentGraph.ts @@ -3,16 +3,15 @@ import { TopicId } from "./Various.js" export interface EntryMeta { slug: string title: string - excerpt: string - kpi: string } export interface CategoryWithEntries { name: string slug: string entries: EntryMeta[] - subcategories: CategoryWithEntries[] + subcategories?: CategoryWithEntries[] } + export enum GraphDocumentType { Topic = "topic", Article = "article", diff --git a/site/SiteNavigation.json b/site/SiteNavigation.json deleted file mode 100644 index 609dbbbeb15..00000000000 --- a/site/SiteNavigation.json +++ /dev/null @@ -1,844 +0,0 @@ -{ - "categories": [ - { - "name": "Population and Demographic Change", - "slug": "population", - "entries": [], - "subcategories": [ - { - "name": "Population Change", - "slug": "population-change", - "entries": [ - { - "slug": "population-growth", - "title": "Population Growth" - }, - { - "slug": "age-structure", - "title": "Age Structure" - }, - { - "slug": "gender-ratio", - "title": "Gender Ratio" - } - ] - }, - { - "name": "Life and Death", - "slug": "life-and-death", - "entries": [ - { - "slug": "life-expectancy", - "title": "Life Expectancy" - }, - { - "slug": "child-mortality", - "title": "Child and Infant Mortality" - }, - { - "slug": "fertility-rate", - "title": "Fertility Rate" - } - ] - }, - { - "name": "Distribution of the World Population", - "slug": "distribution-of-the-world-population", - "entries": [ - { - "slug": "urbanization", - "title": "Urbanization" - }, - { - "slug": "migration", - "title": "Migration" - } - ] - } - ] - }, - { - "name": "Health", - "slug": "health", - "entries": [ - { - "slug": "tuberculosis", - "title": "Tuberculosis" - }, - { - "slug": "pandemics", - "title": "Pandemics" - }, - { - "slug": "cardiovascular-diseases", - "title": "Cardiovascular Diseases" - } - ], - "subcategories": [ - { - "name": "Health Risks", - "slug": "health-risks", - "entries": [ - { - "slug": "lead-pollution", - "title": "Lead Pollution" - }, - { - "slug": "air-pollution", - "title": "Air Pollution" - }, - { - "slug": "outdoor-air-pollution", - "title": "Outdoor Air Pollution" - }, - { - "slug": "indoor-air-pollution", - "title": "Indoor Air Pollution" - }, - { - "slug": "obesity", - "title": "Obesity" - }, - { - "slug": "smoking", - "title": "Smoking" - }, - { - "slug": "alcohol-consumption", - "title": "Alcohol Consumption" - }, - { - "slug": "illicit-drug-use", - "title": "Opioids, Cocaine, Cannabis, and Other Illicit Drugs" - } - ] - }, - { - "name": "Infectious Diseases", - "slug": "infectious-diseases", - "entries": [ - { - "slug": "influenza", - "title": "Influenza" - }, - { - "slug": "monkeypox", - "title": "Mpox (monkeypox)" - }, - { - "slug": "coronavirus", - "title": "Coronavirus Pandemic (COVID-19)" - }, - { - "slug": "hiv-aids", - "title": "HIV / AIDS" - }, - { - "slug": "malaria", - "title": "Malaria" - }, - { - "slug": "eradication-of-diseases", - "title": "Eradication of Diseases" - }, - { - "slug": "diarrheal-diseases", - "title": "Diarrheal Diseases" - }, - { - "slug": "smallpox", - "title": "Smallpox" - }, - { - "slug": "polio", - "title": "Polio" - }, - { - "slug": "pneumonia", - "title": "Pneumonia" - }, - { - "slug": "tetanus", - "title": "Tetanus" - } - ] - }, - { - "name": "Health Institutions and Interventions", - "slug": "health-institutions-and-interventions", - "entries": [ - { - "slug": "financing-healthcare", - "title": "Healthcare Spending" - }, - { - "slug": "vaccination", - "title": "Vaccination" - } - ] - }, - { - "name": "Life and Death", - "slug": "life-death-health", - "entries": [ - { - "slug": "life-expectancy", - "title": "Life Expectancy" - }, - { - "slug": "child-mortality", - "title": "Child and Infant Mortality" - }, - { - "slug": "maternal-mortality", - "title": "Maternal Mortality" - }, - { - "slug": "health-meta", - "title": "Global Health" - }, - { - "slug": "causes-of-death", - "title": "Causes of Death" - }, - { - "slug": "burden-of-disease", - "title": "Burden of Disease" - }, - { - "slug": "cancer", - "title": "Cancer" - }, - { - "slug": "mental-health", - "title": "Mental Health" - }, - { - "slug": "suicide", - "title": "Suicides" - } - ] - } - ] - }, - { - "name": "Energy and Environment", - "slug": "environment", - "entries": [], - "subcategories": [ - { - "name": "Energy", - "slug": "energy", - "entries": [ - { - "slug": "nuclear-energy", - "title": "Nuclear Energy" - }, - { - "slug": "energy-access", - "title": "Access to Energy" - }, - { - "slug": "energy", - "title": "Energy" - }, - { - "slug": "renewable-energy", - "title": "Renewable Energy" - }, - { - "slug": "fossil-fuels", - "title": "Fossil Fuels" - } - ] - }, - { - "name": "Waste and Pollution", - "slug": "waste", - "entries": [ - { - "slug": "lead-pollution", - "title": "Lead Pollution" - }, - { - "slug": "plastic-pollution", - "title": "Plastic Pollution" - }, - { - "slug": "oil-spills", - "title": "Oil Spills" - } - ] - }, - { - "name": "Air and Climate", - "slug": "air-and-climate", - "entries": [ - { - "slug": "co2-and-greenhouse-gas-emissions", - "title": "CO₂ and Greenhouse Gas Emissions" - }, - { - "slug": "climate-change", - "title": "Climate Change" - }, - { - "slug": "air-pollution", - "title": "Air Pollution" - }, - { - "slug": "outdoor-air-pollution", - "title": "Outdoor Air Pollution" - }, - { - "slug": "indoor-air-pollution", - "title": "Indoor Air Pollution" - }, - { - "slug": "ozone-layer", - "title": "Ozone Layer" - } - ] - }, - { - "name": "Water", - "slug": "water", - "entries": [ - { - "slug": "clean-water-sanitation", - "title": "Clean Water and Sanitation" - }, - { - "slug": "water-access", - "title": "Clean Water" - }, - { - "slug": "sanitation", - "title": "Sanitation" - }, - { - "slug": "water-use-stress", - "title": "Water Use and Stress" - } - ] - }, - { - "name": "Land and Ecosystems", - "slug": "land-and-ecosystems", - "entries": [ - { - "slug": "biodiversity", - "title": "Biodiversity" - }, - { - "slug": "environmental-impacts-of-food", - "title": "Environmental Impacts of Food Production" - }, - { - "slug": "forests-and-deforestation", - "title": "Forests and Deforestation" - }, - { - "slug": "land-use", - "title": "Land Use" - }, - { - "slug": "natural-disasters", - "title": "Natural Disasters" - } - ] - } - ] - }, - { - "name": "Food and Agriculture", - "slug": "food", - "entries": [ - { - "slug": "animal-welfare", - "title": "Animal Welfare" - } - ], - "subcategories": [ - { - "name": "Nutrition", - "slug": "nutrition", - "entries": [ - { - "slug": "hunger-and-undernourishment", - "title": "Hunger and Undernourishment" - }, - { - "slug": "famines", - "title": "Famines" - }, - { - "slug": "food-supply", - "title": "Food Supply" - }, - { - "slug": "human-height", - "title": "Human Height" - }, - { - "slug": "micronutrient-deficiency", - "title": "Micronutrient Deficiency" - }, - { - "slug": "diet-compositions", - "title": "Diet Compositions" - }, - { - "slug": "food-prices", - "title": "Food Prices" - }, - { - "slug": "obesity", - "title": "Obesity" - }, - { - "slug": "alcohol-consumption", - "title": "Alcohol Consumption" - } - ] - }, - { - "name": "Food Production", - "slug": "food-production", - "entries": [ - { - "slug": "farm-size", - "title": "Farm Size and Productivity" - }, - { - "slug": "agricultural-production", - "title": "Agricultural Production" - }, - { - "slug": "environmental-impacts-of-food", - "title": "Environmental Impacts of Food Production" - }, - { - "slug": "crop-yields", - "title": "Crop Yields" - }, - { - "slug": "meat-production", - "title": "Meat and Dairy Production" - } - ] - }, - { - "name": "Agricultural Inputs", - "slug": "agricultural-inputs", - "entries": [ - { - "slug": "employment-in-agriculture", - "title": "Employment in Agriculture" - }, - { - "slug": "land-use", - "title": "Land Use" - }, - { - "slug": "fertilizers", - "title": "Fertilizers" - }, - { - "slug": "pesticides", - "title": "Pesticides" - } - ] - } - ] - }, - { - "name": "Poverty and Economic Development", - "slug": "growth-inequality", - "entries": [], - "subcategories": [ - { - "name": "Public Sector", - "slug": "public-sector", - "entries": [ - { - "slug": "government-spending", - "title": "Government Spending" - }, - { - "slug": "taxation", - "title": "Taxation" - }, - { - "slug": "military-personnel-spending", - "title": "Military Personnel and Spending" - }, - { - "slug": "financing-healthcare", - "title": "Healthcare Spending" - }, - { - "slug": "financing-education", - "title": "Education Spending" - } - ] - }, - { - "name": "Poverty and Prosperity", - "slug": "poverty-and-prosperity", - "entries": [ - { - "slug": "economic-inequality", - "title": "Economic Inequality" - }, - { - "slug": "poverty", - "title": "Poverty" - }, - { - "slug": "economic-growth", - "title": "Economic Growth" - } - ] - }, - { - "name": "Economic Inequality", - "slug": "economic-inequality", - "entries": [ - { - "slug": "economic-inequality-by-gender", - "title": "Economic Inequality by Gender" - } - ] - }, - { - "name": "Labor", - "slug": "labor", - "entries": [ - { - "slug": "child-labor", - "title": "Child Labor" - }, - { - "slug": "working-hours", - "title": "Working Hours" - }, - { - "slug": "female-labor-supply", - "title": "Women’s Employment" - } - ] - }, - { - "name": "Corruption", - "slug": "corruption", - "entries": [ - { - "slug": "corruption", - "title": "Corruption" - } - ] - }, - { - "name": "Trade and Migration", - "slug": "trade-migration", - "entries": [ - { - "slug": "migration", - "title": "Migration" - }, - { - "slug": "trade-and-globalization", - "title": "Trade and Globalization" - }, - { - "slug": "tourism", - "title": "Tourism" - } - ] - } - ] - }, - { - "name": "Education and Knowledge", - "slug": "education", - "entries": [], - "subcategories": [ - { - "name": "Educational Access and Outcomes", - "slug": "educational-outcomes", - "entries": [ - { - "slug": "global-education", - "title": "Global Education" - }, - { - "slug": "literacy", - "title": "Literacy" - }, - { - "slug": "research-and-development", - "title": "Research and Development" - } - ] - }, - { - "name": "Inputs to Education", - "slug": "inputs-to-education", - "entries": [ - { - "slug": "financing-education", - "title": "Education Spending" - } - ] - }, - { - "name": "Media", - "slug": "media-education", - "entries": [ - { - "slug": "books", - "title": "Books" - }, - { - "slug": "internet", - "title": "Internet" - } - ] - } - ] - }, - { - "name": "Innovation and Technological Change", - "slug": "technology", - "entries": [], - "subcategories": [ - { - "name": "Technological Change", - "slug": "technological-change", - "entries": [ - { - "slug": "artificial-intelligence", - "title": "Artificial Intelligence" - }, - { - "slug": "space-exploration-satellites", - "title": "Space Exploration and Satellites" - }, - { - "slug": "transport", - "title": "Transport" - }, - { - "slug": "internet", - "title": "Internet" - }, - { - "slug": "research-and-development", - "title": "Research and Development" - }, - { - "slug": "technological-change", - "title": "Technological Change" - } - ] - } - ] - }, - { - "name": "Living Conditions, Community and Wellbeing", - "slug": "work-life", - "entries": [], - "subcategories": [ - { - "name": "Culture", - "slug": "culture", - "entries": [ - { - "slug": "trust", - "title": "Trust" - } - ] - }, - { - "name": "Housing", - "slug": "housing", - "entries": [ - { - "slug": "clean-water-sanitation", - "title": "Clean Water and Sanitation" - }, - { - "slug": "energy-access", - "title": "Access to Energy" - }, - { - "slug": "water-access", - "title": "Clean Water" - }, - { - "slug": "homelessness", - "title": "Homelessness" - }, - { - "slug": "indoor-air-pollution", - "title": "Indoor Air Pollution" - }, - { - "slug": "light-at-night", - "title": "Light at Night" - }, - { - "slug": "sanitation", - "title": "Sanitation" - } - ] - }, - { - "name": "Time Use", - "slug": "time-use", - "entries": [ - { - "slug": "time-use", - "title": "Time Use" - }, - { - "slug": "working-hours", - "title": "Working Hours" - }, - { - "slug": "tourism", - "title": "Tourism" - } - ] - }, - { - "name": "Relationships", - "slug": "relationships", - "entries": [ - { - "slug": "marriages-and-divorces", - "title": "Marriages and Divorces" - }, - { - "slug": "social-connections-and-loneliness", - "title": "Loneliness and Social Connections" - } - ] - }, - { - "name": "Happiness and Wellbeing", - "slug": "happiness-wellbeing", - "entries": [ - { - "slug": "happiness-and-life-satisfaction", - "title": "Happiness and Life Satisfaction" - }, - { - "slug": "human-development-index", - "title": "Human Development Index (HDI)" - } - ] - } - ] - }, - { - "name": "Human Rights and Democracy", - "slug": "politics", - "entries": [], - "subcategories": [ - { - "name": "Human Rights", - "slug": "human-rights", - "entries": [ - { - "slug": "state-capacity", - "title": "State Capacity" - }, - { - "slug": "lgbt-rights", - "title": "LGBT+ Rights" - }, - { - "slug": "women-rights", - "title": "Women’s Rights" - }, - { - "slug": "child-labor", - "title": "Child Labor" - }, - { - "slug": "human-rights", - "title": "Human Rights" - } - ] - }, - { - "name": "Democracy and Corruption", - "slug": "democracy", - "entries": [ - { - "slug": "democracy", - "title": "Democracy" - }, - { - "slug": "corruption", - "title": "Corruption" - } - ] - } - ] - }, - { - "name": "Violence and War", - "slug": "violence-rights", - "entries": [], - "subcategories": [ - { - "name": "War and Peace", - "slug": "war-peace", - "entries": [ - { - "slug": "biological-and-chemical-weapons", - "title": "Biological and Chemical Weapons" - }, - { - "slug": "war-and-peace", - "title": "War and Peace" - }, - { - "slug": "military-personnel-spending", - "title": "Military Personnel and Spending" - }, - { - "slug": "terrorism", - "title": "Terrorism" - }, - { - "slug": "nuclear-weapons", - "title": "Nuclear Weapons" - } - ] - }, - { - "name": "Violence", - "slug": "violence", - "entries": [ - { - "slug": "state-capacity", - "title": "State Capacity" - }, - { - "slug": "violence-against-rights-for-children", - "title": "Violence Against Children and Children’s Rights" - }, - { - "slug": "homicides", - "title": "Homicides" - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/site/SiteNavigation.tsx b/site/SiteNavigation.tsx index 0f799f90694..3d7d2337eac 100644 --- a/site/SiteNavigation.tsx +++ b/site/SiteNavigation.tsx @@ -247,3 +247,848 @@ export const runSiteNavigation = ( document.querySelector(".site-navigation-root") ) } + +export const SiteNavigationStatic: {categories: CategoryWithEntries[]} = { + "categories": [ + { + "name": "Population and Demographic Change", + "slug": "population", + "entries": [], + "subcategories": [ + { + "name": "Population Change", + "slug": "population-change", + "entries": [ + { + "slug": "population-growth", + "title": "Population Growth" + }, + { + "slug": "age-structure", + "title": "Age Structure" + }, + { + "slug": "gender-ratio", + "title": "Gender Ratio" + } + ] + }, + { + "name": "Life and Death", + "slug": "life-and-death", + "entries": [ + { + "slug": "life-expectancy", + "title": "Life Expectancy" + }, + { + "slug": "child-mortality", + "title": "Child and Infant Mortality" + }, + { + "slug": "fertility-rate", + "title": "Fertility Rate" + } + ] + }, + { + "name": "Distribution of the World Population", + "slug": "distribution-of-the-world-population", + "entries": [ + { + "slug": "urbanization", + "title": "Urbanization" + }, + { + "slug": "migration", + "title": "Migration" + } + ] + } + ] + }, + { + "name": "Health", + "slug": "health", + "entries": [ + { + "slug": "tuberculosis", + "title": "Tuberculosis" + }, + { + "slug": "pandemics", + "title": "Pandemics" + }, + { + "slug": "cardiovascular-diseases", + "title": "Cardiovascular Diseases" + } + ], + "subcategories": [ + { + "name": "Health Risks", + "slug": "health-risks", + "entries": [ + { + "slug": "lead-pollution", + "title": "Lead Pollution" + }, + { + "slug": "air-pollution", + "title": "Air Pollution" + }, + { + "slug": "outdoor-air-pollution", + "title": "Outdoor Air Pollution" + }, + { + "slug": "indoor-air-pollution", + "title": "Indoor Air Pollution" + }, + { + "slug": "obesity", + "title": "Obesity" + }, + { + "slug": "smoking", + "title": "Smoking" + }, + { + "slug": "alcohol-consumption", + "title": "Alcohol Consumption" + }, + { + "slug": "illicit-drug-use", + "title": "Opioids, Cocaine, Cannabis, and Other Illicit Drugs" + } + ] + }, + { + "name": "Infectious Diseases", + "slug": "infectious-diseases", + "entries": [ + { + "slug": "influenza", + "title": "Influenza" + }, + { + "slug": "monkeypox", + "title": "Mpox (monkeypox)" + }, + { + "slug": "coronavirus", + "title": "Coronavirus Pandemic (COVID-19)" + }, + { + "slug": "hiv-aids", + "title": "HIV / AIDS" + }, + { + "slug": "malaria", + "title": "Malaria" + }, + { + "slug": "eradication-of-diseases", + "title": "Eradication of Diseases" + }, + { + "slug": "diarrheal-diseases", + "title": "Diarrheal Diseases" + }, + { + "slug": "smallpox", + "title": "Smallpox" + }, + { + "slug": "polio", + "title": "Polio" + }, + { + "slug": "pneumonia", + "title": "Pneumonia" + }, + { + "slug": "tetanus", + "title": "Tetanus" + } + ] + }, + { + "name": "Health Institutions and Interventions", + "slug": "health-institutions-and-interventions", + "entries": [ + { + "slug": "financing-healthcare", + "title": "Healthcare Spending" + }, + { + "slug": "vaccination", + "title": "Vaccination" + } + ] + }, + { + "name": "Life and Death", + "slug": "life-death-health", + "entries": [ + { + "slug": "life-expectancy", + "title": "Life Expectancy" + }, + { + "slug": "child-mortality", + "title": "Child and Infant Mortality" + }, + { + "slug": "maternal-mortality", + "title": "Maternal Mortality" + }, + { + "slug": "health-meta", + "title": "Global Health" + }, + { + "slug": "causes-of-death", + "title": "Causes of Death" + }, + { + "slug": "burden-of-disease", + "title": "Burden of Disease" + }, + { + "slug": "cancer", + "title": "Cancer" + }, + { + "slug": "mental-health", + "title": "Mental Health" + }, + { + "slug": "suicide", + "title": "Suicides" + } + ] + } + ] + }, + { + "name": "Energy and Environment", + "slug": "environment", + "entries": [], + "subcategories": [ + { + "name": "Energy", + "slug": "energy", + "entries": [ + { + "slug": "nuclear-energy", + "title": "Nuclear Energy" + }, + { + "slug": "energy-access", + "title": "Access to Energy" + }, + { + "slug": "energy", + "title": "Energy" + }, + { + "slug": "renewable-energy", + "title": "Renewable Energy" + }, + { + "slug": "fossil-fuels", + "title": "Fossil Fuels" + } + ] + }, + { + "name": "Waste and Pollution", + "slug": "waste", + "entries": [ + { + "slug": "lead-pollution", + "title": "Lead Pollution" + }, + { + "slug": "plastic-pollution", + "title": "Plastic Pollution" + }, + { + "slug": "oil-spills", + "title": "Oil Spills" + } + ] + }, + { + "name": "Air and Climate", + "slug": "air-and-climate", + "entries": [ + { + "slug": "co2-and-greenhouse-gas-emissions", + "title": "CO₂ and Greenhouse Gas Emissions" + }, + { + "slug": "climate-change", + "title": "Climate Change" + }, + { + "slug": "air-pollution", + "title": "Air Pollution" + }, + { + "slug": "outdoor-air-pollution", + "title": "Outdoor Air Pollution" + }, + { + "slug": "indoor-air-pollution", + "title": "Indoor Air Pollution" + }, + { + "slug": "ozone-layer", + "title": "Ozone Layer" + } + ] + }, + { + "name": "Water", + "slug": "water", + "entries": [ + { + "slug": "clean-water-sanitation", + "title": "Clean Water and Sanitation" + }, + { + "slug": "water-access", + "title": "Clean Water" + }, + { + "slug": "sanitation", + "title": "Sanitation" + }, + { + "slug": "water-use-stress", + "title": "Water Use and Stress" + } + ] + }, + { + "name": "Land and Ecosystems", + "slug": "land-and-ecosystems", + "entries": [ + { + "slug": "biodiversity", + "title": "Biodiversity" + }, + { + "slug": "environmental-impacts-of-food", + "title": "Environmental Impacts of Food Production" + }, + { + "slug": "forests-and-deforestation", + "title": "Forests and Deforestation" + }, + { + "slug": "land-use", + "title": "Land Use" + }, + { + "slug": "natural-disasters", + "title": "Natural Disasters" + } + ] + } + ] + }, + { + "name": "Food and Agriculture", + "slug": "food", + "entries": [ + { + "slug": "animal-welfare", + "title": "Animal Welfare" + } + ], + "subcategories": [ + { + "name": "Nutrition", + "slug": "nutrition", + "entries": [ + { + "slug": "hunger-and-undernourishment", + "title": "Hunger and Undernourishment" + }, + { + "slug": "famines", + "title": "Famines" + }, + { + "slug": "food-supply", + "title": "Food Supply" + }, + { + "slug": "human-height", + "title": "Human Height" + }, + { + "slug": "micronutrient-deficiency", + "title": "Micronutrient Deficiency" + }, + { + "slug": "diet-compositions", + "title": "Diet Compositions" + }, + { + "slug": "food-prices", + "title": "Food Prices" + }, + { + "slug": "obesity", + "title": "Obesity" + }, + { + "slug": "alcohol-consumption", + "title": "Alcohol Consumption" + } + ] + }, + { + "name": "Food Production", + "slug": "food-production", + "entries": [ + { + "slug": "farm-size", + "title": "Farm Size and Productivity" + }, + { + "slug": "agricultural-production", + "title": "Agricultural Production" + }, + { + "slug": "environmental-impacts-of-food", + "title": "Environmental Impacts of Food Production" + }, + { + "slug": "crop-yields", + "title": "Crop Yields" + }, + { + "slug": "meat-production", + "title": "Meat and Dairy Production" + } + ] + }, + { + "name": "Agricultural Inputs", + "slug": "agricultural-inputs", + "entries": [ + { + "slug": "employment-in-agriculture", + "title": "Employment in Agriculture" + }, + { + "slug": "land-use", + "title": "Land Use" + }, + { + "slug": "fertilizers", + "title": "Fertilizers" + }, + { + "slug": "pesticides", + "title": "Pesticides" + } + ] + } + ] + }, + { + "name": "Poverty and Economic Development", + "slug": "growth-inequality", + "entries": [], + "subcategories": [ + { + "name": "Public Sector", + "slug": "public-sector", + "entries": [ + { + "slug": "government-spending", + "title": "Government Spending" + }, + { + "slug": "taxation", + "title": "Taxation" + }, + { + "slug": "military-personnel-spending", + "title": "Military Personnel and Spending" + }, + { + "slug": "financing-healthcare", + "title": "Healthcare Spending" + }, + { + "slug": "financing-education", + "title": "Education Spending" + } + ] + }, + { + "name": "Poverty and Prosperity", + "slug": "poverty-and-prosperity", + "entries": [ + { + "slug": "economic-inequality", + "title": "Economic Inequality" + }, + { + "slug": "poverty", + "title": "Poverty" + }, + { + "slug": "economic-growth", + "title": "Economic Growth" + } + ] + }, + { + "name": "Economic Inequality", + "slug": "economic-inequality", + "entries": [ + { + "slug": "economic-inequality-by-gender", + "title": "Economic Inequality by Gender" + } + ] + }, + { + "name": "Labor", + "slug": "labor", + "entries": [ + { + "slug": "child-labor", + "title": "Child Labor" + }, + { + "slug": "working-hours", + "title": "Working Hours" + }, + { + "slug": "female-labor-supply", + "title": "Women’s Employment" + } + ] + }, + { + "name": "Corruption", + "slug": "corruption", + "entries": [ + { + "slug": "corruption", + "title": "Corruption" + } + ] + }, + { + "name": "Trade and Migration", + "slug": "trade-migration", + "entries": [ + { + "slug": "migration", + "title": "Migration" + }, + { + "slug": "trade-and-globalization", + "title": "Trade and Globalization" + }, + { + "slug": "tourism", + "title": "Tourism" + } + ] + } + ] + }, + { + "name": "Education and Knowledge", + "slug": "education", + "entries": [], + "subcategories": [ + { + "name": "Educational Access and Outcomes", + "slug": "educational-outcomes", + "entries": [ + { + "slug": "global-education", + "title": "Global Education" + }, + { + "slug": "literacy", + "title": "Literacy" + }, + { + "slug": "research-and-development", + "title": "Research and Development" + } + ] + }, + { + "name": "Inputs to Education", + "slug": "inputs-to-education", + "entries": [ + { + "slug": "financing-education", + "title": "Education Spending" + } + ] + }, + { + "name": "Media", + "slug": "media-education", + "entries": [ + { + "slug": "books", + "title": "Books" + }, + { + "slug": "internet", + "title": "Internet" + } + ] + } + ] + }, + { + "name": "Innovation and Technological Change", + "slug": "technology", + "entries": [], + "subcategories": [ + { + "name": "Technological Change", + "slug": "technological-change", + "entries": [ + { + "slug": "artificial-intelligence", + "title": "Artificial Intelligence" + }, + { + "slug": "space-exploration-satellites", + "title": "Space Exploration and Satellites" + }, + { + "slug": "transport", + "title": "Transport" + }, + { + "slug": "internet", + "title": "Internet" + }, + { + "slug": "research-and-development", + "title": "Research and Development" + }, + { + "slug": "technological-change", + "title": "Technological Change" + } + ] + } + ] + }, + { + "name": "Living Conditions, Community and Wellbeing", + "slug": "work-life", + "entries": [], + "subcategories": [ + { + "name": "Culture", + "slug": "culture", + "entries": [ + { + "slug": "trust", + "title": "Trust" + } + ] + }, + { + "name": "Housing", + "slug": "housing", + "entries": [ + { + "slug": "clean-water-sanitation", + "title": "Clean Water and Sanitation" + }, + { + "slug": "energy-access", + "title": "Access to Energy" + }, + { + "slug": "water-access", + "title": "Clean Water" + }, + { + "slug": "homelessness", + "title": "Homelessness" + }, + { + "slug": "indoor-air-pollution", + "title": "Indoor Air Pollution" + }, + { + "slug": "light-at-night", + "title": "Light at Night" + }, + { + "slug": "sanitation", + "title": "Sanitation" + } + ] + }, + { + "name": "Time Use", + "slug": "time-use", + "entries": [ + { + "slug": "time-use", + "title": "Time Use" + }, + { + "slug": "working-hours", + "title": "Working Hours" + }, + { + "slug": "tourism", + "title": "Tourism" + } + ] + }, + { + "name": "Relationships", + "slug": "relationships", + "entries": [ + { + "slug": "marriages-and-divorces", + "title": "Marriages and Divorces" + }, + { + "slug": "social-connections-and-loneliness", + "title": "Loneliness and Social Connections" + } + ] + }, + { + "name": "Happiness and Wellbeing", + "slug": "happiness-wellbeing", + "entries": [ + { + "slug": "happiness-and-life-satisfaction", + "title": "Happiness and Life Satisfaction" + }, + { + "slug": "human-development-index", + "title": "Human Development Index (HDI)" + } + ] + } + ] + }, + { + "name": "Human Rights and Democracy", + "slug": "politics", + "entries": [], + "subcategories": [ + { + "name": "Human Rights", + "slug": "human-rights", + "entries": [ + { + "slug": "state-capacity", + "title": "State Capacity" + }, + { + "slug": "lgbt-rights", + "title": "LGBT+ Rights" + }, + { + "slug": "women-rights", + "title": "Women’s Rights" + }, + { + "slug": "child-labor", + "title": "Child Labor" + }, + { + "slug": "human-rights", + "title": "Human Rights" + } + ] + }, + { + "name": "Democracy and Corruption", + "slug": "democracy", + "entries": [ + { + "slug": "democracy", + "title": "Democracy" + }, + { + "slug": "corruption", + "title": "Corruption" + } + ] + } + ] + }, + { + "name": "Violence and War", + "slug": "violence-rights", + "entries": [], + "subcategories": [ + { + "name": "War and Peace", + "slug": "war-peace", + "entries": [ + { + "slug": "biological-and-chemical-weapons", + "title": "Biological and Chemical Weapons" + }, + { + "slug": "war-and-peace", + "title": "War and Peace" + }, + { + "slug": "military-personnel-spending", + "title": "Military Personnel and Spending" + }, + { + "slug": "terrorism", + "title": "Terrorism" + }, + { + "slug": "nuclear-weapons", + "title": "Nuclear Weapons" + } + ] + }, + { + "name": "Violence", + "slug": "violence", + "entries": [ + { + "slug": "state-capacity", + "title": "State Capacity" + }, + { + "slug": "violence-against-rights-for-children", + "title": "Violence Against Children and Children’s Rights" + }, + { + "slug": "homicides", + "title": "Homicides" + } + ] + } + ] + } + ] +} diff --git a/site/SiteNavigationTopics.tsx b/site/SiteNavigationTopics.tsx index f147a6eb46a..68cd4cf115a 100644 --- a/site/SiteNavigationTopics.tsx +++ b/site/SiteNavigationTopics.tsx @@ -96,6 +96,6 @@ export const allTopicsInCategory = ( ): EntryMeta[] => { return [ ...category.entries, - ...category.subcategories.flatMap((subcategory) => subcategory.entries), + ...(category.subcategories ?? []).flatMap((subcategory) => subcategory.entries), ] } From 3fd221f54446c176394c0afe18ccfb8397b07171 Mon Sep 17 00:00:00 2001 From: Matthieu Bergel Date: Tue, 23 Jan 2024 12:58:53 +0000 Subject: [PATCH 4/6] Remove unused code related to categories --- db/wpdb.ts | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/db/wpdb.ts b/db/wpdb.ts index 287b692a61e..471e29867d3 100644 --- a/db/wpdb.ts +++ b/db/wpdb.ts @@ -25,7 +25,6 @@ import { DocumentNode, PostReference, JsonError, - CategoryNode, FilterFnPostRestApi, PostRestApi, TopicId, @@ -308,25 +307,6 @@ export const getDocumentsInfo = async ( } } -const getEntryNode = ({ - slug, - title, -}: EntryNode): { - slug: string - title: string -} => ({ - slug, - title: decodeHTML(title), -}) - -const isEntryInSubcategories = (entry: EntryNode, subcategories: any): any => { - return subcategories.some((subcategory: any) => { - return subcategory.pages.nodes.some( - (node: EntryNode) => entry.slug === node.slug - ) - }) -} - export const isPostCitable = async (post: FullPost): Promise => { const entries = SiteNavigationStatic.categories return entries.some((category) => { From 1ea97dc7c2c44963e443ca5ee3f83f2e8f16bc75 Mon Sep 17 00:00:00 2001 From: mlbrgl Date: Tue, 23 Jan 2024 13:02:46 +0000 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=A4=96=20style:=20prettify=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/wpdb.ts | 15 +- site/SiteNavigation.tsx | 1044 ++++++++++++++++----------------- site/SiteNavigationTopics.tsx | 4 +- 3 files changed, 534 insertions(+), 529 deletions(-) diff --git a/db/wpdb.ts b/db/wpdb.ts index 471e29867d3..ad60585b57a 100644 --- a/db/wpdb.ts +++ b/db/wpdb.ts @@ -48,7 +48,7 @@ import { import { TOPICS_CONTENT_GRAPH } from "../settings/clientSettings.js" import { GdocPost } from "./model/Gdoc/GdocPost.js" import { Link } from "./model/Link.js" -import {SiteNavigationStatic} from "../site/SiteNavigation.js" +import { SiteNavigationStatic } from "../site/SiteNavigation.js" let _knexInstance: Knex @@ -312,11 +312,14 @@ export const isPostCitable = async (post: FullPost): Promise => { return entries.some((category) => { return ( category.entries.some((entry) => entry.slug === post.slug) || - (category.subcategories ?? []).some((subcategory: CategoryWithEntries) => { - return subcategory.entries.some( - (subCategoryEntry) => subCategoryEntry.slug === post.slug - ) - }) + (category.subcategories ?? []).some( + (subcategory: CategoryWithEntries) => { + return subcategory.entries.some( + (subCategoryEntry) => + subCategoryEntry.slug === post.slug + ) + } + ) ) }) } diff --git a/site/SiteNavigation.tsx b/site/SiteNavigation.tsx index 3d7d2337eac..c6f60e8f3cf 100644 --- a/site/SiteNavigation.tsx +++ b/site/SiteNavigation.tsx @@ -248,847 +248,847 @@ export const runSiteNavigation = ( ) } -export const SiteNavigationStatic: {categories: CategoryWithEntries[]} = { - "categories": [ +export const SiteNavigationStatic: { categories: CategoryWithEntries[] } = { + categories: [ { - "name": "Population and Demographic Change", - "slug": "population", - "entries": [], - "subcategories": [ + name: "Population and Demographic Change", + slug: "population", + entries: [], + subcategories: [ { - "name": "Population Change", - "slug": "population-change", - "entries": [ + name: "Population Change", + slug: "population-change", + entries: [ { - "slug": "population-growth", - "title": "Population Growth" + slug: "population-growth", + title: "Population Growth", }, { - "slug": "age-structure", - "title": "Age Structure" + slug: "age-structure", + title: "Age Structure", }, { - "slug": "gender-ratio", - "title": "Gender Ratio" - } - ] + slug: "gender-ratio", + title: "Gender Ratio", + }, + ], }, { - "name": "Life and Death", - "slug": "life-and-death", - "entries": [ + name: "Life and Death", + slug: "life-and-death", + entries: [ { - "slug": "life-expectancy", - "title": "Life Expectancy" + slug: "life-expectancy", + title: "Life Expectancy", }, { - "slug": "child-mortality", - "title": "Child and Infant Mortality" + slug: "child-mortality", + title: "Child and Infant Mortality", }, { - "slug": "fertility-rate", - "title": "Fertility Rate" - } - ] + slug: "fertility-rate", + title: "Fertility Rate", + }, + ], }, { - "name": "Distribution of the World Population", - "slug": "distribution-of-the-world-population", - "entries": [ + name: "Distribution of the World Population", + slug: "distribution-of-the-world-population", + entries: [ { - "slug": "urbanization", - "title": "Urbanization" + slug: "urbanization", + title: "Urbanization", }, { - "slug": "migration", - "title": "Migration" - } - ] - } - ] + slug: "migration", + title: "Migration", + }, + ], + }, + ], }, { - "name": "Health", - "slug": "health", - "entries": [ + name: "Health", + slug: "health", + entries: [ { - "slug": "tuberculosis", - "title": "Tuberculosis" + slug: "tuberculosis", + title: "Tuberculosis", }, { - "slug": "pandemics", - "title": "Pandemics" + slug: "pandemics", + title: "Pandemics", }, { - "slug": "cardiovascular-diseases", - "title": "Cardiovascular Diseases" - } + slug: "cardiovascular-diseases", + title: "Cardiovascular Diseases", + }, ], - "subcategories": [ + subcategories: [ { - "name": "Health Risks", - "slug": "health-risks", - "entries": [ + name: "Health Risks", + slug: "health-risks", + entries: [ { - "slug": "lead-pollution", - "title": "Lead Pollution" + slug: "lead-pollution", + title: "Lead Pollution", }, { - "slug": "air-pollution", - "title": "Air Pollution" + slug: "air-pollution", + title: "Air Pollution", }, { - "slug": "outdoor-air-pollution", - "title": "Outdoor Air Pollution" + slug: "outdoor-air-pollution", + title: "Outdoor Air Pollution", }, { - "slug": "indoor-air-pollution", - "title": "Indoor Air Pollution" + slug: "indoor-air-pollution", + title: "Indoor Air Pollution", }, { - "slug": "obesity", - "title": "Obesity" + slug: "obesity", + title: "Obesity", }, { - "slug": "smoking", - "title": "Smoking" + slug: "smoking", + title: "Smoking", }, { - "slug": "alcohol-consumption", - "title": "Alcohol Consumption" + slug: "alcohol-consumption", + title: "Alcohol Consumption", }, { - "slug": "illicit-drug-use", - "title": "Opioids, Cocaine, Cannabis, and Other Illicit Drugs" - } - ] + slug: "illicit-drug-use", + title: "Opioids, Cocaine, Cannabis, and Other Illicit Drugs", + }, + ], }, { - "name": "Infectious Diseases", - "slug": "infectious-diseases", - "entries": [ + name: "Infectious Diseases", + slug: "infectious-diseases", + entries: [ { - "slug": "influenza", - "title": "Influenza" + slug: "influenza", + title: "Influenza", }, { - "slug": "monkeypox", - "title": "Mpox (monkeypox)" + slug: "monkeypox", + title: "Mpox (monkeypox)", }, { - "slug": "coronavirus", - "title": "Coronavirus Pandemic (COVID-19)" + slug: "coronavirus", + title: "Coronavirus Pandemic (COVID-19)", }, { - "slug": "hiv-aids", - "title": "HIV / AIDS" + slug: "hiv-aids", + title: "HIV / AIDS", }, { - "slug": "malaria", - "title": "Malaria" + slug: "malaria", + title: "Malaria", }, { - "slug": "eradication-of-diseases", - "title": "Eradication of Diseases" + slug: "eradication-of-diseases", + title: "Eradication of Diseases", }, { - "slug": "diarrheal-diseases", - "title": "Diarrheal Diseases" + slug: "diarrheal-diseases", + title: "Diarrheal Diseases", }, { - "slug": "smallpox", - "title": "Smallpox" + slug: "smallpox", + title: "Smallpox", }, { - "slug": "polio", - "title": "Polio" + slug: "polio", + title: "Polio", }, { - "slug": "pneumonia", - "title": "Pneumonia" + slug: "pneumonia", + title: "Pneumonia", }, { - "slug": "tetanus", - "title": "Tetanus" - } - ] + slug: "tetanus", + title: "Tetanus", + }, + ], }, { - "name": "Health Institutions and Interventions", - "slug": "health-institutions-and-interventions", - "entries": [ + name: "Health Institutions and Interventions", + slug: "health-institutions-and-interventions", + entries: [ { - "slug": "financing-healthcare", - "title": "Healthcare Spending" + slug: "financing-healthcare", + title: "Healthcare Spending", }, { - "slug": "vaccination", - "title": "Vaccination" - } - ] + slug: "vaccination", + title: "Vaccination", + }, + ], }, { - "name": "Life and Death", - "slug": "life-death-health", - "entries": [ + name: "Life and Death", + slug: "life-death-health", + entries: [ { - "slug": "life-expectancy", - "title": "Life Expectancy" + slug: "life-expectancy", + title: "Life Expectancy", }, { - "slug": "child-mortality", - "title": "Child and Infant Mortality" + slug: "child-mortality", + title: "Child and Infant Mortality", }, { - "slug": "maternal-mortality", - "title": "Maternal Mortality" + slug: "maternal-mortality", + title: "Maternal Mortality", }, { - "slug": "health-meta", - "title": "Global Health" + slug: "health-meta", + title: "Global Health", }, { - "slug": "causes-of-death", - "title": "Causes of Death" + slug: "causes-of-death", + title: "Causes of Death", }, { - "slug": "burden-of-disease", - "title": "Burden of Disease" + slug: "burden-of-disease", + title: "Burden of Disease", }, { - "slug": "cancer", - "title": "Cancer" + slug: "cancer", + title: "Cancer", }, { - "slug": "mental-health", - "title": "Mental Health" + slug: "mental-health", + title: "Mental Health", }, { - "slug": "suicide", - "title": "Suicides" - } - ] - } - ] + slug: "suicide", + title: "Suicides", + }, + ], + }, + ], }, { - "name": "Energy and Environment", - "slug": "environment", - "entries": [], - "subcategories": [ + name: "Energy and Environment", + slug: "environment", + entries: [], + subcategories: [ { - "name": "Energy", - "slug": "energy", - "entries": [ + name: "Energy", + slug: "energy", + entries: [ { - "slug": "nuclear-energy", - "title": "Nuclear Energy" + slug: "nuclear-energy", + title: "Nuclear Energy", }, { - "slug": "energy-access", - "title": "Access to Energy" + slug: "energy-access", + title: "Access to Energy", }, { - "slug": "energy", - "title": "Energy" + slug: "energy", + title: "Energy", }, { - "slug": "renewable-energy", - "title": "Renewable Energy" + slug: "renewable-energy", + title: "Renewable Energy", }, { - "slug": "fossil-fuels", - "title": "Fossil Fuels" - } - ] + slug: "fossil-fuels", + title: "Fossil Fuels", + }, + ], }, { - "name": "Waste and Pollution", - "slug": "waste", - "entries": [ + name: "Waste and Pollution", + slug: "waste", + entries: [ { - "slug": "lead-pollution", - "title": "Lead Pollution" + slug: "lead-pollution", + title: "Lead Pollution", }, { - "slug": "plastic-pollution", - "title": "Plastic Pollution" + slug: "plastic-pollution", + title: "Plastic Pollution", }, { - "slug": "oil-spills", - "title": "Oil Spills" - } - ] + slug: "oil-spills", + title: "Oil Spills", + }, + ], }, { - "name": "Air and Climate", - "slug": "air-and-climate", - "entries": [ + name: "Air and Climate", + slug: "air-and-climate", + entries: [ { - "slug": "co2-and-greenhouse-gas-emissions", - "title": "CO₂ and Greenhouse Gas Emissions" + slug: "co2-and-greenhouse-gas-emissions", + title: "CO₂ and Greenhouse Gas Emissions", }, { - "slug": "climate-change", - "title": "Climate Change" + slug: "climate-change", + title: "Climate Change", }, { - "slug": "air-pollution", - "title": "Air Pollution" + slug: "air-pollution", + title: "Air Pollution", }, { - "slug": "outdoor-air-pollution", - "title": "Outdoor Air Pollution" + slug: "outdoor-air-pollution", + title: "Outdoor Air Pollution", }, { - "slug": "indoor-air-pollution", - "title": "Indoor Air Pollution" + slug: "indoor-air-pollution", + title: "Indoor Air Pollution", }, { - "slug": "ozone-layer", - "title": "Ozone Layer" - } - ] + slug: "ozone-layer", + title: "Ozone Layer", + }, + ], }, { - "name": "Water", - "slug": "water", - "entries": [ + name: "Water", + slug: "water", + entries: [ { - "slug": "clean-water-sanitation", - "title": "Clean Water and Sanitation" + slug: "clean-water-sanitation", + title: "Clean Water and Sanitation", }, { - "slug": "water-access", - "title": "Clean Water" + slug: "water-access", + title: "Clean Water", }, { - "slug": "sanitation", - "title": "Sanitation" + slug: "sanitation", + title: "Sanitation", }, { - "slug": "water-use-stress", - "title": "Water Use and Stress" - } - ] + slug: "water-use-stress", + title: "Water Use and Stress", + }, + ], }, { - "name": "Land and Ecosystems", - "slug": "land-and-ecosystems", - "entries": [ + name: "Land and Ecosystems", + slug: "land-and-ecosystems", + entries: [ { - "slug": "biodiversity", - "title": "Biodiversity" + slug: "biodiversity", + title: "Biodiversity", }, { - "slug": "environmental-impacts-of-food", - "title": "Environmental Impacts of Food Production" + slug: "environmental-impacts-of-food", + title: "Environmental Impacts of Food Production", }, { - "slug": "forests-and-deforestation", - "title": "Forests and Deforestation" + slug: "forests-and-deforestation", + title: "Forests and Deforestation", }, { - "slug": "land-use", - "title": "Land Use" + slug: "land-use", + title: "Land Use", }, { - "slug": "natural-disasters", - "title": "Natural Disasters" - } - ] - } - ] + slug: "natural-disasters", + title: "Natural Disasters", + }, + ], + }, + ], }, { - "name": "Food and Agriculture", - "slug": "food", - "entries": [ + name: "Food and Agriculture", + slug: "food", + entries: [ { - "slug": "animal-welfare", - "title": "Animal Welfare" - } + slug: "animal-welfare", + title: "Animal Welfare", + }, ], - "subcategories": [ + subcategories: [ { - "name": "Nutrition", - "slug": "nutrition", - "entries": [ + name: "Nutrition", + slug: "nutrition", + entries: [ { - "slug": "hunger-and-undernourishment", - "title": "Hunger and Undernourishment" + slug: "hunger-and-undernourishment", + title: "Hunger and Undernourishment", }, { - "slug": "famines", - "title": "Famines" + slug: "famines", + title: "Famines", }, { - "slug": "food-supply", - "title": "Food Supply" + slug: "food-supply", + title: "Food Supply", }, { - "slug": "human-height", - "title": "Human Height" + slug: "human-height", + title: "Human Height", }, { - "slug": "micronutrient-deficiency", - "title": "Micronutrient Deficiency" + slug: "micronutrient-deficiency", + title: "Micronutrient Deficiency", }, { - "slug": "diet-compositions", - "title": "Diet Compositions" + slug: "diet-compositions", + title: "Diet Compositions", }, { - "slug": "food-prices", - "title": "Food Prices" + slug: "food-prices", + title: "Food Prices", }, { - "slug": "obesity", - "title": "Obesity" + slug: "obesity", + title: "Obesity", }, { - "slug": "alcohol-consumption", - "title": "Alcohol Consumption" - } - ] + slug: "alcohol-consumption", + title: "Alcohol Consumption", + }, + ], }, { - "name": "Food Production", - "slug": "food-production", - "entries": [ + name: "Food Production", + slug: "food-production", + entries: [ { - "slug": "farm-size", - "title": "Farm Size and Productivity" + slug: "farm-size", + title: "Farm Size and Productivity", }, { - "slug": "agricultural-production", - "title": "Agricultural Production" + slug: "agricultural-production", + title: "Agricultural Production", }, { - "slug": "environmental-impacts-of-food", - "title": "Environmental Impacts of Food Production" + slug: "environmental-impacts-of-food", + title: "Environmental Impacts of Food Production", }, { - "slug": "crop-yields", - "title": "Crop Yields" + slug: "crop-yields", + title: "Crop Yields", }, { - "slug": "meat-production", - "title": "Meat and Dairy Production" - } - ] + slug: "meat-production", + title: "Meat and Dairy Production", + }, + ], }, { - "name": "Agricultural Inputs", - "slug": "agricultural-inputs", - "entries": [ + name: "Agricultural Inputs", + slug: "agricultural-inputs", + entries: [ { - "slug": "employment-in-agriculture", - "title": "Employment in Agriculture" + slug: "employment-in-agriculture", + title: "Employment in Agriculture", }, { - "slug": "land-use", - "title": "Land Use" + slug: "land-use", + title: "Land Use", }, { - "slug": "fertilizers", - "title": "Fertilizers" + slug: "fertilizers", + title: "Fertilizers", }, { - "slug": "pesticides", - "title": "Pesticides" - } - ] - } - ] + slug: "pesticides", + title: "Pesticides", + }, + ], + }, + ], }, { - "name": "Poverty and Economic Development", - "slug": "growth-inequality", - "entries": [], - "subcategories": [ + name: "Poverty and Economic Development", + slug: "growth-inequality", + entries: [], + subcategories: [ { - "name": "Public Sector", - "slug": "public-sector", - "entries": [ + name: "Public Sector", + slug: "public-sector", + entries: [ { - "slug": "government-spending", - "title": "Government Spending" + slug: "government-spending", + title: "Government Spending", }, { - "slug": "taxation", - "title": "Taxation" + slug: "taxation", + title: "Taxation", }, { - "slug": "military-personnel-spending", - "title": "Military Personnel and Spending" + slug: "military-personnel-spending", + title: "Military Personnel and Spending", }, { - "slug": "financing-healthcare", - "title": "Healthcare Spending" + slug: "financing-healthcare", + title: "Healthcare Spending", }, { - "slug": "financing-education", - "title": "Education Spending" - } - ] + slug: "financing-education", + title: "Education Spending", + }, + ], }, { - "name": "Poverty and Prosperity", - "slug": "poverty-and-prosperity", - "entries": [ + name: "Poverty and Prosperity", + slug: "poverty-and-prosperity", + entries: [ { - "slug": "economic-inequality", - "title": "Economic Inequality" + slug: "economic-inequality", + title: "Economic Inequality", }, { - "slug": "poverty", - "title": "Poverty" + slug: "poverty", + title: "Poverty", }, { - "slug": "economic-growth", - "title": "Economic Growth" - } - ] + slug: "economic-growth", + title: "Economic Growth", + }, + ], }, { - "name": "Economic Inequality", - "slug": "economic-inequality", - "entries": [ - { - "slug": "economic-inequality-by-gender", - "title": "Economic Inequality by Gender" - } - ] + name: "Economic Inequality", + slug: "economic-inequality", + entries: [ + { + slug: "economic-inequality-by-gender", + title: "Economic Inequality by Gender", + }, + ], }, { - "name": "Labor", - "slug": "labor", - "entries": [ + name: "Labor", + slug: "labor", + entries: [ { - "slug": "child-labor", - "title": "Child Labor" + slug: "child-labor", + title: "Child Labor", }, { - "slug": "working-hours", - "title": "Working Hours" + slug: "working-hours", + title: "Working Hours", }, { - "slug": "female-labor-supply", - "title": "Women’s Employment" - } - ] + slug: "female-labor-supply", + title: "Women’s Employment", + }, + ], }, { - "name": "Corruption", - "slug": "corruption", - "entries": [ - { - "slug": "corruption", - "title": "Corruption" - } - ] + name: "Corruption", + slug: "corruption", + entries: [ + { + slug: "corruption", + title: "Corruption", + }, + ], }, { - "name": "Trade and Migration", - "slug": "trade-migration", - "entries": [ + name: "Trade and Migration", + slug: "trade-migration", + entries: [ { - "slug": "migration", - "title": "Migration" + slug: "migration", + title: "Migration", }, { - "slug": "trade-and-globalization", - "title": "Trade and Globalization" + slug: "trade-and-globalization", + title: "Trade and Globalization", }, { - "slug": "tourism", - "title": "Tourism" - } - ] - } - ] + slug: "tourism", + title: "Tourism", + }, + ], + }, + ], }, { - "name": "Education and Knowledge", - "slug": "education", - "entries": [], - "subcategories": [ + name: "Education and Knowledge", + slug: "education", + entries: [], + subcategories: [ { - "name": "Educational Access and Outcomes", - "slug": "educational-outcomes", - "entries": [ + name: "Educational Access and Outcomes", + slug: "educational-outcomes", + entries: [ { - "slug": "global-education", - "title": "Global Education" + slug: "global-education", + title: "Global Education", }, { - "slug": "literacy", - "title": "Literacy" + slug: "literacy", + title: "Literacy", }, { - "slug": "research-and-development", - "title": "Research and Development" - } - ] + slug: "research-and-development", + title: "Research and Development", + }, + ], }, { - "name": "Inputs to Education", - "slug": "inputs-to-education", - "entries": [ - { - "slug": "financing-education", - "title": "Education Spending" - } - ] + name: "Inputs to Education", + slug: "inputs-to-education", + entries: [ + { + slug: "financing-education", + title: "Education Spending", + }, + ], }, { - "name": "Media", - "slug": "media-education", - "entries": [ + name: "Media", + slug: "media-education", + entries: [ { - "slug": "books", - "title": "Books" + slug: "books", + title: "Books", }, { - "slug": "internet", - "title": "Internet" - } - ] - } - ] + slug: "internet", + title: "Internet", + }, + ], + }, + ], }, { - "name": "Innovation and Technological Change", - "slug": "technology", - "entries": [], - "subcategories": [ + name: "Innovation and Technological Change", + slug: "technology", + entries: [], + subcategories: [ { - "name": "Technological Change", - "slug": "technological-change", - "entries": [ + name: "Technological Change", + slug: "technological-change", + entries: [ { - "slug": "artificial-intelligence", - "title": "Artificial Intelligence" + slug: "artificial-intelligence", + title: "Artificial Intelligence", }, { - "slug": "space-exploration-satellites", - "title": "Space Exploration and Satellites" + slug: "space-exploration-satellites", + title: "Space Exploration and Satellites", }, { - "slug": "transport", - "title": "Transport" + slug: "transport", + title: "Transport", }, { - "slug": "internet", - "title": "Internet" + slug: "internet", + title: "Internet", }, { - "slug": "research-and-development", - "title": "Research and Development" + slug: "research-and-development", + title: "Research and Development", }, { - "slug": "technological-change", - "title": "Technological Change" - } - ] - } - ] + slug: "technological-change", + title: "Technological Change", + }, + ], + }, + ], }, { - "name": "Living Conditions, Community and Wellbeing", - "slug": "work-life", - "entries": [], - "subcategories": [ + name: "Living Conditions, Community and Wellbeing", + slug: "work-life", + entries: [], + subcategories: [ { - "name": "Culture", - "slug": "culture", - "entries": [ - { - "slug": "trust", - "title": "Trust" - } - ] + name: "Culture", + slug: "culture", + entries: [ + { + slug: "trust", + title: "Trust", + }, + ], }, { - "name": "Housing", - "slug": "housing", - "entries": [ + name: "Housing", + slug: "housing", + entries: [ { - "slug": "clean-water-sanitation", - "title": "Clean Water and Sanitation" + slug: "clean-water-sanitation", + title: "Clean Water and Sanitation", }, { - "slug": "energy-access", - "title": "Access to Energy" + slug: "energy-access", + title: "Access to Energy", }, { - "slug": "water-access", - "title": "Clean Water" + slug: "water-access", + title: "Clean Water", }, { - "slug": "homelessness", - "title": "Homelessness" + slug: "homelessness", + title: "Homelessness", }, { - "slug": "indoor-air-pollution", - "title": "Indoor Air Pollution" + slug: "indoor-air-pollution", + title: "Indoor Air Pollution", }, { - "slug": "light-at-night", - "title": "Light at Night" + slug: "light-at-night", + title: "Light at Night", }, { - "slug": "sanitation", - "title": "Sanitation" - } - ] + slug: "sanitation", + title: "Sanitation", + }, + ], }, { - "name": "Time Use", - "slug": "time-use", - "entries": [ + name: "Time Use", + slug: "time-use", + entries: [ { - "slug": "time-use", - "title": "Time Use" + slug: "time-use", + title: "Time Use", }, { - "slug": "working-hours", - "title": "Working Hours" + slug: "working-hours", + title: "Working Hours", }, { - "slug": "tourism", - "title": "Tourism" - } - ] + slug: "tourism", + title: "Tourism", + }, + ], }, { - "name": "Relationships", - "slug": "relationships", - "entries": [ + name: "Relationships", + slug: "relationships", + entries: [ { - "slug": "marriages-and-divorces", - "title": "Marriages and Divorces" + slug: "marriages-and-divorces", + title: "Marriages and Divorces", }, { - "slug": "social-connections-and-loneliness", - "title": "Loneliness and Social Connections" - } - ] + slug: "social-connections-and-loneliness", + title: "Loneliness and Social Connections", + }, + ], }, { - "name": "Happiness and Wellbeing", - "slug": "happiness-wellbeing", - "entries": [ + name: "Happiness and Wellbeing", + slug: "happiness-wellbeing", + entries: [ { - "slug": "happiness-and-life-satisfaction", - "title": "Happiness and Life Satisfaction" + slug: "happiness-and-life-satisfaction", + title: "Happiness and Life Satisfaction", }, { - "slug": "human-development-index", - "title": "Human Development Index (HDI)" - } - ] - } - ] + slug: "human-development-index", + title: "Human Development Index (HDI)", + }, + ], + }, + ], }, { - "name": "Human Rights and Democracy", - "slug": "politics", - "entries": [], - "subcategories": [ + name: "Human Rights and Democracy", + slug: "politics", + entries: [], + subcategories: [ { - "name": "Human Rights", - "slug": "human-rights", - "entries": [ + name: "Human Rights", + slug: "human-rights", + entries: [ { - "slug": "state-capacity", - "title": "State Capacity" + slug: "state-capacity", + title: "State Capacity", }, { - "slug": "lgbt-rights", - "title": "LGBT+ Rights" + slug: "lgbt-rights", + title: "LGBT+ Rights", }, { - "slug": "women-rights", - "title": "Women’s Rights" + slug: "women-rights", + title: "Women’s Rights", }, { - "slug": "child-labor", - "title": "Child Labor" + slug: "child-labor", + title: "Child Labor", }, { - "slug": "human-rights", - "title": "Human Rights" - } - ] + slug: "human-rights", + title: "Human Rights", + }, + ], }, { - "name": "Democracy and Corruption", - "slug": "democracy", - "entries": [ + name: "Democracy and Corruption", + slug: "democracy", + entries: [ { - "slug": "democracy", - "title": "Democracy" + slug: "democracy", + title: "Democracy", }, { - "slug": "corruption", - "title": "Corruption" - } - ] - } - ] + slug: "corruption", + title: "Corruption", + }, + ], + }, + ], }, { - "name": "Violence and War", - "slug": "violence-rights", - "entries": [], - "subcategories": [ + name: "Violence and War", + slug: "violence-rights", + entries: [], + subcategories: [ { - "name": "War and Peace", - "slug": "war-peace", - "entries": [ + name: "War and Peace", + slug: "war-peace", + entries: [ { - "slug": "biological-and-chemical-weapons", - "title": "Biological and Chemical Weapons" + slug: "biological-and-chemical-weapons", + title: "Biological and Chemical Weapons", }, { - "slug": "war-and-peace", - "title": "War and Peace" + slug: "war-and-peace", + title: "War and Peace", }, { - "slug": "military-personnel-spending", - "title": "Military Personnel and Spending" + slug: "military-personnel-spending", + title: "Military Personnel and Spending", }, { - "slug": "terrorism", - "title": "Terrorism" + slug: "terrorism", + title: "Terrorism", }, { - "slug": "nuclear-weapons", - "title": "Nuclear Weapons" - } - ] + slug: "nuclear-weapons", + title: "Nuclear Weapons", + }, + ], }, { - "name": "Violence", - "slug": "violence", - "entries": [ + name: "Violence", + slug: "violence", + entries: [ { - "slug": "state-capacity", - "title": "State Capacity" + slug: "state-capacity", + title: "State Capacity", }, { - "slug": "violence-against-rights-for-children", - "title": "Violence Against Children and Children’s Rights" + slug: "violence-against-rights-for-children", + title: "Violence Against Children and Children’s Rights", }, { - "slug": "homicides", - "title": "Homicides" - } - ] - } - ] - } - ] + slug: "homicides", + title: "Homicides", + }, + ], + }, + ], + }, + ], } diff --git a/site/SiteNavigationTopics.tsx b/site/SiteNavigationTopics.tsx index 68cd4cf115a..70f397c49bd 100644 --- a/site/SiteNavigationTopics.tsx +++ b/site/SiteNavigationTopics.tsx @@ -96,6 +96,8 @@ export const allTopicsInCategory = ( ): EntryMeta[] => { return [ ...category.entries, - ...(category.subcategories ?? []).flatMap((subcategory) => subcategory.entries), + ...(category.subcategories ?? []).flatMap( + (subcategory) => subcategory.entries + ), ] } From 5a2393ae3a19ecf2b6f45fc6caaea14b77145e96 Mon Sep 17 00:00:00 2001 From: Daniel Bachler Date: Thu, 25 Jan 2024 14:54:55 +0100 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=90=9D=20remove=20unused=20import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/wpdb.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/db/wpdb.ts b/db/wpdb.ts index ad60585b57a..64e7682e421 100644 --- a/db/wpdb.ts +++ b/db/wpdb.ts @@ -19,7 +19,6 @@ import { registerExitHandler } from "./cleanup.js" import { RelatedChart, CategoryWithEntries, - EntryNode, FullPost, WP_PostType, DocumentNode,