Tools2

Statistics 4868/6610 Data Visualization

Prof. Eric A. Suess

1/25/2015

Introduction

Today we are going to add a few more tools to the list given in Chapter 3.

  • Bubble Charts
  • word clouds
  • Google Charts from R
  • More Tableau
  • plot.ly
  • Plotting maps with R and shape files
  • Introduction to ggplot2

Microsoft buys Revolution Analytics

Last year Revolution Analytics was purchased by Microsoft.

David Smith's blog post Revolution Analytics joins Microsoft.

R coming to Visual Studio David Smith will be doing a webinar this week on Thursday about the release of RTVS.

This is very exciting!!!

Microsoft buys Revolution Analytics

Why?

David Smith's blog post Microsoft acquires Revolution Analytics - news roundup links to other posts that explain why.

What other R company might be next?

Bubble Charts

Try the FlowingData Tutorial on Bubble Charts.

How to Make Bubble Charts

word cloud

Making word clouds in R is usually done with text mining.

See the class Handout webpage for wordcloud.R

Try it.

Get a book from Project Gutenberg

Hopefully we can get the R libraries to work.

If not, try wordle.net.

Google Charts from R

Check out the blog spatial.ly and the R Spatial Tips webpage. Lots of interesting links.

There is a very nice post about the R interface to Google Chart Tools

Tableau

Here is the link to the Tableau Training & Tutorials webapge and here is the link to the Live Training Resources webpage.

Give the Mapping Training a try. Listen to the past webcast and try to create the maps produced.

The putting pie charts onto the map is cool.

plot.ly

plot.ly a cloud based software platform for doing plots. The plots are very nice.

Check out the heatmaps.

Plotting maps with R

There are main libraries that are useful to make maps in R.

When working with maps you will start to use shape files.
These are .shp files.

Try to make the plot described on this Playing with R blog post, Plotting Maps in R

Slide With R Code

From the Quick-R website.

Advanced Graphs

Try some plots using ggplot2

# ggplot2 examples
library(ggplot2) 

# create factors with value labels 
mtcars$gear <- factor(mtcars$gear,levels=c(3,4,5),
    labels=c("3gears","4gears","5gears")) 
mtcars$am <- factor(mtcars$am,levels=c(0,1),
    labels=c("Automatic","Manual")) 
mtcars$cyl <- factor(mtcars$cyl,levels=c(4,6,8),
    labels=c("4cyl","6cyl","8cyl")) 
# Kernel density plots for mpg
# grouped by number of gears 
# (indicated by color)
qplot(mpg, data=mtcars, geom="density", fill=gear, alpha=I(.5), 
   main="Distribution of Gas Milage", xlab="Miles Per Gallon", 
   ylab="Density")

plot of chunk unnamed-chunk-2

# Scatterplot of mpg vs. hp for each 
# combination of gears and cylinders
# in each facet, transmition type is 
# represented by shape and color
qplot(hp, mpg, data=mtcars, shape=am, color=am, 
   facets=gear~cyl, size=I(3),
   xlab="Horsepower", ylab="Miles per 
   Gallon") 

plot of chunk unnamed-chunk-3

# Separate smoothers of mpg on weight for each number of cylinders
qplot(wt, mpg, data=mtcars, geom=c("point", 
   "smooth"), color=cyl, 
   main="Smoothers of MPG on Weight", 
   xlab="Weight", ylab="Miles per Gallon")

plot of chunk unnamed-chunk-4

# Boxplots of mpg by number of gears 
# observations (points) are overlayed and jittered
qplot(gear, mpg, data=mtcars, geom=c("boxplot", "jitter"), 
   fill=gear, main="Mileage by Gear Number",
   xlab="", ylab="Miles per Gallon")

plot of chunk unnamed-chunk-5