A Thenmap API wrapper
Project description
A simple wrapper for the Thenmap API.
Installing
pip install thenmap
Using
>>> from thenmap import Thenmap
>>> api = Thenmap()
>>> swedish_municipalities = api["se-7"]
>>> swedish_municipalities.geojson # defaults to current local date
{{u'crs': {u'type': u'name', ...}
>>> swedish_municipalities.date = "1975-05-03"
>>> swedish_municipalities.geojson
{{u'crs': {u'type': u'name', ...}
>>> swedish_municipalities.in_which("13.46,59.38")
'1780'
For more fine grained controll over the return geodata use the method get_geodata:
>>> swedish_municipalities.get_geodata(date="1975-05-03", format="topojson")
{{u'crs': {u'type': u'name', ...}
See http://thenmap.net for more info on the API.
Changelog
1.1.0 - Always get features from only one date. Default to current date - Add Dataset.info method - Make Python3.x compatible
1.0.1 - Fixed import bug
1.0.0 - First working version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
thenmap-1.1.0.tar.gz
(3.7 kB
view details)
File details
Details for the file thenmap-1.1.0.tar.gz
.
File metadata
- Download URL: thenmap-1.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc9c7e3a37318c7c815b90461af6e89f28579f0c810d9438e24b7c09aa66a295 |
|
MD5 | 948cf9b3c379809152b93aba69151c32 |
|
BLAKE2b-256 | 1399b1b92fd3a6e7cc0f6f1fece3d76171e484951ff36860b8256999d4d1fdcc |