mapsbr.helpers package¶
Submodules¶
mapsbr.helpers.ibgetools module¶
-
mapsbr.helpers.ibgetools.
code_to_name
(geolevel)[source]¶ Make dictionary to map location code to IBGE name.
-
mapsbr.helpers.ibgetools.
ibge_decode
(locations, geolevel)[source]¶ Vectorized function to turn locations codes into their corresponding IBGE name.
Parameters: - locations (str, iterables, Series, GeoSeries) – Series with locations’ codes.
- geolevel (str) – Geographic level, e.g. “estados”, “mesoregions”.
Returns: Return type: ndarray
Raises: AssertionError
– If all values passed are strings or if invalid geographic level is passed.
-
mapsbr.helpers.ibgetools.
ibge_encode
(locations, geolevel)[source]¶ Vectorized function to turn locations names into their corresponding IBGE code.
Parameters: - locations (str, iterables, Series, GeoSeries) – Series with locations’ names.
- geolevel (str, default "states") – Geographic level, e.g. “estados”, “mesoregions”.
Returns: Return type: ndarray
Raises: AssertionError
– If try to pass numbers or strings as numbers.ValueError
– If invalid geographic level is passed.