Retrieves the station data from the LifeWatch project.

getStationData(
  startdate,
  stopdate,
  stations = "all",
  categories = "all",
  params = FALSE,
  ...
)

Arguments

startdate

Starting date for the query

stopdate

Stopping date for the query

stations

list of stations to be included in the query. Use stations="all" to get all stations.

categories

List of categories to return in query, one of ("SPM", "CTD", "Nutrients", "Secchi", "Pigments"). Use categories="All" to get all categories

params

If TRUE, returns a list with the dataset and the query parameters applied in the server side. IF FALSE returns only the data.

...

Reserved for internal use.

Value

Dataframe with the Station-data.

Examples

getStationData("2019-07-22", "2019-07-23", stations = "all", categories = "all")
#> - Query mode: Post request to OpenCPU server
#> No encoding supplied: defaulting to UTF-8.
#> - Query parameters: 
#>    - daterange: c("2019-07-22", "2019-07-23")
#>    - type: Station data
#>    - stationlist: all
#>    - categories: all
#>   Station Latitude Longitude                Time Conductivity(µS/cm)
#> 1     120  51.1850    2.7012 2019-07-22 08:00:00            46848.00
#> 2     120  51.1850    2.7012 2019-07-22 08:10:00                  NA
#> 3     215  51.2767    2.6133 2019-07-22 09:30:00            46386.44
#> 4     230  51.3083    2.8500 2019-07-22 13:30:00            45144.67
#> 5     230  51.3083    2.8500 2019-07-22 13:40:00                  NA
#> 6    ZG02  51.3333    2.5000 2019-07-22 10:30:00            46404.67
#>   Density(kg/m3) Fluorescence(mg/m³) OBS(NTU)      PAR Pressure(db)
#> 1       1024.351              4.0080   1.7831  44.6977       3.5850
#> 2             NA                  NA       NA       NA           NA
#> 3       1024.445              1.9142   0.5820 324.6139       3.5041
#> 4       1022.787              4.6617   2.9460 327.8300       3.5094
#> 5             NA                  NA       NA       NA           NA
#> 6       1024.704              2.0402   0.9092 548.1995       3.4002
#>   Salinity(PSU) Secchi_Depth(cm) Sound Velocity(m/s) Temperature(degC)
#> 1       34.3466              200            1520.043           19.7264
#> 2            NA               NA                  NA                NA
#> 3       34.3236               NA            1518.792           19.2911
#> 4       32.4957               NA            1519.603           20.3122
#> 5            NA              120                  NA                NA
#> 6       34.5694              401            1518.279           19.0132
#>   Ammonium_NH4(µmol N_NH4/L) Nitrate_Nitrite(µmol N_NO3-NO2/L)
#> 1                         NA                                NA
#> 2                       0.88                              1.41
#> 3                       0.40                              0.16
#> 4                       4.81                              2.80
#> 5                         NA                                NA
#> 6                       0.29                              0.08
#>   Nitrate_NO3(µmol N_NO3/L) Nitrite_NO2(µmol N_NO2/L)
#> 1                        NA                        NA
#> 2                      1.36                      0.05
#> 3                      0.14                      0.02
#> 4                      2.38                      0.42
#> 5                        NA                        NA
#> 6                      0.07                      0.01
#>   Phosphate_PO4(µmol P_PO4/L) Silicate_SiO4(µmol Si_SiO4/L) SPM(mg/l)
#> 1                          NA                            NA        NA
#> 2                        0.17                          1.95       5.2
#> 3                        0.08                          0.97        NA
#> 4                        0.65                         10.29       8.7
#> 5                          NA                            NA        NA
#> 6                        0.07                          0.22       3.6
getStationData("2019-07-22", "2019-07-23", stations = c(120, 215),
categories = c("Nutrients", "Secchi"), params = TRUE)
#> - Query mode: Post request to OpenCPU server
#> No encoding supplied: defaulting to UTF-8.
#> - Query parameters: 
#>    - daterange: c("2019-07-22", "2019-07-23")
#>    - type: Station data
#>    - stationlist: c(120, 215)
#>    - categories: c("Nutrients", "Secchi")
#> $mdf
#>   Station Latitude Longitude                Time Secchi_Depth(cm)
#> 1     120  51.1850    2.7012 2019-07-22 08:00:00              200
#> 2     120  51.1850    2.7012 2019-07-22 08:10:00               NA
#> 3     215  51.2767    2.6133 2019-07-22 09:30:00               NA
#>   Ammonium_NH4(µmol N_NH4/L) Nitrate_Nitrite(µmol N_NO3-NO2/L)
#> 1                         NA                                NA
#> 2                       0.88                              1.41
#> 3                       0.40                              0.16
#>   Nitrate_NO3(µmol N_NO3/L) Nitrite_NO2(µmol N_NO2/L)
#> 1                        NA                        NA
#> 2                      1.36                      0.05
#> 3                      0.14                      0.02
#>   Phosphate_PO4(µmol P_PO4/L) Silicate_SiO4(µmol Si_SiO4/L)
#> 1                          NA                            NA
#> 2                        0.17                          1.95
#> 3                        0.08                          0.97
#> 
#> $par
#> $par$daterange
#> [1] "2019-07-22" "2019-07-23"
#> 
#> $par$type
#> [1] "Station data"
#> 
#> $par$stationlist
#> [1] 120 215
#> 
#> $par$categories
#> [1] "Nutrients" "Secchi"   
#> 
#>