Week 4 - Creating Graphs for Data
The data from the Gapminder data set consisted of quantitative variables. Thus, the appropriate methods were used to analyse the relationships between the data.
Univariate Graphs
Univariate graphs were generated for each of the 3 variables - co2emissions, relectricperperson and urbanrate. All of the variables were quantitative and therefore histograms were generated to represent the distribution of the data. The program used is shown below, as well as the output graphs.
The Program
Univariate Graph for co2emissions
This graph is unimodal with most observations having cumulative emissions around 0.1e11 or 1,000,000,000 (i.e. 1 billion) metric tons. The graph is also skewed right with most observations having the lowest emissions. There is also an outlier at round 3.4e11(34 billion) metric tons.
Univariate Graph for relectricperperson
This graph also seems to be unimodal and skewed right, with the peak at around 250 kWh and most observations having the lowest recorded consumptions.
Univariate Graphs for urbanrate
This graph also shows a unimodal distribution with a peak at around 75% urban population. This is the only distribution that is skewed left with most of the observations having higher percentages of urbanisation.
Bivariate Graphs
Three bivariate graphs were generated to analyse the relationships between the chosen variables. Depending on the association being analysed, the variables were classed as either explanatory (E) or response (R) as follows:
- Urban rate (E) and CO2 emissions (R)
- Urban rate (E) and residential electricity consumption (R)
- Residential electricity consumption (E) and CO2 emissions (R)
1. Urban rate (E) and CO2 emissions (R)
The Program
The Graphs
In this graph, the majority of the points are clumped near the bottom because nearly all of the observations had very close values for CO2 emissions. This made analysis difficult, therefore a bar graph was generated based on quartiles of urbanisation.
The bar graph showed that countries with higher urban rates (i.e. those in the higher percentiles) had larger mean cumulative CO2 emissions. Therefore, based on the data, there is a positive relationship between these two variables.
2. Urban rate (E) and residential electricity consumption (R)
The Program
The Graph
The graph of electricity consumption vs % urban population shows what seems to be a positive relationship between the two variables. As the % urban population increases, so does the electricity consumption.
3. Residential electricity consumption (E) and CO2 emissions (R)
The Program
The Graphs
Similar to the graph of co2 emissions vs urban rate, the points on this plot are clustered near the bottom of the graph, indicating a need to generate a bar chart for deeper analysis.
The bar chart shows that generally, as electricity consumption increased, so did CO2 emissions. This implies a positive relationshp between the two variables.




Comments
Post a Comment