Description Usage Arguments Value Examples
Download NOAA OISST Data
1 2 3 4 5 6 7 8 | OISST_sub_dl(
start,
end,
latitude_ext,
longitude_ext,
url = "https://coastwatch.pfeg.noaa.gov/erddap/",
dataset = "ncdcOisst21Agg_LonPM180"
)
|
start |
Start date. Must be formatted with |
end |
End date. Must be formatted with |
latitude_ext |
Vector of two coordinates with latitude extent. |
longitude_ext |
Vector of two coordinates with longitude extent |
url |
URL of ERDDAP server. Defaults to https://coastwatch.pfeg.noaa.gov/erddap |
dataset |
Dataset used on ERDDAP server. Defaults to ncdcOisst21Agg_LonPM180 See https://coastwatch.pfeg.noaa.gov/erddap/search/index.html?page=1&itemsPerPage=1000&searchFor=OISST for more. |
A data frame of latitude, longitude, date, and temperature
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
library(ggplot2)
temp <- OISST_sub_dl(
start = as.Date("1982-01-01"),
end = as.Date("1989-12-31"),
latitude_ext = c(-40, -35),
longitude_ext = c(15, 21)
)
ggplot(data = temp,
aes(x = lon, y = lat)) +
geom_tile(aes(fill = temp)) +
scale_fill_viridis_c() +
coord_quickmap(expand = F) +
labs(x = NULL, y = NULL, fill = "SST (°C)") +
theme(legend.position = "bottom")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.