diff --git a/README.Rmd b/README.Rmd index aebcc70..55af349 100644 --- a/README.Rmd +++ b/README.Rmd @@ -42,13 +42,15 @@ library(PurpleAir) Get the latest data from a single PurpleAir sensor, defined by its [sensor key](https://community.purpleair.com/t/sensor-index/4000): ```{r} -get_sensor_data(sensor_index = 175413, fields = c("name", "last_seen", "pm2.5_cf_1", "pm2.5_atm")) +get_sensor_data(sensor_index = 175413, + fields = c("name", "last_seen", "pm2.5_cf_1", "pm2.5_atm")) ``` Get the latest data from many PurpleAir sensors, defined by their sensor keys, ```{r} -get_sensors_data(x = as.integer(c(175257, 175413)), fields = c("name", "last_seen", "pm2.5_cf_1", "pm2.5_atm")) +get_sensors_data(x = as.integer(c(175257, 175413)), + fields = c("name", "last_seen", "pm2.5_cf_1", "pm2.5_atm")) ``` a geographic bounding box, diff --git a/README.md b/README.md index bed8dd5..79daca6 100644 --- a/README.md +++ b/README.md @@ -38,30 +38,32 @@ Get the latest data from a single PurpleAir sensor, defined by its [sensor key](https://community.purpleair.com/t/sensor-index/4000): ``` r -get_sensor_data(sensor_index = 175413, fields = c("name", "last_seen", "pm2.5_cf_1", "pm2.5_atm")) +get_sensor_data(sensor_index = 175413, + fields = c("name", "last_seen", "pm2.5_cf_1", "pm2.5_atm")) #> $last_seen -#> [1] "2024-07-05 14:09:43 EDT" +#> [1] "2024-07-05 14:11:43 EDT" #> #> $name #> [1] "JN-Clifton,OH" #> #> $pm2.5_atm -#> [1] 4.2 +#> [1] 3.8 #> #> $pm2.5_cf_1 -#> [1] 4.2 +#> [1] 3.8 ``` Get the latest data from many PurpleAir sensors, defined by their sensor keys, ``` r -get_sensors_data(x = as.integer(c(175257, 175413)), fields = c("name", "last_seen", "pm2.5_cf_1", "pm2.5_atm")) +get_sensors_data(x = as.integer(c(175257, 175413)), + fields = c("name", "last_seen", "pm2.5_cf_1", "pm2.5_atm")) #> # A tibble: 2 × 5 #> sensor_index last_seen name pm2.5_atm pm2.5_cf_1 #> -#> 1 175257 2024-07-05 14:10:00 Lillard 3.7 3.7 -#> 2 175413 2024-07-05 14:09:43 JN-Clifton,OH 4.2 4.2 +#> 1 175257 2024-07-05 14:12:00 Lillard 3.7 3.7 +#> 2 175413 2024-07-05 14:11:43 JN-Clifton,OH 3.8 3.8 ``` a geographic bounding box,