https://github.com/chris-prener/censusxy
R package for calling the U.S. Census Bureau's Geocoder API
Science Score: 46.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 1 DOI reference(s) in README -
✓Academic publication links
Links to: wiley.com, zenodo.org -
✓Committers with academic emails
2 of 13 committers (15.4%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (22.9%) to scientific vocabulary
Last synced: 7 months ago
·
JSON representation
Repository
R package for calling the U.S. Census Bureau's Geocoder API
Basic Info
- Host: GitHub
- Owner: chris-prener
- License: gpl-3.0
- Language: R
- Default Branch: main
- Homepage: https://chris-prener.github.io/censusxy/
- Size: 1.11 MB
Statistics
- Stars: 21
- Watchers: 2
- Forks: 9
- Open Issues: 1
- Releases: 3
Created about 7 years ago
· Last pushed about 1 year ago
Metadata Files
Readme
Changelog
Contributing
License
Code of conduct
README.Rmd
---
output: github_document
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# censusxy
[](https://github.com/chris-prener/censusxy/actions)
[](https://codecov.io/github/chris-prener/censusxy?branch=main)
[](https://zenodo.org/badge/latestdoi/165924122)
The `censusxy` package is designed to provide easy access to the [U.S. Census Bureau Geocoding Tools](https://geocoding.geo.census.gov/geocoder/) in `R`. `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. There is also support for parallel processing of requests, which can significantly shorten the time it takes to batch geocode large numbers of addresses.
`censusxy` is described in a 2021 paper in [*Transactions in GIS*](https://onlinelibrary.wiley.com/doi/abs/10.1111/tgis.12741) by Chris and Branson - please cite the paper if you use `censusxy` in your work!
## Current Development Status
While the current, core functionality still works, changes in the Census API caused consistent issues with our unit tests, prompting us to remove the package from CRAN. As of early 2025, there is no active development planned for `censusxy`.
## Installation
### Installing censusxy
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")
remotes::install_github("chris-prener/censusxy")
```
### Installing Suggested Dependencies
Since the package does not need `sf` for its basic functionality, it is a suggested dependency rather than a required one. However, many users will want to map these data as `sf` objects, and we therefore recommend users install `sf`. Windows and macOS users should be able to install `sf` without significant issues unless they are building from source. Linux users will need to install several open source spatial libraries to get `sf` itself up and running.
If you want to use these `sf`, you can either install it individually (faster) or install all of the suggested dependencies at once (slower, will also give you a number of other packages you may or may not want):
```r
## install sf only
install.packages("sf")
## install all suggested dependencies
install.packages("censusxy", dependencies = TRUE)
```
## Usage
The `censusxy` package contains two data sets, `stl_homicides` (*n* = 1,812) and `stl_homicides_small` (*n* = 24), that can be used to demonstrate the functionality of the package. The `stl_homicides_small` data is included specifically for quick experimentation, as its small sample size ensures an expedient response from the API.
To test `censusxy`'s functionality, load the package and either of the sample data sets:
```r
library(censusxy)
data <- stl_homicides
```
There are two possible variable configurations (`simple` and `full`, specified using the `output` argument), and two possible output class types (`dataframe` and `sf`, specified using the `class` argument):
```r
homicide_sf <- cxy_geocode(data, street = "street_address", city = "city", state = "state",
output = "simple", class = "sf")
```
If you request an `sf` object, you easily preview the results with the [`mapview` package](https://CRAN.R-project.org/package=mapview):
```r
> mapview::mapview(homicide_sf)
```
```{r exampleMap1, echo=FALSE, out.width = '100%'}
knitr::include_graphics("man/figures/homicide_example.png")
```
## Contributor Code of Conduct
Please note that this project is released with a [Contributor Code of Conduct](https://chris-prener.github.io/censusxy/CODE_OF_CONDUCT.html). By participating in this project you agree to abide by its terms.
Owner
- Name: Chris Prener
- Login: chris-prener
- Kind: user
- Location: St. Louis, MO
- Company: Pfizer
- Website: https://chris-prener.github.io
- Twitter: chrisprener
- Repositories: 6
- Profile: https://github.com/chris-prener
Director, Vaccines RWE Biocurator Scientist 🚀 and Sociologist interested in vaccines, health outcomes and disparities, geospatial data science, and demography
GitHub Events
Total
- Issues event: 1
- Watch event: 1
- Issue comment event: 2
- Push event: 6
Last Year
- Issues event: 1
- Watch event: 1
- Issue comment event: 2
- Push event: 6
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Christopher Prener | c****r@s****u | 124 |
| Branson Fox | 3****f | 87 |
| Chris Prener | c****r@g****l | 7 |
| Christopher Kenny | c****4@c****u | 5 |
| chris | c****s@C****l | 2 |
| Chris Prener | c****s@C****l | 2 |
| censusxy GHA | r****r@M****l | 1 |
| censusxy GHA | r****r@M****l | 1 |
| censusxy GHA | r****r@M****l | 1 |
| censusxy GHA | r****r@M****l | 1 |
| censusxy GHA | r****r@M****l | 1 |
| censusxy GHA | r****r@M****l | 1 |
| censusxy GHA | r****r@M****l | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 25
- Total pull requests: 23
- Average time to close issues: 6 months
- Average time to close pull requests: 2 days
- Total issue authors: 14
- Total pull request authors: 3
- Average comments per issue: 3.56
- Average comments per pull request: 0.65
- Merged pull requests: 18
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- chris-prener (9)
- bransonf (3)
- lepromatous (2)
- donojazz (1)
- FCALVODBAMAF (1)
- samika27 (1)
- sxthimons (1)
- plnnr (1)
- Chris-Larkin (1)
- bernardlf (1)
- overmar (1)
- mrrawhaley (1)
- dvmasterov (1)
- zmoore152 (1)
Pull Request Authors
- bransonf (14)
- chris-prener (8)
- christopherkenny (1)
Top Labels
Issue Labels
waiting (1)
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 679 last-month
- Total dependent packages: 1
- Total dependent repositories: 2
- Total versions: 5
- Total maintainers: 1
cran.r-project.org: censusxy
Access the U.S. Census Bureau's Geocoding API System
- Homepage: https://chris-prener.github.io/censusxy/
- Documentation: http://cran.r-project.org/web/packages/censusxy/censusxy.pdf
- License: GPL-3
- Status: removed
-
Latest release: 1.1.1
published over 3 years ago
Rankings
Forks count: 7.6%
Stargazers count: 13.2%
Average: 15.8%
Dependent packages count: 18.4%
Downloads: 19.4%
Dependent repos count: 20.2%
Maintainers (1)
Last synced:
12 months ago
Dependencies
DESCRIPTION
cran
- R >= 3.4 depends
- doParallel * imports
- foreach * imports
- httr * imports
- parallel * imports
- utils * imports
- covr * suggests
- knitr * suggests
- rmarkdown * suggests
- sf * suggests
- testthat * suggests
.github/workflows/R-CMD-check.yaml
actions
- actions/cache v1 composite
- actions/checkout v2 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-pandoc v2-branch composite
- r-lib/actions/setup-r v2-branch composite
.github/workflows/pkgdown.yml
actions
- JamesIves/github-pages-deploy-action 4.1.4 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite