Skip to content

Commit 9906c98

Browse files
committed
Added note on memoise and other edits to prep for v1.0.5 release
1 parent feb86d4 commit 9906c98

35 files changed

+288
-246
lines changed

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# tidygeocoder (development version)
22

33
- Corrected documentation for `quiet` parameter in `geo()` and `reverse_geo()`
4-
- Reconfigured the vignette so that it is precomputed and is not executed during
5-
`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)).
4+
- 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()`).
5+
- 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)).
66

77
# tidygeocoder 1.0.4
88

README.Rmd

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ options(tibble.print_min = 5, tibble.print_max = 5)
2626
[![CRAN Downloads Per Month](http://cranlogs.r-pkg.org/badges/tidygeocoder)](https://cran.r-project.org/package=tidygeocoder)
2727
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
2828
[![R Build Status](https://github.com/jessecambon/tidygeocoder/workflows/R-CMD-check/badge.svg)](https://github.com/jessecambon/tidygeocoder/actions?workflow=R-CMD-check)
29-
[![Zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.5574263.svg)](https://doi.org/10.5281/zenodo.5574263)
29+
[![Zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.5627341.svg)](https://doi.org/10.5281/zenodo.5627341)
3030
<!-- badges: end -->
3131

3232
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
4545

4646
To install the stable version from CRAN (the official R package servers):
4747

48-
```{r, eval=F}
48+
```{r, eval = FALSE}
4949
install.packages('tidygeocoder')
5050
```
5151

5252
Alternatively, you can install the latest development version from GitHub:
5353

54-
```{r, eval=F}
54+
```{r, eval = FALSE}
5555
devtools::install_github("jessecambon/tidygeocoder")
5656
```
5757

@@ -61,11 +61,10 @@ In this first example we will geocode a few addresses using the `geocode()` func
6161

6262
```{r}
6363
library(dplyr, warn.conflicts = FALSE)
64-
library(tibble)
6564
library(tidygeocoder)
6665
6766
# create a dataframe with addresses
68-
some_addresses <- tribble(
67+
some_addresses <- tibble::tribble(
6968
~name, ~addr,
7069
"White House", "1600 Pennsylvania Ave NW, Washington, DC",
7170
"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
8786

8887
```{r usamap}
8988
library(ggplot2)
90-
library(maps)
91-
library(ggrepel)
9289
9390
ggplot(lat_longs, aes(longitude, latitude), color = "grey99") +
9491
borders("state") + geom_point() +
95-
geom_label_repel(aes(label = name)) +
92+
ggrepel::geom_label_repel(aes(label = name)) +
9693
theme_void()
9794
```
9895

99-
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.
96+
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.
97+
98+
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.
10099

101100
<!--
102101
Removing the licence column is done just to prevent a note from
@@ -117,11 +116,12 @@ knitr::kable(reverse)
117116

118117
For inspiration, here are a few articles (with code) that leverage tidygeocoder:
119118

120-
- [Exercises: Spatial Data Wrangling with sf](http://www2.stat.duke.edu/courses/Spring21/sta323.001/exercises/lec_12.html) - part of a [statistical computing course](http://www2.stat.duke.edu/courses/Spring21/sta323.001/) at Duke.
121-
- [Geocoding the Minard Map](https://www.jla-data.net/eng/minard-map-tidygeocoder/) - recreating a famous infographic with geocoding.
122-
- [Mapping a network of women in demography](https://www.monicaalexander.com/posts/2021-21-02-mapping/) - using rvest and tidygeocoder to map Google Scholar data.
123-
- [Road Routing in R](https://www.jla-data.net/eng/routing-in-r-context/) - demonstration of three different routing APIs.
124-
- [Mapping Texas Ports With R](https://www.sharpsightlabs.com/blog/mapping-texas-ports-with-r-part1/) - mapping the Texas coast with rnaturalearth and sf.
119+
- [Exercises: Spatial Data Wrangling with sf](http://www2.stat.duke.edu/courses/Spring21/sta323.001/exercises/lec_12.html) - part of a [statistical computing course](http://www2.stat.duke.edu/courses/Spring21/sta323.001/) at Duke
120+
- [Geocoding the Minard Map](https://www.jla-data.net/eng/minard-map-tidygeocoder/) - recreating a famous infographic with geocoding
121+
- [Mapping a network of women in demography](https://www.monicaalexander.com/posts/2021-21-02-mapping/) - using rvest and tidygeocoder to map Google Scholar data
122+
- [Mapping Routes](https://bensstats.wordpress.com/2021/10/21/robservations-15-i-reverse-engineered-atlas-co-well-some-of-it/) - mapping routes with tidygeocoder and osrm
123+
- [Road Routing in R](https://www.jla-data.net/eng/routing-in-r-context/) - demonstration of three different routing APIs
124+
- [Mapping Texas Ports With R](https://www.sharpsightlabs.com/blog/mapping-texas-ports-with-r-part1/) - mapping the Texas coast with rnaturalearth and sf
125125

126126
## Contributing
127127

README.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Month](http://cranlogs.r-pkg.org/badges/tidygeocoder)](https://cran.r-project.or
1717
stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
1818
[![R Build
1919
Status](https://github.com/jessecambon/tidygeocoder/workflows/R-CMD-check/badge.svg)](https://github.com/jessecambon/tidygeocoder/actions?workflow=R-CMD-check)
20-
[![Zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.5574263.svg)](https://doi.org/10.5281/zenodo.5574263)
20+
[![Zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.5627341.svg)](https://doi.org/10.5281/zenodo.5627341)
2121
<!-- badges: end -->
2222

2323
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
6666

6767
``` r
6868
library(dplyr, warn.conflicts = FALSE)
69-
library(tibble)
7069
library(tidygeocoder)
7170

7271
# create a dataframe with addresses
73-
some_addresses <- tribble(
72+
some_addresses <- tibble::tribble(
7473
~name, ~addr,
7574
"White House", "1600 Pennsylvania Ave NW, Washington, DC",
7675
"Transamerica Pyramid", "600 Montgomery St, San Francisco, CA 94111",
@@ -81,7 +80,7 @@ some_addresses <- tribble(
8180
lat_longs <- some_addresses %>%
8281
geocode(addr, method = 'osm', lat = latitude , long = longitude)
8382
#> Passing 3 addresses to the Nominatim single address geocoder
84-
#> Query completed in: 3.6 seconds
83+
#> Query completed in: 3 seconds
8584
```
8685

8786
The `geocode()` function geocodes addresses contained in a dataframe.
@@ -103,12 +102,10 @@ ggplot to plot our addresses on a map.
103102

104103
``` r
105104
library(ggplot2)
106-
library(maps)
107-
library(ggrepel)
108105

109106
ggplot(lat_longs, aes(longitude, latitude), color = "grey99") +
110107
borders("state") + geom_point() +
111-
geom_label_repel(aes(label = name)) +
108+
ggrepel::geom_label_repel(aes(label = name)) +
112109
theme_void()
113110
```
114111

@@ -117,11 +114,13 @@ ggplot(lat_longs, aes(longitude, latitude), color = "grey99") +
117114
To perform reverse geocoding (obtaining addresses from geographic
118115
coordinates), we can use the `reverse_geocode()` function. The arguments
119116
are similar to the `geocode()` function, but now we specify the input
120-
data columns with the `lat` and `long` arguments. The dataset used here
121-
is from the geocoder query above. The single line address is returned in
122-
a column named by the `address` argument and all columns from the
123-
geocoding service are returned because `full_results = TRUE`. See the
124-
`reverse_geo()` function documentation for more details.
117+
data columns with the `lat` and `long` arguments. The input dataset used
118+
here is from the geocoder query above.
119+
120+
The single line address is returned in a column named by the `address`
121+
argument and all columns from the geocoding service results are returned
122+
because `full_results = TRUE`. See the `reverse_geo()` function
123+
documentation for more details.
125124

126125
<!--
127126
Removing the licence column is done just to prevent a note from
@@ -139,9 +138,9 @@ reverse <- lat_longs %>%
139138

140139
| name | latitude | longitude | address\_found | place\_id | osm\_type | osm\_id | osm\_lat | osm\_lon | office | house\_number | road | city | state | postcode | country | country\_code | boundingbox | tourism | neighbourhood | county | suburb |
141140
|:---------------------|---------:|-----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------|----------:|:----------|----------:|:-------------------|:--------------------|:------------|:--------------|:------------------------------|:--------------|:---------------------|:---------|:--------------|:--------------|:-----------------------------------------------------|:---------------------|:--------------|:--------------|:-------|
142-
| White House | 38.89770 | -77.03655 | White House, 1600, Pennsylvania Avenue Northwest, Washington, District of Columbia, 20500, United States | 159859857 | way | 238241022 | 38.897699700000004 | -77.03655315 | White House | 1600 | Pennsylvania Avenue Northwest | Washington | District of Columbia | 20500 | United States | us | 38.8974908 , 38.897911 , -77.0368537, -77.0362519 | NA | NA | NA | NA |
143-
| Transamerica Pyramid | 37.79520 | -122.40279 | Transamerica Pyramid, 600, Montgomery Street, Chinatown, San Francisco, San Francisco City and County, San Francisco, California, 94111, United States | 106590650 | way | 24222973 | 37.795200550000004 | -122.40279267840137 | NA | 600 | Montgomery Street | San Francisco | California | 94111 | United States | us | 37.7948854 , 37.7954472 , -122.4031399, -122.4024317 | Transamerica Pyramid | Chinatown | San Francisco | NA |
144-
| Willis Tower | 41.87535 | -87.63576 | South Wacker Drive, Printer’s Row, Loop, Chicago, Cook County, Illinois, 60606, United States | 182316972 | way | 337681342 | 41.8753503 | -87.6357587 | NA | NA | South Wacker Drive | Chicago | Illinois | 60606 | United States | us | 41.8749718 , 41.8757997 , -87.6361005, -87.6354602 | NA | Printer’s Row | Cook County | Loop |
141+
| White House | 38.89770 | -77.03655 | White House, 1600, Pennsylvania Avenue Northwest, Washington, District of Columbia, 20500, United States | 159983331 | way | 238241022 | 38.897699700000004 | -77.03655315 | White House | 1600 | Pennsylvania Avenue Northwest | Washington | District of Columbia | 20500 | United States | us | 38.8974908 , 38.897911 , -77.0368537, -77.0362519 | NA | NA | NA | NA |
142+
| Transamerica Pyramid | 37.79520 | -122.40279 | Transamerica Pyramid, 600, Montgomery Street, Chinatown, San Francisco, San Francisco City and County, San Francisco, California, 94111, United States | 106008002 | way | 24222973 | 37.795200550000004 | -122.40279267840137 | NA | 600 | Montgomery Street | San Francisco | California | 94111 | United States | us | 37.7948854 , 37.7954472 , -122.4031399, -122.4024317 | Transamerica Pyramid | Chinatown | San Francisco | NA |
143+
| Willis Tower | 41.87535 | -87.63576 | South Wacker Drive, Printer’s Row, Loop, Chicago, Cook County, Illinois, 60606, United States | 182238096 | way | 337681342 | 41.8753503 | -87.6357587 | NA | NA | South Wacker Drive | Chicago | Illinois | 60606 | United States | us | 41.8749718 , 41.8757997 , -87.6361005, -87.6354602 | NA | Printer’s Row | Cook County | Loop |
145144

146145
## In the Wild
147146

@@ -152,19 +151,22 @@ tidygeocoder:
152151
sf](http://www2.stat.duke.edu/courses/Spring21/sta323.001/exercises/lec_12.html) -
153152
part of a [statistical computing
154153
course](http://www2.stat.duke.edu/courses/Spring21/sta323.001/) at
155-
Duke.
154+
Duke
156155
- [Geocoding the Minard
157156
Map](https://www.jla-data.net/eng/minard-map-tidygeocoder/) -
158-
recreating a famous infographic with geocoding.
157+
recreating a famous infographic with geocoding
159158
- [Mapping a network of women in
160159
demography](https://www.monicaalexander.com/posts/2021-21-02-mapping/) -
161-
using rvest and tidygeocoder to map Google Scholar data.
160+
using rvest and tidygeocoder to map Google Scholar data
161+
- [Mapping
162+
Routes](https://bensstats.wordpress.com/2021/10/21/robservations-15-i-reverse-engineered-atlas-co-well-some-of-it/) -
163+
mapping routes with tidygeocoder and osrm
162164
- [Road Routing in
163165
R](https://www.jla-data.net/eng/routing-in-r-context/) -
164-
demonstration of three different routing APIs.
166+
demonstration of three different routing APIs
165167
- [Mapping Texas Ports With
166168
R](https://www.sharpsightlabs.com/blog/mapping-texas-ports-with-r-part1/) -
167-
mapping the Texas coast with rnaturalearth and sf.
169+
mapping the Texas coast with rnaturalearth and sf
168170

169171
## Contributing
170172

docs/404.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)