Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce repetition in geographic normalization #18

Open
k5cents opened this issue Jun 16, 2021 · 0 comments
Open

Reduce repetition in geographic normalization #18

k5cents opened this issue Jun 16, 2021 · 0 comments

Comments

@k5cents
Copy link
Collaborator

k5cents commented Jun 16, 2021

When using normal_state() on a vector of 1 million state values, the vast majority will be valid abbreviations. The more efficient way is to normalize each unique invalid values.

  1. Look at unique() state values
  2. Ignore the good values
  3. Normalize only the bad ones
  4. Match normalized values back
  5. Return a single vector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant