Skip to content

Instantly share code, notes, and snippets.

@sckott
Created August 5, 2020 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sckott/6c47900318a3362488dc1bfe1363f458 to your computer and use it in GitHub Desktop.
Save sckott/6c47900318a3362488dc1bfe1363f458 to your computer and use it in GitHub Desktop.
x="https://tidesandcurrents.noaa.gov/api/datagetter?begin_date=20200730&end_date=20200804&station=8557380&product=predictions&datum=MLLW&units=metric&time_zone=lst_ldt&application=DRBC&format=csv"
f=tempfile(fileext = ".csv")
download.file(x, destfile = f)
readr::read_csv(f)
# A tibble: 1,440 x 2
`Date Time` Prediction
<dttm> <dbl>
1 2020-07-30 00:00:00 0.115
2 2020-07-30 00:06:00 0.123
3 2020-07-30 00:12:00 0.132
4 2020-07-30 00:18:00 0.143
5 2020-07-30 00:24:00 0.155
6 2020-07-30 00:30:00 0.168
7 2020-07-30 00:36:00 0.182
8 2020-07-30 00:42:00 0.197
9 2020-07-30 00:48:00 0.214
10 2020-07-30 00:54:00 0.231
# … with 1,430 more rows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment