Skip to content

Who are You? Bayesian Prediction of Racial Category Using Surname, First Name, Middle Name, and Geolocation

0packages dependsuggested by 1
7.6Kdownloads / year
46.6%test coverage
13/13flavors OK

Overview

About

Predicts individual race/ethnicity using surname, first name, middle name, geolocation, and other attributes, such as gender and age. The method utilizes Bayes' Rule (with optional measurement error correction) to compute the posterior probability of each racial category for any given individual. The package implements methods described in Imai and Khanna (2016) "Improving Ecological Inference by Predicting Individual Ethnicity from Voter Registration Records" Political Analysis DOI:10.1093/pan/mpw001 and Imai, Olivella, and Rosenman (2022) "Addressing census data problems in race imputation via fully Bayesian Improved Surname Geocoding and name supplements" DOI:10.1126/sciadv.adc9824. The package also incorporates the data described in Rosenman, Olivella, and Imai (2023) "Race and ethnicity data for first, middle, and surnames" DOI:10.1038/s41597-023-02202-2.

Install

Health

CRAN checks
13OK
Slowest check: 4.6 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-10-14
  • ERROR12 OK, 1 ERROR2026-10-12
  • OK13 OK2026-09-23
  • ERROR12 OK, 1 ERROR2026-09-19
  • OK13 OK2026-08-04
Show 10 earlier changesHide 10 earlier changes
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • WARNING12 OK, 1 WARNING2026-06-07
  • OK13 OK2026-05-08
  • NOTE11 OK, 2 NOTE2026-04-29
  • ERROR10 OK, 2 NOTE, 1 ERROR2026-04-28
  • NOTE9 OK, 5 NOTE2026-04-22
  • ERROR8 OK, 5 NOTE, 1 ERROR2026-04-18
  • NOTE9 OK, 5 NOTE2026-03-10
Advisories

none known

Documentation

In release 3.1.0
READMEYes · 1,780 wordsVignettesNoNEWSNoCitation fileNoWebsitenot declared in DESCRIPTION
Help pages
32 (22 internal)
Examples that run
40%6 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran) · 8 never run
Exported functions with examples
80%
Documented parameters
100%
Return-value docs
60%
Help pages citing references
13%

Downloads

7.6K
CRAN downloads in the past year
Rank #5,052 · ~21/day · ~630/mo
Daily download trend is not available in this view yet.
59630 days
1.7K90 days
7.6K1 year
Compare downloads with other packages →
Also on429 r2u3 autocran

Repository

142Stars
33Forks
1Open issues
1Open PRs
24Releases
561Commits
21Commit identities
561 commits · Last activity 2026-10-06 · +0.7% stars, 30d · Default branch at 4.0.0, ahead of CRAN 3.1.0 (checked 2026-10-25)
Responsiveness
How these are sampled
PRs merged (all time)
76%
Median days to close, 50 most recently updated closed issues
17
Median days to close, 50 most recently updated closed PRs
2

Stars over time

2025-09-11 · 1342026-09-28 · 142
PracticesBeta

6 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/kosukeimai/wru on 2026-10-25.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (1)
README.Rmd
Reproducibility and dev environment (1)
data-raw/
CRAN release process (1)
cran-comments.md
Show all practicesHide 1 practice
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
16 external dependencies (excludes base and recommended)

Installing wru adds 65 packages (38 with compiled code, 45 MB of source tarballs). Heaviest: stringi 11 MB, sf 9.3 MB, s2 2.8 MB.

Depends (2)
R >= 4.1.0utils
LinkingTo (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

Datasets

People & History

People (7)
Author, Maintainer since 1.0.0 (2022) · added in 1.0.0
Author · added in 3.1.0
Author · added in 1.0.0
Author · added in 1.0.0
Author · added in 3.0.2

Previously maintained by Kabir Khanna (0.0-1 to 0.1-12).

Listed in earlier versions (2)
no longer listed · 0.1-2 to 0.1-7
no longer listed · 3.0.0 to 3.0.1
Releases (21)

Pick two releases to compare their code metrics.

  • 3.1.0Latest
    record
    2026-05-07 · current release · diff ↗ ·
    added 1 export
    setup_ebisg
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 3.0.3
    record
    2024-05-24 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 3.0.2
    record
    2024-04-04 · diff ↗
  • 3.0.1
    record
    2024-02-28 · diff ↗
  • 3.0.0
    record
    2024-02-16 · diff ↗ ·
    added 2 exports
    as_fips_code, as_state_abbreviation
  • R
    R 4.3.0 released · 2023-04-21
  • 1.0.1
    record
    2022-10-21 · diff ↗
  • 1.0.0
    record
    2022-06-21 · diff ↗ ·
    removed 6 exports
    census_geo_api, census_helper, get_census_api, get_census_api_2, merge_surnames, vec_to_chunk
    added 1 export
    format_legacy_data
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 0.1-12
    record
    2021-05-17 · diff ↗
  • 0.1-11
    record
    2021-04-22 · diff ↗
  • 0.1-10
    record
    2020-10-22 · diff ↗
Show 17 earlier eventsHide 17 earlier events
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • 0.1-9
    record
    2019-02-21 · diff ↗
  • 0.1-8
    record
    2019-02-13 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 0.1-7
    record
    2017-09-01 · diff ↗
  • 0.1-6
    record
    2017-08-17 · diff ↗
  • 0.1-5
    record
    2017-06-09 · diff ↗
  • 0.1-4
    record
    2017-05-05 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
  • 0.1-3
    record
    2017-04-14 · diff ↗
  • 0.1-2
    record
    2017-03-05 · diff ↗ ·
    removed 10 exports
    census.helper.api, census.helper.api.local, census.helper.api.online, censusData, getCensusApi, getCensusApi2, getCensusData, name.clean, race.pred, vecToChunk
    added 8 exports
    census_geo_api, census_helper, get_census_api, get_census_api_2, get_census_data, merge_surnames, predict_race, vec_to_chunk
  • 0.1-1
    record
    2016-12-13 · diff ↗ ·
    added 4 exports
    census.helper.api.local, census.helper.api.online, censusData, getCensusData
  • R
    R 3.3.0 released · 2016-05-03
  • 0.0-2
    record
    2016-03-11 · diff ↗
  • 0.0-1
    record
    2015-12-09
  • R
    R 3.2.0 released · 2015-04-16

Package metadata

First published
2015-12-09
Total releases
21 / 11 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 4.1.0
Bundled data
3.4 MB / 4 files
Download size
4.4 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("wru")
Bertelsen, B., Dasanaike, N., Imai, K., Khanna, K., Olivella, S., Rosenman, E., & Rossell Hayes, A. (2026). wru: Who are You? Bayesian Prediction of Racial Category Using Surname, First Name, Middle Name, and Geolocation (Version 3.1.0) [Computer software]. https://doi.org/10.32614/CRAN.package.wru

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for wru version 3.1.0 [Data set]. HJJB, LLC. Data release v2026-10-26. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy