Learn R Programming

rfieldclimate (version 0.1.1)

fc_get_user: Read user information

Description

Read user information

List of user devices.

Get station information

Get min and max date of device data availability

Getdata between specified time periods.

Usage

fc_get_user(...)

fc_get_user_stations(...)

fc_get_station(station_id = NULL, ...)

fc_get_data(station_id = NULL, ...)

fc_get_data_range( station_id = NULL, data_group = c("raw", "hourly", "daily", "monthly"), from = NULL, to = NULL, ... )

Value

a list with user information.

a list with user stations information.

a list with station details.

a list with station metadata.

a list with station data.

Arguments

...

additional arguments passed to fc_request()

station_id

station id to query

data_group

how to group data

from

time in unix timestamps since UTC, e.g. via as.integer(as.POSIXct(Sys.time()))

to

time in unix timestamps since UTC as.integer(as.POSIXct(Sys.time()))

Examples

Run this code
if (FALSE) {
  fc_get_user()
}
if (FALSE) {
stations <- fc_get_user_stations()
stations
}
if (FALSE) {
stations <- fc_get_user_stations()
fc_get_station(stations[[1]]$station_name)
}
if (FALSE) {
stations <- fc_get_user_stations()
fc_get_data(stations[[1]]$station_name)
}
if (FALSE) {
stations <- fc_get_user_stations()
fc_get_data_range(
  station_id = stations[[1]]$station_name,
  data_group = "raw",
  from = as.integer(as.POSIXct(Sys.time() - 60*60*24)),
  to =  as.integer(as.POSIXct(Sys.time())))
}

Run the code above in your browser using DataLab