Data Source

The data set we provided by: http://data.giss.nasa.gov/gistemp/

Introduction

This assignment will give you a chance to explore the topics covered in week 2 of the course by visualizing some data as a chart. The data set we provided deals with world temperatures and comes from NASA: http://data.giss.nasa.gov/gistemp/. Alternatively you can use any data that you would like to explore. You are not required to use D3.js, but if you would like to, we have provided some helpful resources that will make it easier for you to create a visualization. You are welcome to use the additional resources, especially if you do not want to program to complete this project.

Goals

The goal of this assignment is to give you some experience with handling and deciding how to visualize some data and for you to get a feel for the various aspects of the visualization.

Load the data

library(ggplot2)
data <- read.csv("./ExcelFormattedGISTEMPData2CSV.csv", header=TRUE, sep=",")
head(data)
##   Year Glob NHem SHem X24N.90N X24S.24N X90S.24S X64N.90N X44N.64N X24N.44N
## 1 1880  -19  -33   -5      -38      -16       -5      -89      -54      -22
## 2 1881  -10  -18   -2      -27       -2       -5      -54      -40      -14
## 3 1882   -9  -17   -1      -21      -10        4     -125      -20       -3
## 4 1883  -19  -30   -8      -34      -22       -2      -28      -57      -20
## 5 1884  -27  -42  -12      -56      -17      -11     -127      -58      -41
## 6 1885  -31  -41  -21      -61      -17      -20     -119      -70      -43
##   EQU.24N X24S.EQU X44S.24S X64S.44S X90S.64S
## 1     -26       -5       -2       -8       39
## 2      -5        2       -6       -3       37
## 3     -12       -8        3        8       42
## 4     -25      -19       -1        0       37
## 5     -21      -14      -15       -5       40
## 6     -11      -23      -27       -7       38

Visualization

lineChart <- ggplot(data,aes(x=Year))
lineChart <- lineChart + geom_line(aes(y=NHem, color="North Hemisphere")) + geom_line(aes(y=SHem, color="South Hemisphere")) + scale_colour_manual(values=c("North Hemisphere"="blue","South Hemisphere"="red")) + labs(title="Temperature Means over Years", x="Year",y="Temperature Mean")
lineChart