RaphaelDeLaGhetto / ExData_Plotting1

Plotting Assignment 1 for Exploratory Data Analysis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ExData_Plotting1

Project 1 for Coursera's Exploratory Data Analysis course

The purpose of this project is to recreate the plots provided in the course material using electrical power consumption data from the UC Irvine Machine Learning Repository. This document describes how to obtain the plotting scripts and run them locally.

Clone this repository

git clone https://github.com/RaphaelDeLaGhetto/ExData_Plotting1.git

Get the data

This data was originally downloaded on 2014-9-3

cd ExData_Plotting1
wget https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip

Execute the scripts

For each of the scripts below, ensure you are in the project's working directory. From there you may either run

Rscript plotN.R

or source the script from within the R interpreter

R
> source('plotN.R')

Be sure to replace N with the desired plot number.

plot1

Upon execution (i.e., Rscript plot1.R), this image is produced:

plot1.png

plot2

Rscript plot2.R produces:

plot2.png

plot3

Rscript plot3.R produces:

plot3.png

plot4

Rscript plot4.R produces:

plot4.png

Notes

The loadData.R script contains the loadData() function declaration. It is called in each of the plot scripts to unzip the original data set and select the relevant data.

The figure/ directory contains the images from the original project, from which this project is forked.

About

Plotting Assignment 1 for Exploratory Data Analysis


Languages

Language:R 100.0%