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

Way to use .borders() info? #28

Open
thisismyuniquegithubusername opened this issue Jun 25, 2021 · 1 comment
Open

Way to use .borders() info? #28

thisismyuniquegithubusername opened this issue Jun 25, 2021 · 1 comment

Comments

@thisismyuniquegithubusername

I want to get the population of the bordering countries to my input, the .borders() method returns, I believe, the alpha3 ISO code for the bordering countries, but the library does not accept alpha3 ISO codes as input. Is there an easy way to convert between the ISO code and the country name? Or to output .borders() info in an input-able format? In the meantime, I am going to add the ISO codes to the altSpellings list which will make them input-able, but I would love an official, cleaner fix!

@thisismyuniquegithubusername
Copy link
Author

I fixed this one too on my end :) I edited this if self.__country_name in map(lambda an: an.lower(), country_info.get('altSpellings', [])) or self.__country_name in map(lambda an: an.lower(), country_info.get('ISO', {}).values()): on line 36 so that ISO values are included as alternate names. Thanks again for this wonderful library!

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