alephdata / countrynames Goto Github PK
View Code? Open in Web Editor NEWUtility library to turn country names into ISO two-letter codes
Utility library to turn country names into ISO two-letter codes
Python yaml loader is way slower than the json loader.
Replacing data.yaml file with a json file would speed up considerably the loading time of this library (several seconds on a modern computer).
Hey @rgieseke, I'm having some issues with pycountry, in particular the fact that it's missing countries (like Kosovo) and has given up on iso-639-1 codes for languages. Replacing it from this library would be relatively simple, were it not for all the aliasing functions (to_name, to_official_name, to_numeric) which are dependent on the full pycountry dataset. Are you using this? Would you be able to top out the version of countrynames in the places where you depend on it so that newer versions can get rid of the dependency?
@pudo I've committed a fix for typoed islands (like "Falklands Islands") not having a chance in fuzzy matching against "Island" (leading to a longer than one list of matches). I think there are further improvements possible, like a Levenshtein matching that stops computing after the distance is too long or checking each group for matches instead of all from one country to speed up fuzzy matching.
I've also changed the test script to use py.test, I hope that's fine with you.
What is the policy for countries not existing anymore? For example the "Netherland Antilles" (https://en.wikipedia.org/wiki/Dissolution_of_the_Netherlands_Antilles) - one could as currently assign it to the BES islands but I think it would make more sense to assign the old code.
Thoughts?
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
Add long description from Readme for nicer landing page on PyPI
@pudo Would be nice with the new API ...
Thanks so much for this great package. However, I'm having some issues trying to view the log.DEBUG info for _fuzzy_search. Any guidance on where to find this logging info would be greatly appreciated.
@rgieseke Can you release the current version of countrynames
? There are some additions to the list, and I would like to use them in https://github.com/pudo/opensanctions
I have no idea how pip
works, but I think that this is the only way to use the newest code?
countrynames
depends on normality
which as of version 1 depends on pyicu
-
pyicu
can be hard to install, so a workaround might be to pin to a pre-1.0 version of normality
See discussion in
pudo/normality#6
Hi!
Can you add "France métropolitaine" to the list of words for France?
Thank you!
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.