PacIOOS has publicly accessible data on wave heights, wave periods, wave direction derived from buoys located around the Hawaiian Islands. During the biggest northerly swells, Waimea Bay experiences some of the biggest waves in the world. The Eddie Aikau contest is held when the swells reach 40+ ft.
I downloaded data on wave height, wave period, and wave direction during the month of January. Using R studio, I was able to plot a time series line graph of the wave height for January 25, 2020.
First, I downloaded the wave buoy data and imported it into R studio:
library(readr)
Waimea_ <- read_csv("Waimea_.csv")
View(Waimea_)
Then, I installed the knitr package and used the “kable” function to nicely display the wave buoy data in a table:
library(knitr)
kable(Waimea_, format="markdown", digits=2)
| Date | Time | Wave_Height | Direction | Period | Mean Period |
|---|---|---|---|---|---|
| 1/25/2020 | 00:09:00 | 6.46 | 323 | 12.50 | 9.13 |
| 1/25/2020 | 00:39:00 | 6.40 | 320 | 12.50 | 9.25 |
| 1/25/2020 | 01:09:00 | 6.14 | 320 | 11.76 | 9.13 |
| 1/25/2020 | 01:39:00 | 6.73 | 325 | 11.76 | 9.02 |
| 1/25/2020 | 02:09:00 | 6.69 | 317 | 11.76 | 8.83 |
| 1/25/2020 | 02:39:00 | 7.22 | 318 | 11.76 | 8.88 |
| 1/25/2020 | 03:09:00 | 7.94 | 316 | 12.50 | 9.35 |
| 1/25/2020 | 03:39:00 | 7.41 | 316 | 11.76 | 8.76 |
| 1/25/2020 | 04:09:00 | 7.94 | 306 | 20.00 | 9.55 |
| 1/25/2020 | 04:39:00 | 7.91 | 310 | 12.50 | 8.90 |
| 1/25/2020 | 05:09:00 | 8.50 | 304 | 18.18 | 10.02 |
| 1/25/2020 | 05:39:00 | 8.83 | 313 | 20.00 | 10.68 |
| 1/25/2020 | 06:09:00 | 9.25 | 310 | 20.00 | 10.94 |
| 1/25/2020 | 06:39:00 | 10.47 | 306 | 18.18 | 11.67 |
| 1/25/2020 | 07:09:00 | 10.43 | 306 | 18.18 | 11.69 |
| 1/25/2020 | 07:39:00 | 11.02 | 310 | 18.18 | 12.58 |
| 1/25/2020 | 08:09:00 | 12.04 | 320 | 18.18 | 12.73 |
| 1/25/2020 | 08:39:00 | 12.99 | 318 | 20.00 | 13.21 |
| 1/25/2020 | 09:09:00 | 12.63 | 317 | 18.18 | 13.06 |
| 1/25/2020 | 09:39:00 | 14.21 | 314 | 18.18 | 13.86 |
| 1/25/2020 | 10:09:00 | 14.17 | 311 | 18.18 | 14.12 |
| 1/25/2020 | 10:39:00 | 14.07 | 313 | 18.18 | 13.83 |
| 1/25/2020 | 11:09:00 | 13.85 | 316 | 18.18 | 13.19 |
| 1/25/2020 | 11:39:00 | 12.20 | 316 | 16.67 | 12.38 |
| 1/25/2020 | 12:09:00 | 13.22 | 317 | 16.67 | 12.99 |
| 1/25/2020 | 12:39:00 | 13.81 | 314 | 18.18 | 13.10 |
| 1/25/2020 | 13:09:00 | 14.27 | 304 | 16.67 | 12.87 |
| 1/25/2020 | 13:39:00 | 14.50 | 307 | 18.18 | 13.20 |
| 1/25/2020 | 14:09:00 | 14.07 | 304 | 16.67 | 12.74 |
| 1/25/2020 | 14:39:00 | 14.30 | 302 | 18.18 | 13.03 |
| 1/25/2020 | 15:09:00 | 11.98 | 306 | 18.18 | 11.58 |
| 1/25/2020 | 15:39:00 | 12.76 | 302 | 18.18 | 12.44 |
| 1/25/2020 | 16:09:00 | 13.58 | 304 | 18.18 | 12.95 |
| 1/25/2020 | 16:39:00 | 13.32 | 307 | 16.67 | 12.78 |
| 1/25/2020 | 17:09:00 | 17.06 | 311 | 18.18 | 13.96 |
| 1/25/2020 | 17:39:00 | 12.40 | 307 | 18.18 | 12.25 |
| 1/25/2020 | 18:09:00 | 12.37 | 300 | 16.67 | 12.09 |
| 1/25/2020 | 18:39:00 | 12.76 | 310 | 16.67 | 12.25 |
| 1/25/2020 | 19:09:00 | 12.50 | 309 | 15.38 | 11.79 |
| 1/25/2020 | 19:39:00 | 12.43 | 306 | 16.67 | 11.98 |
| 1/25/2020 | 20:09:00 | 12.34 | 311 | 16.67 | 11.40 |
| 1/25/2020 | 20:39:00 | 13.88 | 317 | 16.67 | 12.51 |
| 1/25/2020 | 21:09:00 | 11.45 | 317 | 16.67 | 11.79 |
| 1/25/2020 | 21:39:00 | 12.14 | 318 | 16.67 | 12.89 |
| 1/25/2020 | 22:09:00 | 13.35 | 316 | 16.67 | 13.09 |
| 1/25/2020 | 22:39:00 | 13.02 | 317 | 16.67 | 12.73 |
| 1/25/2020 | 23:09:00 | 11.45 | 313 | 16.67 | 12.35 |
| 1/25/2020 | 23:39:00 | 12.17 | 321 | 18.18 | 12.46 |
I used this wave buoy data to plot wave height every 30 minutes on January 25, 2020 using the ggplot package:
library(ggplot2)
Time<-Waimea_$Time
P1 <- ggplot(aes(x=Time, y=Wave_Height), data=Waimea_)+
geom_line() +xlab("Time") + ylab("Wave Height")+
ggtitle("Wave Height at Waimea Buoy on January 25, 2020")
P1
I used the Geom_line function to change the color and thickness of the line. I also added the “classic” theme to this plot:
P1 <- ggplot(aes(x=Time, y=Wave_Height), data=Waimea_)+
geom_line(linetype="solid", color="blue", size=2) +xlab("Time") + ylab("Wave Height")+
ggtitle("Wave Height at Waimea Buoy on January 25, 2020")
P1+ theme_classic()
This plot allows us to see what time the peak wave height was at Waimea on January 25, 2020. As you can see, wave height at Waimea was greatest at around 6:00 PM.
RMarkdown is an awesome tool to display plots, analyze data, and give instructions on using R Studio!!!!!!!!!!!!
**Now GO OUT AND CHARGE LIKE EDDIE!