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 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
geobinning-2.0.1.tar.gz
(2.2 kB
view details)
Built Distribution
File details
Details for the file geobinning-2.0.1.tar.gz
.
File metadata
- Download URL: geobinning-2.0.1.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 | ec5e0b17ce8511f1a60a17e1c5ca794295e237047070b205bdf2792bda0c2950 |
|
MD5 | aebca6db9dc0c4e9f6fd7bbb2270ee1e |
|
BLAKE2b-256 | b6b48f0e2aaf64c15db853de0f236d8b02da4bb75a3879f87c1f42de3c6385c5 |
File details
Details for the file geobinning-2.0.1-py3-none-any.whl
.
File metadata
- Download URL: geobinning-2.0.1-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 | 1f060b8ae7cbd03925b12c8d4a2cacbe8f87bbaeb3d8bd83a7207c90827dc3e3 |
|
MD5 | 8d7235192272730f2d34957e7f69ba15 |
|
BLAKE2b-256 | cab502b76661378cc3b49fe0ef21d338457e4c1a66ad94948ff5db3a0a3bb2f0 |