The goal of postmastr
is to provide consistent, tidy parsing of street address data. The package is currently oriented towards American street addresses, e.g. “123 East Main Street”. It contains functions for both standardizing address elements (e.g. converting street names like “Second” to “2nd” or converting “AV” to “Ave”) and for parsing out intput strings into separate variables for each input element.
We’ve at a point where all major functionality except for the ability to work with unit types and numbers is ready for testing. If you work with American street addresses regularly and have the time to take the package for a spin, we’d love feedback before we submit to CRAN. We want to make sure the workflow works, and can handle whatever addresses we throw at it. Also, postmastr
is only set-up for American street addresses right now but the functions have been built for expansion. If you work with international street addresses and want to contribute, please open a feature request issue and introduce yourself!
As of March 27, 2019, There is now a workflow for parsing intersections build into pm_parse
. There are two breaking changes to be aware of:
pm_identify()
is no longer part of pm_parse()
, and therefore must be run ahead of time by the end userpm_prep()
now has a required type
parameter that should either be "street"
or "intersection"
pm_replace()
, pm_rebuild()
, and pm_parse()
as wellThe intersection workflow is very similar to the street address workflow except that intersections must be prepared with pm_intersect_longer()
, than parsed, then put back together with pm_intersect_wider()
before replacing and rebuilding. The intersection workflow supports both short (i.e. Main St at First Ave
) and long (i.e. Main St at First Ave, St. Louis MO 63110
) forms.
Street addresses can be notoriously difficult to work with. In the United States, the U.S. Postal Service has standards for their composition. There is so much variety, however, that anticipating all of the possible permutations of addresses is a significant task. When the inaccuracy of human data entry is added, the challenge of parsing addresses becomes monumental. The goal of postmastr
is to provide a uniform workflow for parsing street address data that allows for sufficient flexibility.
This flexibility is provided in two ways. First, we utilize “dictionaries” for a number of the key functions that allow users to provide vectors of data to base parsing on. This enables postmastr
to parse potential misspellings and colloquial terms that are hard (or impossible) to predict. Second, not all aspects of the workflow are mandatory - if street address data do not contain postal codes, states, or cities, for example, those functions can be skipped.
postmastr
is not available from CRAN yet. In the meantime, you can install the development version of postmastr
from Github with remotes
:
The main Get started article has a full example of the postmastr
workflow.
The postmastr
functions all contain a locale
argument that is only enabled for American (i.e. locale = "us"
) addresses. Assistance with expanding postmastr
functionality to other countries would be most welcome. If you work with street address data in another country and would like to contribute to postmastr
by extending its functionality, please open a feature request issue and introduce yourself!
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.