From 6545c2af5d45b04f5fae547525fd03d4f0841b51 Mon Sep 17 00:00:00 2001 From: Cole Brokamp Date: Tue, 8 Oct 2024 14:20:03 -0400 Subject: [PATCH] cran release updates --- DESCRIPTION | 2 +- NEWS.md | 4 ++- README.md | 88 ++++++++++++++++++++++++------------------------ cran-comments.md | 5 +-- 4 files changed, 49 insertions(+), 50 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1fcbd79..f6301a5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: PurpleAir Title: Query the 'PurpleAir' Application Programming Interface -Version: 1.0.1.9000 +Version: 1.0.1 Authors@R: person("Cole", "Brokamp", , "cole@colebrokamp.com", role = c("aut", "cre", "cph"), comment = c(ORCID = "0000-0002-0289-3151")) diff --git a/NEWS.md b/NEWS.md index 3ccb18c..d014d34 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,6 @@ -# PurpleAir (development version) +# PurpleAir 1.0.1 + +* Fix bug with using bbox coordinates to find sensors # PurpleAir 1.0.0 diff --git a/README.md b/README.md index 9adb9db..7849bd9 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ use: ``` r check_api_key(Sys.getenv("PURPLE_AIR_API_KEY")) -#> ✔ Using valid 'READ' key with version V1.0.14-0.0.57 of the PurpleAir API on 1720549867 +#> ✔ Using valid 'READ' key with version V1.0.14-0.0.58 of the PurpleAir API on 1728410515 ``` Get the latest data from a single PurpleAir sensor, defined by its @@ -72,16 +72,16 @@ key](https://community.purpleair.com/t/sensor-indexes-and-read-keys/4000): get_sensor_data(sensor_index = 175413, fields = c("name", "last_seen", "pm2.5_cf_1", "pm2.5_atm")) #> $last_seen -#> [1] "2024-07-09 14:30:33 EDT" +#> [1] "2024-10-08 13:59:39 EDT" #> #> $name #> [1] "JN-Clifton,OH" #> #> $pm2.5_atm -#> [1] 28.3 +#> [1] 0.9 #> #> $pm2.5_cf_1 -#> [1] 28.7 +#> [1] 0.9 ``` Get the latest data from many PurpleAir sensors, defined by their sensor @@ -93,8 +93,8 @@ get_sensors_data(x = c(175257, 175413), #> # A tibble: 2 × 5 #> sensor_index last_seen name pm2.5_atm pm2.5_cf_1 #> -#> 1 175257 2024-07-09 14:28:53 Lillard 28.2 28.8 -#> 2 175413 2024-07-09 14:28:33 JN-Clifton,OH 29.6 30.2 +#> 1 175257 2024-10-08 14:00:02 Lillard 1.4 1.4 +#> 2 175413 2024-10-08 14:01:39 JN-Clifton,OH 1 1 ``` a geographic [bounding box](http://bboxfinder.com), @@ -110,40 +110,40 @@ sf::st_bbox( crs = 4326 ) |> get_sensors_data(fields = c("name")) -#> # A tibble: 45 × 2 -#> sensor_index name -#> -#> 1 30303 아가페_실내 -#> 2 30561 lineblock_outside2 -#> 3 30571 amlok_inside -#> 4 36325 807d3a616167 -#> 5 36681 68c63a8e59a -#> 6 42623 KMI_041 -#> 7 49191 BCDDC264D0B1 -#> 8 49193 ECFABCB88583 -#> 9 49199 ECFABC59A4F4 -#> 10 49213 807D3A615D1E -#> # ℹ 35 more rows +#> # A tibble: 56 × 2 +#> sensor_index name +#> +#> 1 35225 Mt. Washington +#> 2 102568 SR32 +#> 3 103282 Carolina pines +#> 4 111898 Bridgetown Sanctuary +#> 5 120311 Loveland +#> 6 127885 Meals on Wheels +#> 7 127915 MSD 6 +#> 8 127921 Groundwork +#> 9 130719 NKU KY DAQ +#> 10 156117 Tshs 1 +#> # ℹ 46 more rows ``` or a date from which sensors must have been modified since. ``` r get_sensors_data(as.POSIXct(Sys.time()) - 60, fields = "name") -#> # A tibble: 8,815 × 2 -#> sensor_index name -#> -#> 1 77 Sunnyside -#> 2 314 Parker -#> 3 340 Ingram Road -#> 4 387 Monmouth Drive P1 -#> 5 459 Flight Park North 2 -#> 6 912 The Hub -#> 7 930 Strathcona Terrace -#> 8 934 Glenmohr Drive -#> 9 978 Hillerød f989 -#> 10 992 Cosgriff Catholic School -#> # ℹ 8,805 more rows +#> # A tibble: 568 × 2 +#> sensor_index name +#> +#> 1 978 Hillerød f989 +#> 2 1294 Roberts Creek +#> 3 1638 Moab +#> 4 2372 SCSB_22 +#> 5 2574 Berkeley Park and Coventry, Kensington, CA, USA +#> 6 3088 Howe Neighborhood +#> 7 3277 Shop +#> 8 3497 Olive +#> 9 5538 Hood River Weather +#> 10 6408 Amberwood +#> # ℹ 558 more rows ``` Get historical data from a single PurpleAir sensor: @@ -161,16 +161,16 @@ my_history #> # A tibble: 432 × 5 #> time_stamp pm1.0_cf_1 pm1.0_atm pm2.5_atm pm2.5_cf_1 #> -#> 1 2024-07-04 21:10:00 2505. 1671. 1672. 2506. -#> 2 2024-07-04 23:30:00 2510. 1676. 1680. 2513. -#> 3 2024-07-04 20:40:00 31.9 25.3 27.9 34.6 -#> 4 2024-07-04 20:30:00 16.5 14.2 16.5 18.9 -#> 5 2024-07-04 23:50:00 2509. 1675. 1678. 2512. -#> 6 2024-07-04 21:50:00 2513. 1678. 1683. 2517. -#> 7 2024-07-04 20:50:00 386. 262. 265. 390. -#> 8 2024-07-04 22:00:00 2512. 1678. 1682. 2516. -#> 9 2024-07-04 22:40:00 2536. 1690. 1699. 2549. -#> 10 2024-07-04 21:00:00 914. 612. 614. 916. +#> 1 2024-07-03 23:40:00 2503. 1670. 1671. 2505. +#> 2 2024-07-04 06:50:00 2504. 1670. 1671. 2505. +#> 3 2024-07-03 22:10:00 2505. 1672. 1673. 2507. +#> 4 2024-07-04 07:10:00 2503. 1670. 1671. 2504. +#> 5 2024-07-04 09:40:00 2504. 1671. 1672. 2505. +#> 6 2024-07-04 11:30:00 2504. 1671. 1673. 2506. +#> 7 2024-07-04 03:40:00 2501. 1668. 1669. 2502. +#> 8 2024-07-03 22:20:00 2504. 1671. 1673. 2506. +#> 9 2024-07-04 03:00:00 2502. 1669. 1669. 2503. +#> 10 2024-07-04 18:50:00 8.32 8.32 10.1 10.1 #> # ℹ 422 more rows ``` diff --git a/cran-comments.md b/cran-comments.md index 06ce86c..5732a49 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,11 +1,8 @@ -## Resubmission -* Fixed spellings and single quote `PurpleAir` in Description - ## R CMD check results 0 errors | 0 warnings | 0 note -* This is a new release. +* This is a bug fix update. * R CMD checks passed with above results on: * R v4.4.1 (macos, windows, and ubuntu) * R v4.3.3 (ubuntu)