1779 search results for "ggplot2"

GGtutorial: Day 4 – More Colors

November 1, 2012
By
GGtutorial: Day 4 – More Colors

So far we’ve covered Melting and Casting data using the reshape() package and today we’re going to look at different ways of coloring and selecting palettes for plots. For these plots, we’re going to use the built in diamonds data...

Read more »

More data apps spawned by Sandy

October 31, 2012
By
More data apps spawned by Sandy

As the clean-up continues on the eastern seaboard, I wanted to follow up on Monday's post on tracking Hurricane Sandy with Open Data with a couple of other R-based data applications spawned by the storm. Josef Fruehwald created an R script to tap into local weather sensors to keep track of air pressure, wind speed and rainfall near his...

Read more »

Hierarchical linear models and lmer

October 31, 2012
By
Hierarchical linear models and lmer

Hierarchical linear models and lmer Article by Ben Ogorek Graphics by Bob Forrest Background My last article featured linear models with random slopes. For estimation and prediction, we used the lmer function from the lme4 package. Today we'll consider another level in the hierarchy, one...

Read more »

GGtutorial: Day 3 – Introduction to Colors

October 31, 2012
By
GGtutorial: Day 3 – Introduction to Colors

So, where does ggplot get its colors? If you’ve ever asked ggplot to color on the basis of a factor, you might have beeen surprised by the default color choices.  The fact is, ggplot colors factors on the basis of finding evenly spaced colors a...

Read more »

Fitting Distributions to Data with R

October 31, 2012
By

In “Fitting Distributions with R” Vito Ricci writes; “Fitting distributions consists in finding a mathematical function which represents in a good way a statistical variable. A statistician often is facing with this problem: he has some observations of a quantitative character and he wishes to test if those observations, being a sample of an unknown population, belong from a...

Read more »

Build Static HTML Help Pages for R Packages

October 29, 2012
By
Build Static HTML Help Pages for R Packages

Many R users may still remember the good old days when we had static HTML documentation for R packages. That was probably before R 2.10.0 (in 2009). Then we had the fancy dynamic HTML help based on the built-in httpd server, but it has never really mad...

Read more »

Animated map of 2012 US election campaigning, with R and ffmpeg

October 28, 2012
By

(Video link here, in case the embedded player doesn’t work for you.) Idea: see if I can mimic the idea behind Ben Schmidt’s lovely video of ocean shipping routes, and apply it to another dataset. But which? “Hmm… what’s another … Continue reading →

Read more »

Notes on a Scandal – When Jimmy beat Katy

October 25, 2012
By
Notes on a Scandal  – When Jimmy beat Katy

No the title doesn’t refer to how Katy Perry suffered at another of Jimmy Savile’s sexual predelictions, although these are two of  the participants. I’ll get to the details later Just over a year ago, I reflected on the relative wiki searches of leading female singing celebrities, including Ms Perry. In the light of the

Read more »

Palettes in R

October 25, 2012
By
Palettes in R

In its simplest form, a palette in R is simply a vector of colors. This vector can be include the hex triplet or R color names.The default palette can be seen through palette(): > palette("default") # you'll only need this line if you've previ...

Read more »

Congressional ideology by state

October 25, 2012
By
Congressional ideology by state

In a recent post, I illustrated how to add a background geom to your ggplot. While that code worked, and the plot looked fine, it was pointed out to me that I was missing an important aspect of plot layering with ggplot2. Namely, it is not, as I previ...

Read more »