GeofabrikDownloader.get_region_subregion_tier¶
-
GeofabrikDownloader.
get_region_subregion_tier
(update=False, confirmation_required=True, verbose=False)¶ Get a catalogue of region-subregion tier.
This includes all geographic regions to which data of subregions is unavailable.
- Parameters
update (bool) – whether to (check on and) update the package data, defaults to
False
confirmation_required (bool) – whether asking for confirmation to proceed, defaults to
True
verbose (bool or int) – whether to print relevant information in console, defaults to
False
- Returns
region-subregion tier (in
dict
type) and all that have no subregions (inlist
type)- Return type
tuple
Example:
>>> from pydriosm.downloader import GeofabrikDownloader >>> geofabrik_downloader = GeofabrikDownloader() >>> # region-subregion tier, and all regions that have no subregions >>> rs_tier, ns_list = geofabrik_downloader.get_region_subregion_tier() >>> # Keys of the region-subregion tier >>> list(rs_tier.keys()) ['Africa', 'Antarctica', 'Asia', 'Australia and Oceania', 'Central America', 'Europe', 'North America', 'South America'] >>> # A sample of five regions that have no subregions >>> ns_list[0:5] ['Antarctica', 'Algeria', 'Angola', 'Benin', 'Botswana']