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

fixLoc option to return proper place names (+bug in removing particles) #139

Open
Lobz opened this issue Feb 24, 2025 · 0 comments
Open

Comments

@Lobz
Copy link

Lobz commented Feb 24, 2025

By default, fixLoc returns place names without particles such as "de", "of", etc.
The data in replaceNames has this baked into it for some names, eg "rj" is turned into "rio janeiro". However, "rio de janeiro" isn't transformed, generating an inconsistency.

I think these functions should be able to return proper place names, eg "Rio de Janeiro", and the removal of particles should be optional. This would mean replaceNames would have to slightly modified, and a couple of lines of code added to remove the particles afterwards, optionally. This would also fix the inconsistency I mentioned above.

Also I would like to reorganize the code in fixLoc into separate subfunctions for each admin level, when possible, ie, fixCountry, fixState, fixMunicipality, or something similar. prepCountry already does most of the work in fixing the country data, and there's no clear reason why it doesn't do the rest. It would also have to be editted to allow returning full place names without removal of particles.

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