地理位置数据
项目描述
此包包含地理空间数据和关联设施,用于解决行政区划。
要使用模糊搜索功能(《GeoData.resolve_name_fuzzy()`)),您需要安装 datamart-geo[fuzzy]。
示例用法
>>> 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>)]
此包是为Auctus构建的,Auctus是纽约大学的集合搜索引擎,用于在分析期间解决命名区域。
另请参阅
数据许可
如果您从默认位置(使用不带 source 参数的 download())下载数据,那么这些数据受特定许可条款的约束
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
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。
源代码分发
datamart-geo-0.3.1.tar.gz (6.6 kB 查看哈希值)
构建分发
datamart_geo-0.3.1-py3-none-any.whl (7.8 kB 查看哈希值)
关闭
datamart-geo-0.3.1.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | e9b2196a10d6e04ee9922bde56810d4b9c27999b69d06c17347dcef74e896fe9 |
|
MD5 | 617ec1280fd551e15188d5e5cb60c017 |
|
BLAKE2b-256 | 513cd2da638008e3e9d0c1562ca7b3ab4e71ffb3c0109b662ecb72d34821a757 |
关闭
datamart_geo-0.3.1-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 17eee8b8377e85198ce67d5cd21a44883ae9d3ebd395259036b76330af9fad29 |
|
MD5 | 3bd214ef66c48f9485f2793a636d523e |
|
BLAKE2b-256 | 36106cb964dad85f9cbf484edf4815f58f951d1dd3a6a515d3407bb651487999 |