knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)
devtools::load_all()

spitcastr

Travis Codecov GitHub
license

An R client for the Spitcast Surf Forecast API.

Usage

Install spitcastr

# install.packages("devtools")
devtools::install_github("sboysel/spitcastr")
library(spitcastr)

County

List the spots in a county

library(dplyr)
county(item = "spots", county_name = "Orange County") %>%
  dplyr::tbl_df()

List swell forecasts for a particular county

county(item = "swell", county_name = "Orange County") %>%
  dplyr::tbl_df()

Get tide predictions for a particular county

county(item = "tide", county_name = "Orange County") %>%
  dplyr::tbl_df()

Get water temperature for a particular county

county(item = "temp", county_name = "Orange County") %>%
  dplyr::tbl_df()

Get wind speed predictions for a particular county

county(item = "wind", county_name = "Orange County") %>%
  dplyr::tbl_df()

Spots

List all spots

spot(item = "all") %>%
  dplyr::tbl_df() %>%
  dplyr::filter(county_name == "Santa Barbara") 

Get the forecast for a specific spot

spot(item = "forecast", spot_id = 183) %>%
  dplyr::tbl_df()

List spot near your location

spot(item = "nearby") %>%
  dplyr::tbl_df()

List neighbors of a given spot

spot(item = "neighbors", spot_id = 1, direction = "above") %>%
  dplyr::tbl_df()

Search for a spot with a sequence of parameters

spot(item = "search", size_min = 3, size_max = 8, shape_min = 1) %>%
  dplyr::tbl_df()

List top spots

spot(item = "top") %>%
  dplyr::tbl_df()

Resources

Be sure to checkout Spitcast and read the 'fine print':

Public distribution of Spitcast API content must acknowledge Spitcast as the content source, and provide a link to Spitcast.com.

The Spitcast API is available for non-commercial use. Commercial use is possible by prior arrangement.

The Spitcast API is available for low request volume use. Please cache API responses. Please also make API requests to api.spitcast.com, and NOT to www.spitcast.com.

The Spitcast API is experimental and is currently offered on an ad hoc basis with no guarantee of uptime or availability of continued service. We reserve the right to disable access to external applications at any time.



sboysel/spitcastr documentation built on May 29, 2019, 3:25 p.m.