Geographical location data
Project description
This package contains geospatial data and associated facilities to resolve administrative areas.
To use the fuzzy-search capabilities (GeoData.resolve_name_fuzzy()), you will need to install datamart-geo[fuzzy].
Example usage:
>>> geo_data = datamart_geo.GeoData.download() # Download data if needed >>> france = geo_data.resolve_name('France') >>> france <datamart_geo.Area "Republic of France" (3017382) type=Type.ADMIN_0> >>> france.latitude, france.longitude (46.0, 2.0) >>> france.bounds (-61.797841, 55.854503, -21.370782, 51.087541) >>> assert france.type == datamart_geo.Type.ADMIN_0 >>> assert france.type == datamart_geo.Type.COUNTRY >>> cuers = geo_data.resolve_name('Cuers') >>> cuers <datamart_geo.Area "Cuers" (6451482) type=Type.ADMIN_4> >>> cuers.latitude, cuers.longitude (43.2375, 6.07083) >>> cuers.get_parent_area() <datamart_geo.Area "Arrondissement de Toulon" (2972326) type=Type.ADMIN_3> >>> [ ... # Show multiple results with their parent ADMIN_1 ... (a, a.get_parent_area(datamart_geo.Type.ADMIN_1)) ... for a in geo_data.resolve_name_all('Var') ... ] [(<datamart_geo.Area "Var" (2970749) type=Type.ADMIN_2>, <datamart_geo.Area "Provence-Alpes-Côte d'Azur" (2985244) type=Type.ADMIN_1>), (<datamart_geo.Area "Vars" (6427887) type=Type.ADMIN_4>, <datamart_geo.Area "Nouvelle-Aquitaine" (11071620) type=Type.ADMIN_1>), (<datamart_geo.Area "Vars" (6442138) type=Type.ADMIN_4>, <datamart_geo.Area "Bourgogne-Franche-Comté" (11071619) type=Type.ADMIN_1>)]
This package was built for Auctus, the dataset search engine from NYU, to resolve named areas during profiling.
See also:
Data license
If you are downloading data from the default location (using download() without a source parameter), that data is distributed under specific license terms:
Copyright 2021, New York University This dataset is open data, made available under the Open Database License: http://opendatacommons.org/licenses/odbl/1.0/. Includes data from GeoNames and sources, listed at https://www.geonames.org/datasources/ Includes map data from OpenStreetMap (r), copyright OpenStreetMap contributors and sources, listed at https://www.openstreetmap.org/copyright
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
datamart-geo-0.3.tar.gz
(6.6 kB
view details)
Built Distribution
File details
Details for the file datamart-geo-0.3.tar.gz
.
File metadata
- Download URL: datamart-geo-0.3.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6e8364934ac1e0dfab3833beb3017b331c44d3abfa1a1511cd12aa47d19b721 |
|
MD5 | bd7cc083eeb4a0a68f5ecaaff63aa8e4 |
|
BLAKE2b-256 | bf61d2c4913f46a5edbf65406f42da4811a115c54003ca2b53a5f154b3e0ecec |
File details
Details for the file datamart_geo-0.3-py3-none-any.whl
.
File metadata
- Download URL: datamart_geo-0.3-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21fd91c7557a4ca85f602874287416c837b240c978b9644307623808cb7ea92b |
|
MD5 | b213266e80da2a85a714c0762a934d10 |
|
BLAKE2b-256 | 15df6237bce51c23f64bf740e8c5c831ed956cd74ddb09e73691014acdd633ee |