diff --git a/cran-comments.md b/cran-comments.md index 77e053e9..6cfdab94 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -11,30 +11,4 @@ ## Notes -- RE the NOTE, the DOI is reserved and will become active once released. -- Per request, fixed improper link in man/louisville.Rd -- Updated DESCRIPTION to attmept to fix WARNING in CRAN RE vignette rebuilding - -## New Features - -- Added support for reverse geocoding with the new `reverse_geo()` and `reverse_geocode()` functions. -- Added support for the [OpenCage](https://opencagedata.com/) geocoder service ([#67](https://github.com/jessecambon/tidygeocoder/issues/67)) (thanks [@dpprdan](https://github.com/dpprdan)). -- Added support for the [HERE](https://developer.here.com/products/geocoding-and-search) ([#74](https://github.com/jessecambon/tidygeocoder/issues/74)), [Mapbox](https://docs.mapbox.com/api/search/) ([#71](https://github.com/jessecambon/tidygeocoder/issues/71)), [MapQuest](https://developer.mapquest.com/documentation/geocoding-api/) ([#85](https://github.com/jessecambon/tidygeocoder/issues/85)), [TomTom](https://developer.tomtom.com/search-api/search-api-documentation/geocoding) ([#76](https://github.com/jessecambon/tidygeocoder/issues/76)), [Bing](https://docs.microsoft.com/en-us/bingmaps/rest-services/locations/) ([#92](https://github.com/jessecambon/tidygeocoder/issues/92)), and [ArcGIS](https://developers.arcgis.com/rest/geocode/api-reference/overview-world-geocoding-service.htm) ([#98](https://github.com/jessecambon/tidygeocoder/issues/98)) geocoder services (thanks [@dieghernan](https://github.com/dieghernan)). Note that currently the batch geocoding capabilities for the Mapbox and ArcGIS services are not currently implemented (see [#73](https://github.com/jessecambon/tidygeocoder/issues/73) and [#102](https://github.com/jessecambon/tidygeocoder/issues/102)). - - Added the ` mapbox_permanent`, `here_request_id`, and `mapquest_open` parameters to the `geo()` and `reverse_geo()` functions. -- The `limit` argument can now be used with the "google" and "census" methods to control the number of results returned. These two services do not have limit arguments in their APIs so the limit is applied after the results are returned. -- `batch_limit` is now automatically set according to the specified geocoder service unless otherwise specified. - -### Other Changes - -- Changed default `method` to `"osm"` (Nominatim) for the `geo()` function (it was previously `"census"`). -- The `geo_` functions are now deprecated. -- Added the `return_input` argument to `geocode()` and `reverse_geocode()` to provide more flexibility when using dataframes as inputs in geocoder queries. -- `limit = NULL` can now be passed to use the default `limit` value for the geocoder service. -- Added the `min_time_reference`, `batch_limit_reference`, `api_key_reference`, and `api_info_reference` datasets to more accessibly store values for `min_time`, `batch_limit`, the names of environmental variables for API keys, and information for documentation (such as API documentation links). -- `geocode()` and `reverse_geocode()` now require `limit = 1` (default) unless `return_input = FALSE`. This fixes a bug where geocoding results could be misaligned with the input dataset when `limit > 1`. ([#88](https://github.com/jessecambon/tidygeocoder/issues/88)). -- If the number of unique addresses or coordinates exceeds the batch query limit then an error is thrown by default. For forward geocoding, this behavior can be toggled with the new `batch_limit_query` argument in the `geo()` function and `batch_limit_query` is set to FALSE if using the "cascade" method. When `batch_limit_query` is FALSE then the batch query is limited to the batch limit and executed. In the past, all batch queries that exceeded the batch query limit would be limited to the batch limit and no error was thrown. -- The `address_list` argument of `query_api()` has been renamed to `input_list` to reflect that it is used for both forward and reverse queries when using the Geocodio service for batch geocoding. -- The `query_api()` function now returns a named list which contains the response content (`content`) and the HTTP status code (`status`). The `geo()` and `reverse_geo()` functions now use the HTTP status code directly to determine if a response is valid. -- Added [external tests](https://github.com/jessecambon/tidygeocoder/blob/main/external/online_tests.R) to more thoroughly test the package with live queries (internal package tests don't run queries). -- Added functions to generate package documentation from built-in datasets (ex. the methods documentation in `geo()` and `reverse_geo()`). -- Converted package documentation from standard roxygen syntax to Markdown. \ No newline at end of file +- RE the NOTE, the DOI is reserved and will become active once released. \ No newline at end of file diff --git a/docs/articles/developer_notes.html b/docs/articles/developer_notes.html index dbfcb3fa..ec3ee4e2 100644 --- a/docs/articles/developer_notes.html +++ b/docs/articles/developer_notes.html @@ -128,7 +128,7 @@

