Assignment Instructions: Using gapminder data, choose any variables to produce three plots using ggplot R package and upload your plot using R Markdown file via RPubs. Send your RPubs link as well as upload your R Markdown file via Brightspace. Your assignment will be evaluated by (1) the coherence of your study purpose, description of the data, and how the graphs can achieve your goal(s); (2) the quality of the plots; and (3) the layout of the R Markdown file.
Data: Gapminder
Source: This is a subset of the data available at https://www.gapminder.org/. It
includes data for 142 countries listing values for life expectancy, GDP
per capita, and population listed every five years from 1952 to 2007.
For this study, data visualization will use values from the 2007 dataset
only.
Number of cases: 142
Number of variables: 6
Description: Gross Domestic Product (GDP) per capita
is a broad but important component of a country’s overall economic
growth (Bolt, Timmer, and Zanden 2014).
Specifically, it measures the total output of a country’s production of
goods and services for one year divided by the country’s total
population (Hernández-Ramírez, Castillo-Mussot,
and Hernández-Casildo 2021), and is typically expressed in US
dollars (USD).
In addition to population, GDP per capita has several influencing
factors, but some are still not as understood. The geography (or
continent) where a country is located does not appear to have any
relation with GDP per capita, yet it is known to influence human
population characteristics (Small and Cohen
2004). Furthermore, life expectancy is also well-known to
contribute to a country’s population and is defined as the average total
number of years that a human expects to live (Tosato et al. 2007). It is uncertain if and
then how these variables may influence a country’s GDP per capita given
their indirect relationship via population.
Below are figures depicting data from 142 countries across 5
continents: Africa, Americas, Asia, Europe, and Oceania: Life expectancy
is expressed in years and GDP per capita is expressed in USD, both for
the year 2007.
Research Questions: What is the distribution of the data based on continent location? Which continent has the lowest GDP per Capita? Does geographical location influence the relationship between life expectancy and GDP per capita?
Figure 1: COUNTRIES PER INDIVIDUAL CONTINENT. A total of 142 countries are recorded in the gapminder data subset. African countries make up about 33% and Oceanic countries make up about 1% of the data.
Figure 2: LOG GDP PER CAPITA FOR EACH CONTINENT in 2007. The lowest median log GDP per Capita is found in Africa at 3.2 (~1585.00 USD). While Asian and Africa have the same range in Log GDP per Capita, Asia has the largest spread (interquartile range) between countries.
Figure 3: LOG GDP PER CAPITA and LIFE EXPECTANCY in 2007, categorized by continent. There is a positive correlation existing between the two variables. Two clusters of data appear at the lower and upper regression line, with the bottom cluster containing more of the African countries.