Skip to content

Commit

Permalink
Merge pull request #3 from slu-openGIS/cran-release
Browse files Browse the repository at this point in the history
Cran release
  • Loading branch information
Christopher Prener authored Aug 1, 2019
2 parents 04f8324 + 44fa0aa commit 883f442
Show file tree
Hide file tree
Showing 23 changed files with 163 additions and 101 deletions.
2 changes: 2 additions & 0 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This package was submitted to CRAN on 2019-07-22.
Once it is accepted, delete this file and tag the release (commit 2af548182c).
13 changes: 7 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: censusxy
Title: Access the U.S. Census Bureau Geocoder
Version: 0.1.0
Version: 0.1.1
Authors@R: c(
person("Christopher", "Prener", ,"[email protected]", c("aut", "cre"),
comment = c(ORCID = "0000-0002-4310-9888")),
Expand All @@ -9,11 +9,12 @@ Authors@R: c(
)
Description: Provides access to the U.S. Census Bureau's API for batch geocoding
American street addresses (<https://geocoding.geo.census.gov/geocoder>).
The package offers a vectorized solution for address geocoding. It was also
developed specifically with large data sets in mind - only unique addresses
are passed to the API for geocoding. If a data set exceeds 1,000 unique addresses,
it will be automatically subset into appropriately sized API calls, geocoded, and
then put back together so that a single object is returned.
The package offers a batch solution for address geocoding, as opposed to geocoding
a single address at a time. It has also been developed specifically with large
data sets in mind - only unique addresses are passed to the API for geocoding.
If a data set exceeds 1,000 unique addresses, it will be automatically subset
into appropriately sized API calls, geocoded, and then put back together so that
a single object is returned.
Depends: R (>= 3.3)
License: GPL-3
URL: https://github.com/slu-openGIS/censusxy
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# censusxy 0.1.1

* CRAN release version of the software.
* Corrected tense shifts in description paragraph in `DESCRIPTION`, `README.Rmd`, and `index.Rmd`
* Other minor updates to `pkgdown` site and `README.Rmd`

# censusxy 0.1.0

* Added a `NEWS.md` file to track changes to the package.
Expand Down
13 changes: 12 additions & 1 deletion R/cxy_geocode.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,21 @@
#' @importFrom rlang enquo quo_name
#' @importFrom sf st_as_sf
#'
#' @examples
#' # load sample data
#' data <- stl_homicides_small
#'
#' # geocode data
#' data <- cxy_geocode(data, address = "street_address", city = "city",
#' state = "state", zip = "postal_code")
#'
#' # preview data
#' data
#'
#' @export
cxy_geocode <- function(.data, address, city, state, zip, style = "minimal", output = "tibble", timeout = 30){

# global bindings
# global bindings
lon = lat = NULL

# check for missing parameters
Expand Down
12 changes: 9 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ knitr::opts_chunk$set(
[![DOI](https://zenodo.org/badge/165924122.svg)](https://zenodo.org/badge/latestdoi/165924122)
[![CRAN_status_badge](http://www.r-pkg.org/badges/version/censusxy)](https://cran.r-project.org/package=censusxy)

The `censusxy` package is designed to provide easy and efficient access to the [US Census Bureau Batch Geocoder](https://geocoding.geo.census.gov/geocoder/) in `R`. The package offers a vectorized solution for address geocoding (as opposed to packages like [`censusr`](https://CRAN.R-project.org/package=censusr), which provide functionality for a single address at a time). `censusxy` was also developed specifically with large data sets in mind - only unique addresses are passed to the API for geocoding. If a data set exceeds 1,000 unique addresses, it will be automatically subset into appropriately sized API calls, geocoded, and then put back together so that a single object is returned.
The `censusxy` package is designed to provide easy and efficient access to the [U.S. Census Bureau Batch Geocoder](https://geocoding.geo.census.gov/geocoder/) in `R`. The package offers a batch solution for address geocoding (as opposed to packages like [`censusr`](https://CRAN.R-project.org/package=censusr), which provide functionality for a single address at a time). `censusxy` has also been developed specifically with large data sets in mind - only unique addresses are passed to the API for geocoding. If a data set exceeds 1,000 unique addresses, it will be automatically subset into appropriately sized API calls, geocoded, and then put back together so that a single object is returned.

## Installation
### Installing Dependencies
You should check the [`sf` package website](https://r-spatial.github.io/sf/) and the [`censusxy` package website](https://slu-openGIS.github.io/censusxy/) for the latest details on installing dependencies for that package. Instructions vary significantly by operating system. For best results, have `sf` installed before you install `censusxy`. Other dependencies, like `dplyr`, will be installed automatically with `censusxy` if they are not already present.

### Installing censusxy
The package is soon to be on CRAN, but meanwhile, the development version of `censusxy` can be accessed from GitHub with `remotes`:
Once `sf` is installed, the easiest way to get `censusxy` is to install it from CRAN:

```r
install.packages("censusxy")
```

Alternatively, the development version of `censusxy` can be accessed from GitHub with `remotes`:

```r
# install.packages("remotes")
Expand Down Expand Up @@ -59,7 +65,7 @@ If you request an `sf` object, you easily preview the results with the [`mapview
```r
> mapview::mapview(homicide_sf)
```
```{r exampleMap1, echo=FALSE, out.width = '60%'}
```{r exampleMap1, echo=FALSE, out.width = '100%'}
knitr::include_graphics("man/figures/homicide_example.png")
```

Expand Down
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ status](https://codecov.io/gh/slu-openGIS/censusxy/branch/master/graph/badge.svg
[![CRAN\_status\_badge](http://www.r-pkg.org/badges/version/censusxy)](https://cran.r-project.org/package=censusxy)

The `censusxy` package is designed to provide easy and efficient access
to the [US Census Bureau Batch
to the [U.S. Census Bureau Batch
Geocoder](https://geocoding.geo.census.gov/geocoder/) in `R`. The
package offers a vectorized solution for address geocoding (as opposed
to packages like
[`censusr`](https://CRAN.R-project.org/package=censusr), which provide
functionality for a single address at a time). `censusxy` was also
developed specifically with large data sets in mind - only unique
addresses are passed to the API for geocoding. If a data set exceeds
1,000 unique addresses, it will be automatically subset into
package offers a batch solution for address geocoding (as opposed to
packages like [`censusr`](https://CRAN.R-project.org/package=censusr),
which provide functionality for a single address at a time). `censusxy`
has also been developed specifically with large data sets in mind - only
unique addresses are passed to the API for geocoding. If a data set
exceeds 1,000 unique addresses, it will be automatically subset into
appropriately sized API calls, geocoded, and then put back together so
that a single object is returned.

Expand All @@ -40,8 +39,15 @@ installed automatically with `censusxy` if they are not already present.

### Installing censusxy

The package is soon to be on CRAN, but meanwhile, the development
version of `censusxy` can be accessed from GitHub with `remotes`:
Once `sf` is installed, the easiest way to get `censusxy` is to install
it from CRAN:

``` r
install.packages("censusxy")
```

Alternatively, the development version of `censusxy` can be accessed
from GitHub with `remotes`:

``` r
# install.packages("remotes")
Expand Down Expand Up @@ -81,7 +87,7 @@ If you request an `sf` object, you easily preview the results with the
> mapview::mapview(homicide_sf)
```

<img src="man/figures/homicide_example.png" width="60%" />
<img src="man/figures/homicide_example.png" width="100%" />

## Contributor Code of Conduct

Expand Down
8 changes: 7 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## Release summary
This is the initial version of the `censusxy` package.
This is the initial version of the `censusxy` package. It was previously submitted (on July 5) and then rejected (on July 9):

> Please ensure that your functions do not write by default or in your examples/vignettes/tests in the user's home filespace (including the package directory and getwd()).
We have reviewed the package to be sure - `censusxy` only interacts with the file system in `cxy_geocoder.R`, where a `.csv` is written to the temp directory (lines 14-16), which is subsequently cleaned up (line 57). We thought that this would be permissable according to CRAN policy since we're only working with the temp directory here.

We are not at all opposed to making changes to ensure we comply with CRAN policy - but are unsure what to change in this instance. Uwe kindly suggested that we could resubmit the package as is and that he would be willing to take a look at the function. Thanks, Uwe, for your offer and help!

## Test environments
* local OS X install: R 3.6.0
Expand Down
2 changes: 1 addition & 1 deletion docs/CODE_OF_CONDUCT.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/PULL_REQUEST_TEMPLATE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 883f442

Please sign in to comment.