coa-project / pycoa

pycoa Python source code
MIT License
18 stars 0 forks source link

GeoCountry with country which has continental #165

Closed odadoun closed 2 years ago

odadoun commented 2 years ago

Here the problem:

f=cg.GeoCountry('PRT') f.get_regions_from_macroregion(name='Portugal',output='name')

return CoaWhereError: The region Portugal does not exist for country PRT. See get_region_list(). but

f=cg.GeoCountry('PRT') f.get_regions_from_macroregion(name='Portugal continental',output='name') works

This problem will crash covid19.py To bypass this I suggest you (for get_regions_from_macroregion) that country with continental = country without continental

f.get_regions_from_macroregion(name='Portugal continental',output='name') = f.get_regions_from_macroregion(name='Portugal',output='name')

surely we can ask the user to be more precise to avoid this but I will prefer get_regions_from_macroregion to be more flexible Does it sound good to you ?

odadoun commented 2 years ago

fixed the pb in covid19 not here ....