Just wanted to look at the duration of this year’s rainy season and how it stacked up against past years.

Seemed long to me.  But… it really wasn’t.  I made a couple cute graphics using ggplot2 (of course).  I got the data from the NWS Miami.

## 4 thoughts on “2014 Rainy Season Stats”

1. Robert Molleda says:

Interesting way to show this data! Let me know if there’s any other data I can provide you with.

1. weatherlisa says:

Thanks! I LOVE getting new data… Let me know if you have anything fun for me to analyze 🙂

2. rich says:

That’s great Lisa! I’m glad others are seeing the power and flexibility of R rather than defaulting to Excel. Here is another snippet you might be able to use depending on what you are plotting! 🙂

## Create 8760 random Weibull distribution wind speeds and plot
library(ggplot2)
library(reshape2)
library(plyr)

shape <- 3.3
scale <- 7.5
data <- data.frame("ID"="tower1", "wind.speed"=rweibull(n=8760, shape=shape, scale=scale))
data.melt <- melt(data, id=c("wind.speed", "ID"), measure.var=c("wind.speed"))
data.cdf <- ddply(data.melt, "ID", summarise, rating.mean=mean(wind.speed))

p <- ggplot(data.melt, aes(x=wind.speed, fill=ID)) +
geom_histogram(aes(y=..density..), colour="black", fill="yellow", binwidth=.5, alpha=.4, position="identity") +
stat_density(colour="blue", geom="line", alpha=0.8, position="identity") +
geom_vline(data=data.cdf, aes(xintercept=rating.mean, colour=ID), linetype="dashed", size=0.75) +
xlab("wind speed (m/s)") + ylab("density") +
ggtitle("Wind Speed Plot\n Wiebull distribution (scale=7.5, shape=3.3)")
ggsave(filename="weibullwindspeeds.pdf", plot=p, scale=1, width=8.5, height=11, units="in", dpi=300)

1. rich says:

the data assignment got all messed up with the copy…

data <- data.frame("ID"="tower1", "wind.speed"=rweibull(n=8760, shape=stdev, scale=avg))