diff --git a/NEWS.md b/NEWS.md index e16b9721..cc5c05bf 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,8 +1,8 @@ # tidygeocoder (development version) - Corrected documentation for `quiet` parameter in `geo()` and `reverse_geo()` -- Reconfigured the vignette so that it is precomputed and is not executed during -`R CMD check` (ie. `devtools::check()`). Also added a check at the beginning of the vignette to check for the availability of APIs. This fixes an issue that occurred on Mac CRAN checks ([#152](https://github.com/jessecambon/tidygeocoder/issues/152)). +- To fix an issue that occurred on Mac CRAN checks ([#152](https://github.com/jessecambon/tidygeocoder/issues/152)) the vignette is now precomputed so that it does not run during `R CMD check` (ie. `devtools::check()`). +- Changed some default parameter values to facilitate the use of the [memoise package](https://memoise.r-lib.org/) ([@dpprdan](https://github.com/dpprdan), [#154](https://github.com/jessecambon/tidygeocoder/pull/154)). # tidygeocoder 1.0.4 diff --git a/README.Rmd b/README.Rmd index 88a19f06..fce0a0a6 100644 --- a/README.Rmd +++ b/README.Rmd @@ -26,7 +26,7 @@ options(tibble.print_min = 5, tibble.print_max = 5) [![CRAN Downloads Per Month](http://cranlogs.r-pkg.org/badges/tidygeocoder)](https://cran.r-project.org/package=tidygeocoder) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![R Build Status](https://github.com/jessecambon/tidygeocoder/workflows/R-CMD-check/badge.svg)](https://github.com/jessecambon/tidygeocoder/actions?workflow=R-CMD-check) -[![Zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.5574263.svg)](https://doi.org/10.5281/zenodo.5574263) +[![Zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.5627341.svg)](https://doi.org/10.5281/zenodo.5627341) Tidygeocoder makes getting data from geocoding services easy. A unified high-level interface is provided for a selection of [supported geocoding services](https://jessecambon.github.io/tidygeocoder/articles/geocoder_services.html) and results are returned in [tibble](https://tibble.tidyverse.org/) (dataframe) format. @@ -45,13 +45,13 @@ In addition to the usage examples below, see the [Getting Started Vignette](http To install the stable version from CRAN (the official R package servers): -```{r, eval=F} +```{r, eval = FALSE} install.packages('tidygeocoder') ``` Alternatively, you can install the latest development version from GitHub: -```{r, eval=F} +```{r, eval = FALSE} devtools::install_github("jessecambon/tidygeocoder") ``` @@ -61,11 +61,10 @@ In this first example we will geocode a few addresses using the `geocode()` func ```{r} library(dplyr, warn.conflicts = FALSE) -library(tibble) library(tidygeocoder) # create a dataframe with addresses -some_addresses <- tribble( +some_addresses <- tibble::tribble( ~name, ~addr, "White House", "1600 Pennsylvania Ave NW, Washington, DC", "Transamerica Pyramid", "600 Montgomery St, San Francisco, CA 94111", @@ -87,16 +86,16 @@ Now that we have the longitude and latitude coordinates, we can use ggplot to pl ```{r usamap} library(ggplot2) -library(maps) -library(ggrepel) ggplot(lat_longs, aes(longitude, latitude), color = "grey99") + borders("state") + geom_point() + - geom_label_repel(aes(label = name)) + + ggrepel::geom_label_repel(aes(label = name)) + theme_void() ``` -To perform reverse geocoding (obtaining addresses from geographic coordinates), we can use the `reverse_geocode()` function. The arguments are similar to the `geocode()` function, but now we specify the input data columns with the `lat` and `long` arguments. The dataset used here is from the geocoder query above. The single line address is returned in a column named by the `address` argument and all columns from the geocoding service are returned because `full_results = TRUE`. See the `reverse_geo()` function documentation for more details. +To perform reverse geocoding (obtaining addresses from geographic coordinates), we can use the `reverse_geocode()` function. The arguments are similar to the `geocode()` function, but now we specify the input data columns with the `lat` and `long` arguments. The input dataset used here is from the geocoder query above. + +The single line address is returned in a column named by the `address` argument and all columns from the geocoding service results are returned because `full_results = TRUE`. See the `reverse_geo()` function documentation for more details. Tidygeocoder makes getting data from geocoding services easy. A unified @@ -66,11 +66,10 @@ In this first example we will geocode a few addresses using the ``` r library(dplyr, warn.conflicts = FALSE) -library(tibble) library(tidygeocoder) # create a dataframe with addresses -some_addresses <- tribble( +some_addresses <- tibble::tribble( ~name, ~addr, "White House", "1600 Pennsylvania Ave NW, Washington, DC", "Transamerica Pyramid", "600 Montgomery St, San Francisco, CA 94111", @@ -81,7 +80,7 @@ some_addresses <- tribble( lat_longs <- some_addresses %>% geocode(addr, method = 'osm', lat = latitude , long = longitude) #> Passing 3 addresses to the Nominatim single address geocoder -#> Query completed in: 3.6 seconds +#> Query completed in: 3 seconds ``` The `geocode()` function geocodes addresses contained in a dataframe. @@ -103,12 +102,10 @@ ggplot to plot our addresses on a map. ``` r library(ggplot2) -library(maps) -library(ggrepel) ggplot(lat_longs, aes(longitude, latitude), color = "grey99") + borders("state") + geom_point() + - geom_label_repel(aes(label = name)) + + ggrepel::geom_label_repel(aes(label = name)) + theme_void() ``` @@ -117,11 +114,13 @@ ggplot(lat_longs, aes(longitude, latitude), color = "grey99") + To perform reverse geocoding (obtaining addresses from geographic coordinates), we can use the `reverse_geocode()` function. The arguments are similar to the `geocode()` function, but now we specify the input -data columns with the `lat` and `long` arguments. The dataset used here -is from the geocoder query above. The single line address is returned in -a column named by the `address` argument and all columns from the -geocoding service are returned because `full_results = TRUE`. See the -`reverse_geo()` function documentation for more details. +data columns with the `lat` and `long` arguments. The input dataset used +here is from the geocoder query above. + +The single line address is returned in a column named by the `address` +argument and all columns from the geocoding service results are returned +because `full_results = TRUE`. See the `reverse_geo()` function +documentation for more details.