Git Product home page Git Product logo

exdata_plotting1's Introduction

Introduction

This assignment uses data from the UC Irvine Machine Learning Repository, a popular repository for machine learning datasets. In particular, we will be using the "Individual household electric power consumption Data Set" which I have made available on the course web site:

  • Dataset: Electric power consumption [20Mb]

  • Description: Measurements of electric power consumption in one household with a one-minute sampling rate over a period of almost 4 years. Different electrical quantities and some sub-metering values are available.

Loading the datase: The full dataset (2,075,259 rows and 9 columns) are loaded once a time. It will spend some time in the machine. In my case, I loaded the file using Windows 7 and a notebook Vaio with 8 MB of memory. In any case, the R scripts here assume that the file is downloaded and unzipped in a local directory!

The code is: DataSet <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='"')

Rem This file needs "correcting" the Date and time columns for usual formating: DataSet$Date <- as.Date(DataSet$Date, format="%d/%m/%Y")

For logical use in our scripts the full data set need to be subset. We select data from the dates 2007-02-01 and 2007-02-02: DataSubSet<- subset(DataSet, subset=(Date >= "2007-02-01" & Date <= "2007-02-02"))

After that we can construct our R scripts for plotting the data.

All plotting script are self described in the file.

exdata_plotting1's People

Contributors

rdpeng avatar

Watchers

James Cloos avatar João Pedro Albino avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.