Geographical location data
Project description
This package contains geospatial data and associated facilities to resolve administrative areas.
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, NYU’s Datamart system, to resolve named areas during profiling.
See also:
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.2.tar.gz
(5.8 kB
view details)
Built Distribution
File details
Details for the file datamart-geo-0.2.tar.gz
.
File metadata
- Download URL: datamart-geo-0.2.tar.gz
- Upload date:
- Size: 5.8 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 | bb2ab180dd7cec85a7bc935dfc16ecd269e642ba141c776864bae7808e5fc02b |
|
MD5 | 06a578ccc32a87e01f422078b5c75bbc |
|
BLAKE2b-256 | a76ab963b88e04b7cb254d28d450dbca857a2f71b8ff276f16a1d7dc7527a9a7 |
File details
Details for the file datamart_geo-0.2-py3-none-any.whl
.
File metadata
- Download URL: datamart_geo-0.2-py3-none-any.whl
- Upload date:
- Size: 6.1 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 | 8249e7d31a2bda0b76710e2da6993a9fcb82c6cef6825bc58748e8c0b8cc7a28 |
|
MD5 | c0168efc4e95bfd157c5f94af1524fb9 |
|
BLAKE2b-256 | 013099007248908c9fe9e35ca4665372f0896693e097ed9a1d0da5f0b7ae158e |