Question: Dataset: Gapminder data Description: Excerpt of the Gapminder data on life expectancy, GDP per capita, and population by country. Variables: ( i ) Country (

Dataset: Gapminder data
Description: Excerpt of the Gapminder data on life expectancy, GDP per capita, and population by country.
Variables:
(i) Country
(ii) Continent
(iii)year: ranges from 1952 to 2007 in increments of 5 years
(iv) lifeExp: life expectancy at birth, in years
(v) pop: population
(vi) gdpPercap: GDP per capita (US$, inflation-adjusted)
1. Using the 'Gapminder' dataset, filter the data for the year 2007 and create a new variable 'gdp_category' based on GDP per capita. Classify countries into three categories: 'Low,' 'Medium,' and 'High' based on the following criteria:
'Low' if GDP per capita is less than 10000.
'Medium' if GDP per capita is between 10000(inclusive) and 20000(exclusive).
'High' if GDP per capita is 20000 or more.
Write a script to perform these operations and provide a brief explanation of your approach.
2. Using the filtered 'gapminder' dataset for the year 2007 and the previously created 'gdp_category' variable, conduct a detailed comparative analysis of life expectancy across different GDP categories. Hint: Only use appropriate graphics and/or descriptive statistics to help you achieve this.
3. Generate an appropriate plot to explore the evolution of life expectancy across any five selected countries, with each country representing one continent. Utilize the 'gapminder' dataset for this analysis. USING R STUDIO

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!