A package to bin coordinate data in geojson shapes.
Project description
Package Description
Use geobinning
to bucket [lng,lat] points based on a geojson geometry. Any geojson that contains ID and polygon geometries will work, and the function returns back a dataframe with (ID,bins).
Installation
$ pip install geobinning
Usage
`import geopandas as gpd import requests import geobinning as gb
df_places = gpd.read_file('https://opendata.arcgis.com/datasets/af500b5abb7240399853b35a2362d0c0_0.geojson')
polygons = [] for shp in df_places['geometry']: lng,lat = shp.exterior.coords.xy lng= list(lng) lat= list(lat) coords = list(map(list,zip(*[lng,lat]))) polygons.append(coords)
bins = gb.geobin(polygons,[[-79,43],[-78,43.22]])`
Example
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
Built Distribution
File details
Details for the file geobinning-2.0.0.tar.gz
.
File metadata
- Download URL: geobinning-2.0.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c937234d6161ad8a80149e91962ba063c4350bc910e95b963c0e0c7747118581 |
|
MD5 | aa4022c5e3f5ffee66f6a8ab82768fe9 |
|
BLAKE2b-256 | c496887abda927ecc3ee83822e330194d2c4d58966d2716e437f4048345fafcf |
File details
Details for the file geobinning-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: geobinning-2.0.0-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ffb29eb42319eeba3123c6720adb8e695f3c264767f4b8243312dc68bd613b7 |
|
MD5 | 87685975e0bcb115951abdff522af939 |
|
BLAKE2b-256 | 335fd206d4e75ecc8145fd9f134f3e019660b9c4b9981e9102be01ec6a927030 |