0%

Book Description

How do you use R to import, manage, visualize, and analyze real-world data? With this short, hands-on tutorial, you learn how to collect online data, massage it into a reasonable form, and work with it using R facilities to interact with web servers, parse HTML and XML, and more. Rather than use canned sample data, you'll plot and analyze current home foreclosure auctions in Philadelphia.

This practical mashup exercise shows you how to access spatial data in several formats locally and over the Web to produce a map of home foreclosures. It's an excellent way to explore how the R environment works with R packages and performs statistical analysis.

  • Parse messy data from public foreclosure auction postings
  • Plot the data using R's PBSmapping package
  • Import US Census data to add context to foreclosure data
  • Use R's lattice and latticeExtra packages for data visualization
  • Create multidimensional correlation graphs with the pairs() scatterplot matrix package

Table of Contents

  1. Introduction
  2. 1. Mapping Foreclosures
    1. Messy Address Parsing
      1. Exploring “streets”
      2. Obtaining Latitude and Longitude Using Yahoo
    2. Shaking the XML Tree
    3. The Many Ways to Philly (Latitude)
      1. Using Data Structures
      2. Using Helper Methods
      3. Using Internal Class Methods
    4. Exceptional Circumstances
      1. The Unmappable Fake Street
      2. No Connection
    5. Taking Shape
      1. Finding a Usable Map
      2. PBSmapping
    6. Developing the Plot
      1. Preparing to Add Points to Our Map
      2. Exploring R Data Structures: geoTable
      3. Making Events of Our Foreclosures
    7. Turning Up the Heat
      1. Factors When You Need Them
      2. Filling with Color Gradients
  3. 2. Statistics of Foreclosure
    1. Importing Census Data
    2. Descriptive Statistics
    3. Descriptive Plots
    4. Correlation
    5. Final Thoughts
  4. A. Getting Started
    1. Obtaining R
    2. Quick and Dirty Essentials of R
    3. O’Reilly Resources
  5. About the Authors
  6. Copyright
3.21.163.161