From 713706803ab7abb4d88fef4561099cdfe551779e Mon Sep 17 00:00:00 2001 From: Pablo Rosado Date: Wed, 26 Jul 2023 12:29:47 +0200 Subject: [PATCH] Minor improvements in metadata and units --- .../food_prices_for_nutrition.meta.yml | 66 +++++++++++-------- .../2023-07-24/food_prices_for_nutrition.py | 2 +- 2 files changed, 38 insertions(+), 30 deletions(-) diff --git a/etl/steps/data/garden/wb/2023-07-24/food_prices_for_nutrition.meta.yml b/etl/steps/data/garden/wb/2023-07-24/food_prices_for_nutrition.meta.yml index 089574646ef..4cb25f6fb16 100644 --- a/etl/steps/data/garden/wb/2023-07-24/food_prices_for_nutrition.meta.yml +++ b/etl/steps/data/garden/wb/2023-07-24/food_prices_for_nutrition.meta.yml @@ -18,34 +18,38 @@ tables: Cost of the least expensive starchy staple for energy balance for a representative person at 2330 kcal/day. Data available for 2017. affordability_of_an_energy_sufficient_diet__ratio_of_cost_to_food_expenditures: title: "Affordability of an energy sufficient diet: ratio of cost to food expenditures" - unit: "" - short_unit: "" + unit: "%" + short_unit: "%" description: | - The ratio of the cost of an energy sufficient diet to total food expenditure per capita per day from national accounts. + The percentage of the cost of an energy sufficient diet to total food expenditure per capita per day from national accounts. percent_of_the_population_who_cannot_afford_sufficient_calories: title: Share of the population who cannot afford sufficient calories unit: "%" short_unit: "%" description: | - The indicator expresses the percentage of the total population unable to afford an energy sufficient diet. A healthy diet is considered unaffordable in a country when its cost exceeds 52 percent of income per capita per day. This percentage accounts for a portion of income that can be credibly reserved for food, based on observations that the population in low-income countries spend, on average, 52 percent of their income on food, as derived from the 2017 national accounts household expenditure data of the World Bank's International Comparison Programme (ICP). Income data are provided by the World Bank's Poverty and Inequality Platform. A value of zero indicates a null or a small number rounded down at the current precision level. + The indicator expresses the percentage of the total population unable to afford an energy sufficient diet. A healthy diet is considered unaffordable in a country when its cost exceeds 52% of income per capita per day. + + This percentage accounts for a portion of income that can be credibly reserved for food, based on observations that the population in low-income countries spend, on average, 52% of their income on food, as derived from the 2017 national accounts household expenditure data of the World Bank's International Comparison Programme (ICP). Income data are provided by the World Bank's Poverty and Inequality Platform. A value of zero indicates a null or a small number rounded down at the current precision level. affordability_of_an_energy_sufficient_diet__ratio_of_cost_to_the_food_poverty_line: title: "Affordability of an energy sufficient diet: ratio of cost to the food poverty line" - unit: "" - short_unit: "" + unit: "%" + short_unit: "%" description: | - The ratio of the cost of an energy sufficient diet to the $1.12 food poverty line (52% of the international poverty line of 2.15 a day in 2017 international-$). + The percentage of the cost of an energy sufficient diet to the $1.12 food poverty line (52% of the international poverty line of 2.15 a day in 2017 international-$). people_who_cannot_afford_sufficient_calories: title: Number of people who cannot afford sufficient calories unit: people short_unit: "" description: | - The indicator expresses the total number of people who cannot afford an energy-sufficient diet in a given country and year. The indicator is computed by multiplying the percentage of the population in a country unable to afford a healthy diet by population data taken from the World Development Indicators (WDI) of the World Bank. A value of zero indicates a null or a small number rounded down at the current precision level. + The indicator expresses the total number of people who cannot afford an energy-sufficient diet. The indicator is computed by multiplying the percentage of the population in a country unable to afford a healthy diet by population data taken from the World Development Indicators (WDI) of the World Bank. A value of zero indicates a null or a small number rounded down at the current precision level. cost_of_a_healthy_diet: title: Cost of a healthy diet unit: current international-$/person/day short_unit: $ description: | - The cost of a healthy diet indicator is the cost of purchasing the least expensive locally available foods to meet requirements for energy and food-based dietary guidelines (FBDGs) for a representative person within energy balance at 2330 kcal/day. PPPs in 2018, and/or 2019, and/or 2020, and/or 2021 are imputed by the Food and Agriculture Organization of the United Nations for the given countries of Argentina, Aruba, Bermuda, British Virgin Islands, Cayman Islands, Curaçao, Democratic Republic of the Congo, Dominica, Djibouti, Equatorial Guinea, Eswatini, Gabon, Kazakhstan, Liberia, Malawi, Myanmar, Sao Tome and Principe, Senegal, Seychelles, Sint Maarten (Dutch part), Suriname, Tajikistan, United Arab Emirates and Zimbabwe. + The cost of a healthy diet indicator is the cost of purchasing the least expensive locally available foods to meet requirements for energy and food-based dietary guidelines (FBDGs) for a representative person within energy balance at 2330 kcal/day. + + PPPs in 2018, and/or 2019, and/or 2020, and/or 2021 are imputed by the Food and Agriculture Organization of the United Nations for the given countries of Argentina, Aruba, Bermuda, British Virgin Islands, Cayman Islands, Curaçao, Democratic Republic of the Congo, Dominica, Djibouti, Equatorial Guinea, Eswatini, Gabon, Kazakhstan, Liberia, Malawi, Myanmar, Sao Tome and Principe, Senegal, Seychelles, Sint Maarten (Dutch part), Suriname, Tajikistan, United Arab Emirates and Zimbabwe. cost_of_a_healthy_diet_relative_to_the_cost_of_sufficient_energy_from_starchy_staples: title: Cost of a healthy diet relative to the cost of sufficient energy from starchy staples unit: "" @@ -63,7 +67,7 @@ tables: unit: "%" short_unit: "%" description: | - Share of costs for the least expensive animal-source foods to meet daily recommendations in food-based dietary guidelines (FBDGs), as a proportion of the total cost of a healthy diet. + Share of costs for the least expensive animal-source foods to meet daily recommendations in food-based dietary guidelines (FBDGs), as a percentage of the total cost of a healthy diet. cost_of_animal_sourced_foods_relative_to_the_starchy_staples_in_a_least_cost_healthy_diet: title: Cost of animal-sourced foods relative to the starchy staples in a least-cost healthy diet unit: "" @@ -81,7 +85,7 @@ tables: unit: "%" short_unit: "%" description: | - Share of costs for the least expensive fruits to meet daily recommendations in food-based dietary guidelines (FBDGs), as a proportion of the total cost of a healthy diet. + Share of costs for the least expensive fruits to meet daily recommendations in food-based dietary guidelines (FBDGs), as a percentage of the total cost of a healthy diet. cost_of_fruits_relative_to_the_starchy_staples_in_a_least_cost_healthy_diet: title: Cost of fruits relative to the starchy staples in a least-cost healthy diet unit: "" @@ -90,16 +94,18 @@ tables: Cost of the least expensive fruits as a multiple of the least expensive starchy staples to meet daily recommendations in food-based dietary guidelines (FBDGs). affordability_of_a_healthy_diet__ratio_of_cost_to_food_expenditures: title: "Affordability of a healthy diet: ratio of cost to food expenditures" - unit: "" - short_unit: "" + unit: "%" + short_unit: "%" description: | - The ratio of the cost of a healthy diet to total food expenditure per capita per day from national accounts. + The percentage of the cost of a healthy diet to total food expenditure per capita per day from national accounts. percent_of_the_population_who_cannot_afford_a_healthy_diet: title: Share of the population who cannot afford a healthy diet unit: "%" short_unit: "%" description: | - The indicator expresses the percentage of the total population unable to afford a healthy diet. A healthy diet is considered unaffordable in a country when its cost exceeds 52 percent of income per capita per day. This percentage accounts for a portion of income that can be credibly reserved for food, based on observations that the population in low-income countries spend, on average, 52 percent of their income on food, as derived from the 2017 national accounts household expenditure data of the World Bank's International Comparison Programme (ICP). Income data are provided by the World Bank's Poverty and Inequality Platform. A value of zero indicates a null or a small number rounded down at the current precision level. + The indicator expresses the percentage of the total population unable to afford a healthy diet. A healthy diet is considered unaffordable in a country when its cost exceeds 52% of income per capita per day. + + This percentage accounts for a portion of income that can be credibly reserved for food, based on observations that the population in low-income countries spend, on average, 52% of their income on food, as derived from the 2017 national accounts household expenditure data of the World Bank's International Comparison Programme (ICP). Income data are provided by the World Bank's Poverty and Inequality Platform. A value of zero indicates a null or a small number rounded down at the current precision level. cost_of_legumes__nuts_and_seeds: title: Cost of legumes, nuts and seeds unit: international-$ in 2017 prices @@ -111,7 +117,7 @@ tables: unit: "%" short_unit: "%" description: | - Share of costs for the least expensive legumes, nuts or seeds to meet daily recommendations in food-based dietary guidelines (FBDGs), as a proportion of the total cost of a healthy diet. + Share of costs for the least expensive legumes, nuts or seeds to meet daily recommendations in food-based dietary guidelines (FBDGs), as a percentage of the total cost of a healthy diet. cost_of_legumes__nuts_and_seeds_relative_to_the_starchy_staples_in_a_least_cost_healthy_diet: title: Cost of legumes, nuts and seeds relative to the starchy staples in a least-cost healthy diet unit: "" @@ -129,7 +135,7 @@ tables: unit: "%" short_unit: "%" description: | - Share of costs for the least expensive oils or fats to meet daily recommendations in food-based dietary guidelines (FBDGs), as a proportion of the total cost of a healthy diet. + Share of costs for the least expensive oils or fats to meet daily recommendations in food-based dietary guidelines (FBDGs), as a percentage of the total cost of a healthy diet. cost_of_oils_and_fats_relative_to_the_starchy_staples_in_a_least_cost_healthy_diet: title: Cost of oils and fats relative to the starchy staples in a least-cost healthy diet unit: "" @@ -138,10 +144,10 @@ tables: Cost of the least expensive oils and fats as a multiple of the least expensive starchy staples to meet daily recommendations in food-based dietary guidelines (FBDGs). affordability_of_a_healthy_diet__ratio_of_cost_to_the_food_poverty_line: title: "Affordability of a healthy diet: ratio of cost to the food poverty line" - unit: "" - short_unit: "" + unit: "%" + short_unit: "%" description: | - The ratio of the cost of a healthy diet to the $1.12 food poverty line (52% of the international poverty line of 2.15 a day in 2017 international-$). + The percentage of the cost of a healthy diet to the $1.12 food poverty line (52% of the international poverty line of 2.15 a day in 2017 international-$). cost_of_starchy_staples: title: Cost of starchy staples unit: international-$ in 2017 prices @@ -153,7 +159,7 @@ tables: unit: "%" short_unit: "%" description: | - Share of costs for the least expensive starchy staples to meet daily recommendations in food-based dietary guidelines (FBDGs), as a proportion of the total cost of a healthy diet. + Share of costs for the least expensive starchy staples to meet daily recommendations in food-based dietary guidelines (FBDGs), as a percentage of the total cost of a healthy diet. people_who_cannot_afford_a_healthy_diet: title: Number of people who cannot afford a healthy diet unit: people @@ -171,7 +177,7 @@ tables: unit: "%" short_unit: "%" description: | - Share of costs for the least expensive vegetables to meet daily recommendations in food-based dietary guidelines (FBDGs), as a proportion of the total cost of a healthy diet. Data available for 2017. + Share of costs for the least expensive vegetables to meet daily recommendations in food-based dietary guidelines (FBDGs), as a percentage of the total cost of a healthy diet. Data available for 2017. cost_of_vegetables_relative_to_the_starchy_staples_in_a_least_cost_healthy_diet: title: Cost of vegetables relative to the starchy staples in a least-cost healthy diet unit: "" @@ -186,22 +192,24 @@ tables: Cost of the least expensive locally-available foods for nutrient adequacy for a representative person within upper and lower bounds for 23 essential macro- and micronutrients plus energy balance at 2330 kcal/day. Data available for 2017. affordability_of_a_nutrient_adequate_diet__ratio_of_cost_to_food_expenditures: title: "Affordability of a nutrient adequate diet: ratio of cost to food expenditures" - unit: "" - short_unit: "" + unit: "%" + short_unit: "%" description: | - The ratio of the cost of a nutrient adequate diet to total food expenditure per capita per day from national accounts. + The percentage of the cost of a nutrient adequate diet to total food expenditure per capita per day from national accounts. percent_of_the_population_who_cannot_afford_nutrient_adequacy: title: Share of the population who cannot afford nutrient adequacy unit: "%" short_unit: "%" description: | - The indicator expresses the percentage of the total population unable to afford a nutrient adequate diet. A healthy diet is considered unaffordable in a country when its cost exceeds 52 percent of income per capita per day. This percentage accounts for a portion of income that can be credibly reserved for food, based on observations that the population in low-income countries spend, on average, 52 percent of their income on food, as derived from the 2017 national accounts household expenditure data of the World Bank's International Comparison Programme (ICP). Income data are provided by the World Bank's Poverty and Inequality Platform. A value of zero indicates a null or a small number rounded down at the current precision level. + The indicator expresses the percentage of the total population unable to afford a nutrient adequate diet. A healthy diet is considered unaffordable in a country when its cost exceeds 52% of income per capita per day. + + This percentage accounts for a portion of income that can be credibly reserved for food, based on observations that the population in low-income countries spend, on average, 52% of their income on food, as derived from the 2017 national accounts household expenditure data of the World Bank's International Comparison Programme (ICP). Income data are provided by the World Bank's Poverty and Inequality Platform. A value of zero indicates a null or a small number rounded down at the current precision level. affordability_of_a_nutrient_adequate_diet__ratio_of_cost_to_the_food_poverty_line: title: "Affordability of a nutrient adequate diet: ratio of cost to the food poverty line" - unit: "" - short_unit: "" + unit: "%" + short_unit: "%" description: | - The ratio of the cost of a nutrient adequate diet to the $1.12 food poverty line (52% of the international poverty line of 2.15 a day in 2017 international-$). + The percentage of the cost of a nutrient adequate diet to the $1.12 food poverty line (52% of the international poverty line of 2.15 a day in 2017 international-$). people_who_cannot_afford_nutrient_adequacy: title: Number of people who cannot afford nutrient adequacy unit: people diff --git a/etl/steps/data/garden/wb/2023-07-24/food_prices_for_nutrition.py b/etl/steps/data/garden/wb/2023-07-24/food_prices_for_nutrition.py index 93b9821dcca..6f7e6588cec 100644 --- a/etl/steps/data/garden/wb/2023-07-24/food_prices_for_nutrition.py +++ b/etl/steps/data/garden/wb/2023-07-24/food_prices_for_nutrition.py @@ -24,7 +24,7 @@ def adapt_units(tb: Table) -> Table: tb = tb.rename(columns={column: column.replace("millions_of_people", "people")}) # Convert units expressed as fractions to percentages. - for column in [column for column in tb.columns if "cost_share" in column]: + for column in [column for column in tb.columns if column.startswith(("cost_share_", "affordability_"))]: tb[column] *= 100 return tb