#> limit : "1" #> format : "json" #> HTTP Status Code: 200 -#> Query completed in: 0.5 seconds +#> Query completed in: 0.4 seconds #> Total query time (including sleep): 1 seconds #> #> Number of Unique Addresses: 1 diff --git a/docs/articles/tidygeocoder.html b/docs/articles/tidygeocoder.html index 594214b4..c0581649 100644 --- a/docs/articles/tidygeocoder.html +++ b/docs/articles/tidygeocoder.html @@ -137,7 +137,7 @@

#> format : "json" #> benchmark : "Public_AR_Current" #> vintage : "Current_Current" -#> Query completed in: 1.8 seconds +#> Query completed in: 1.4 seconds #> @@ -350,30 +350,33 @@

As mentioned earlier, the geocode() function passes addresses in dataframes to the geo() function for geocoding so we can also directly use the geo() function in a similar way:

+
-salz <- geo("Salzburg, Austria", method = "osm", full_results = TRUE)
+salz <- geo("Salzburg, Austria", method = "osm", full_results = TRUE) %>% + select(-licence) ---++++------++-+++ - @@ -388,8 +391,6 @@

- @@ -616,7 +617,7 @@

#> polygon_geojson : "1" #> format : "json" #> HTTP Status Code: 200 -#> Query completed in: 0.1 seconds +#> Query completed in: 0.2 seconds #> Total query time (including sleep): 1 seconds #> diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 0f08e643..7b2b7208 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -5,7 +5,7 @@ articles: developer_notes: developer_notes.html geocoder_services: geocoder_services.html tidygeocoder: tidygeocoder.html -last_built: 2021-04-19T03:16Z +last_built: 2021-04-19T17:09Z urls: reference: https://jessecambon.github.io/tidygeocoder/reference article: https://jessecambon.github.io/tidygeocoder/articles diff --git a/docs/reference/reverse_geo.html b/docs/reference/reverse_geo.html index 490dff0c..8599ec79 100644 --- a/docs/reference/reverse_geo.html +++ b/docs/reference/reverse_geo.html @@ -331,7 +331,7 @@

See a

Examples

# \donttest{ reverse_geo(lat = 38.895865, long = -77.0307713, method = 'osm', verbose = TRUE) -
#> Number of Unique Coordinates: 1
#> Querying API URL: https://nominatim.openstreetmap.org/reverse
#> Passing the following parameters to the API:
#> limit : "1"
#> lat : "38.895865"
#> lon : "-77.0307713"
#> format : "json"
#> HTTP Status Code: 200
#> Query completed in: 0.2 seconds
#> Total query time (including sleep): 1 seconds
#>
#> # A tibble: 1 x 3 +
#> Number of Unique Coordinates: 1
#> Querying API URL: https://nominatim.openstreetmap.org/reverse
#> Passing the following parameters to the API:
#> limit : "1"
#> lat : "38.895865"
#> lon : "-77.0307713"
#> format : "json"
#> HTTP Status Code: 200
#> Query completed in: 0.1 seconds
#> Total query time (including sleep): 1 seconds
#>
#> # A tibble: 1 x 3 #> lat long address #> <dbl> <dbl> <chr> #> 1 38.9 -77.0 Freedom Plaza, 1455, Pennsylvania Avenue Northwest, Penn Quarter,…
@@ -340,7 +340,7 @@

Examp long = c(-77.0307713, -79.3839347, 600), method = 'osm', full_results = TRUE, verbose = TRUE ) -

