Skip to main content

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


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.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

geobinning-2.0.0-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

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

Hashes for geobinning-2.0.0.tar.gz
Algorithm Hash digest
SHA256 c937234d6161ad8a80149e91962ba063c4350bc910e95b963c0e0c7747118581
MD5 aa4022c5e3f5ffee66f6a8ab82768fe9
BLAKE2b-256 c496887abda927ecc3ee83822e330194d2c4d58966d2716e437f4048345fafcf

See more details on using hashes here.

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

Hashes for geobinning-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ffb29eb42319eeba3123c6720adb8e695f3c264767f4b8243312dc68bd613b7
MD5 87685975e0bcb115951abdff522af939
BLAKE2b-256 335fd206d4e75ecc8145fd9f134f3e019660b9c4b9981e9102be01ec6a927030

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page