1659 search results for "ggplot2"

A visual data summary for data frames

May 21, 2012
By
A visual data summary for data frames

If you want to get a quick numerical summary of a data set, the summary function gives a nice overview for data frames: > require(ggplot2) Loading required package: ggplot2 > data(diamonds) > summary(diamonds) carat cut color clarity depth table Min. :0.2000 Fair : 1610 D: 6775 SI1 :13065 Min. :43.00 Min. :43.00 1st Qu.:0.4000 Good : 4906 E: 9797...

Read more »

Charting Twitter time series data with tweet and unique user counts

May 21, 2012
By

Let’s say you’ve used my Python script to automate the download of a hashtag or search phrase from Twitter (in a Unicode safe way, unlike within R).  Now let’s say you want to visualize the number of tweets over time.  Easy… Read more ›

Read more »

R-NOLD 2012-05-21 04:46:00

May 21, 2012
By
R-NOLD 2012-05-21 04:46:00

Mapping Philippines earthquake data from January 2011 to January 2012 collected by PHIVOLCS using R ggplot package.I tried to recreate the earthquake map of the Philippines created using maptool and R plot function using ggplot2. Earthquake map ...

Read more »

A Monty Hall Monte Carlo, Part 1? (Oh God)

May 20, 2012
By
A Monty Hall Monte Carlo, Part 1? (Oh God)

While I dig into conjugacy and the calculation of Bayesian credibility intervals, I figured it’d be good to put some of my other little rabbit holes up here on the off chance they’re interesting to someone. For some reason I...

Read more »

Cleveland Indians’ Attendance

May 20, 2012
By
Cleveland Indians’ Attendance

Recently, Chris Perez, the closer for the Indians, displayed some frustration with the fans for not supporting the team. Currently, they have the lowest attendance in the majors -- by a decent margin. The Indians are averaging about 15,000 fans per hom...

Read more »

Average Annual Population Growth Rate of Tawi-Tawi

May 19, 2012
By
Average Annual Population Growth Rate of Tawi-Tawi

R Codeslibrary(ggplot2) TawiTawiGrowthRate <- as.numeric(c(2.6, 3.3, 5.9, 1.6, 1.8, 5.5, 5))CensalYear <- c("1948-1960","1960-1970","1970-1980","1980-1990","1990-1995","1995-2000","2000-2007") qplot(CensalYear, TawiTawiGrowthRate, xlab ...

Read more »

Example Reproducible Report using R Markdown: Analysis of California Schools Test Data

May 18, 2012
By
Example Reproducible Report using R Markdown:  Analysis of California Schools Test Data

This is a quick set of analyses of the California Test Score dataset. The post was produced using R Markdown in RStudio 0.96. The main purpose of this post is to provide a case study of using R Markdown to prepare a quick reproducible report. It provides examples of using plots, output, in-line R code, and...

Read more »

Bar Graph Colours That Work Well

May 17, 2012
By
Bar Graph Colours That Work Well

Ever since I started using ggplot2 more often at work in order to do graphs, I’ve realized something about the use of colour in bar graphs vs. dot plots: When I’m looking at a graph displayed on the brilliant Viewsonic … Continue reading →

Read more »

Emulating local static variables in R

May 17, 2012
By
Emulating local static variables in R

Recently I was writing a code allowing to plot multiple ggplot2 plots on one page. I wanted to replicate standard behavior of  plot  function that plots graphs in sequence according to  mfrow/ mfcol option in par...

Read more »

Getting Started with R Markdown, knitr, and Rstudio 0.96

May 16, 2012
By
Getting Started with R Markdown, knitr, and Rstudio 0.96

This post examines the features of R Markdown using knitr in Rstudio 0.96. This combination of tools provides an exciting improvement in usability for reproducible analysis. Specifically, this post (1) discusses getting started with R Markdown and knitr in Rstudio 0.96; (2) provides a basic example of producing console output and plots...

Read more »