#> Number of Unique Coordinates: 2
#> Executing single coordinate geocoding...
#> Number of Unique Coordinates: 1
#> Querying API URL: https://nominatim.openstreetmap.org/reverse
#> Passing the following parameters to the API:
#> limit : "1"
#> lat : "38.895865"
#> lon : "-77.0307713"
#> format : "json"
#> HTTP Status Code: 200
#> Query completed in: 0.2 seconds
#> Total query time (including sleep): 1 seconds
#>
#> Number of Unique Coordinates: 1
#> Querying API URL: https://nominatim.openstreetmap.org/reverse
#> Passing the following parameters to the API:
#> limit : "1"
#> lat : "43.6534817"
#> lon : "-79.3839347"
#> format : "json"
#> HTTP Status Code: 200
#> Query completed in: 0.3 seconds
#> Total query time (including sleep): 1 seconds
#>
#> # A tibble: 3 x 22 +
#> Number of Unique Coordinates: 2
#> Executing single coordinate geocoding...
#> Number of Unique Coordinates: 1
#> Querying API URL: https://nominatim.openstreetmap.org/reverse
#> Passing the following parameters to the API:
#> limit : "1"
#> lat : "38.895865"
#> lon : "-77.0307713"
#> format : "json"
#> HTTP Status Code: 200
#> Query completed in: 0.2 seconds
#> Total query time (including sleep): 1 seconds
#>
#> Number of Unique Coordinates: 1
#> Querying API URL: https://nominatim.openstreetmap.org/reverse
#> Passing the following parameters to the API:
#> limit : "1"
#> lat : "43.6534817"
#> lon : "-79.3839347"
#> format : "json"
#> HTTP Status Code: 200
#> Query completed in: 0.2 seconds
#> Total query time (including sleep): 1 seconds
#>
#> # A tibble: 3 x 22 #> lat long address place_id licence osm_type osm_id osm_lat osm_lon tourism #> <dbl> <dbl> <chr> <int> <chr> <chr> <int> <chr> <chr> <chr> #> 1 38.9 -77.0 Freedo… 2.59e8 Data ©… relation 8.06e6 38.895… -77.03… Freedo… diff --git a/docs/reference/reverse_geocode.html b/docs/reference/reverse_geocode.html index 2df5392d..388095a3 100644 --- a/docs/reference/reverse_geocode.html +++ b/docs/reference/reverse_geocode.html @@ -259,7 +259,7 @@

Examp reverse_geocode(lat = latitude, long = longitude, method = 'osm', verbose = TRUE, limit = 2, return_input = FALSE) -

#> Number of Unique Coordinates: 2
#> Executing single coordinate geocoding...
#> Number of Unique Coordinates: 1
#> Querying API URL: https://nominatim.openstreetmap.org/reverse
#> Passing the following parameters to the API:
#> limit : "2"
#> lat : "38.25074"
#> lon : "-85.7976122"
#> format : "json"
#> HTTP Status Code: 200
#> Query completed in: 0.3 seconds
#> Total query time (including sleep): 1 seconds
#>
#> Number of Unique Coordinates: 1
#> Querying API URL: https://nominatim.openstreetmap.org/reverse
#> Passing the following parameters to the API:
#> limit : "2"
#> lat : "38.2615681"
#> lon : "-85.6210708"
#> format : "json"
#> HTTP Status Code: 200
#> Query completed in: 0.3 seconds
#> Total query time (including sleep): 1 seconds
#>
#> # A tibble: 2 x 3 +
#> Number of Unique Coordinates: 2
#> Executing single coordinate geocoding...
#> Number of Unique Coordinates: 1
#> Querying API URL: https://nominatim.openstreetmap.org/reverse
#> Passing the following parameters to the API:
#> limit : "2"
#> lat : "38.25074"
#> lon : "-85.7976122"
#> format : "json"
#> HTTP Status Code: 200
#> Query completed in: 0.2 seconds
#> Total query time (including sleep): 1 seconds
#>
#> Number of Unique Coordinates: 1
#> Querying API URL: https://nominatim.openstreetmap.org/reverse
#> Passing the following parameters to the API:
#> limit : "2"
#> lat : "38.2615681"
#> lon : "-85.6210708"
#> format : "json"
#> HTTP Status Code: 200
#> Query completed in: 0.2 seconds
#> Total query time (including sleep): 1 seconds
#>
#> # A tibble: 2 x 3 #> lat long address #> <dbl> <dbl> <chr> #> 1 38.3 -85.8 2722, Elliott Avenue, Louisville, Jefferson County, Kentucky, 402… diff --git a/vignettes/tidygeocoder.Rmd b/vignettes/tidygeocoder.Rmd index 01a28bb2..f99e7e7d 100644 --- a/vignettes/tidygeocoder.Rmd +++ b/vignettes/tidygeocoder.Rmd @@ -109,8 +109,13 @@ knitr::kable(census_full1) As mentioned earlier, the `geocode()` function passes addresses in dataframes to the `geo()` function for geocoding so we can also directly use the `geo()` function in a similar way: + ```{r} -salz <- geo("Salzburg, Austria", method = "osm", full_results = TRUE) +salz <- geo("Salzburg, Austria", method = "osm", full_results = TRUE) %>% + select(-licence) ``` ```{r, echo = FALSE}
address lat long place_idlicence osm_type osm_id boundingbox47.79813 13.04648 257918086Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright - relation 86538 47.7512115, 47.8543925, 12.9856478, 13.1272842