dot-lst_2_df: Utility function to extract data from a list of lists to a...

Description Usage Arguments Value

Description

Applying httr::content() to the (json) data returned by httr::GET() request sent to the NOAA API generates a nested list of lists. Each sub-list has four (five) elements, including t = the time , and v = the value (water depth). This function takes the list of lists and converts it into a dataframe with two data columns datetime (a 'POSIXct' value), and water_depth.

Usage

1
.lst_2_df(lst_o_lsts, tz = "UTC")

Arguments

lst_o_lsts

Source data, as a list of lists, as created by.

tz

Designation of timezone, to correctly convert from string to R dates and times. Correct value depends on the parameter sent to the NOAA API when requesting the data. Defaults to 'Etc/GMT+4', which is east coast US standard time.

Value

a tibble


ccb60/SLRSIM documentation built on Jan. 21, 2022, 1:31 a.m.