View source: R/api_get_timeseries.R
This function calls postgres_get
to get data from the endpoint
given by path
and calls fhpredict:::flatten_recursive_list
to
convert the list structure into a data frame. The time columns "createdAt"
and "updatedAt" are converted from a text timestamp given in ISO 8601 format
(e.g. "2019-10-22T23:38:29.003Z") to POSIXct objects in time zone
"Europe/Berlin". A new POSIXct column dateTime
is created from the
original text columns date
and dateTime
as they are returned by
the API:
(original) date
column: date and time information as text,
e.g. "2019-09-21T00:00:00.000Z"
(original) dateTime
column: only time information as text,
e.g. "10:50:00"
(new) dateTime
column: date and time as POSIXct in time zone
"Europe/Berlin"
1 2 3 4 5 6 7 |
path |
(relative) path to API endpoint |
subject |
name of data subject, to be used in messages |
sort |
if |
token |
passed to |
type |
optional. If given, columns are removed and reordered using
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.