2024: Week 50 - Life Expectancy
Challenge by: Thomas Duong
Thomas has just finished his training at the Data School and has created a Preppin' Data challenge to celebrate! Over to Thomas to explain the challenge:
In 2021, the global average life expectancy exceeded 70 years—a remarkable achievement compared to less than 40 years just two centuries ago. In 1800, no region had an average life expectancy above 40. This steady and significant increase reflects advancements in healthcare, including better nutrition, sanitation, clean water, neonatal care, antibiotics, and vaccines, as well as improved living standards, economic growth, and poverty reduction. Let’s explore which countries surpass their continent’s average life expectancy and those with the most dramatic improvements.
Inputs
- Input the data
- Reshape the data so there is a field for the Country Life Expectancy for each Year, as well as a Continent Avg Life Expectancy field for each Year
- Filter the data to include only years from 1950 to 2020
- Determine the percentage of years (between 1950 and 2020) when a country’s life expectancy was higher than its continent’s average
- Compute the percentage change in life expectancy for each country between 1950 and 2020
- Show the top three countries in each continent with the highest percentage increase in life expectancy
- Round the results to the nearest one decimal place.
- Output the Data
Output
- 5 fields
- Continent
- Rank
- Country
- % Years Above Continent
- % Change
- 18 rows (19 including headers)