Skip to main content

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 ###

Metadata

Release files for geobinning 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geobinning 2.0.1
File Size Uploaded
geobinning-2.0.1.tar.gz 2.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for geobinning 2.0.1
File Interpreter ABI Platform
geobinning-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.2 kB

Release files / geobinning-2.0.1.tar.gz

Download URL geobinning-2.0.1.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ec5e0b17ce8511f1a60a17e1c5ca794295e237047070b205bdf2792bda0c2950
BLAKE2b-256 checksum
How to use checksums
b6b48f0e2aaf64c15db853de0f236d8b02da4bb75a3879f87c1f42de3c6385c5
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / geobinning-2.0.1-py3-none-any.whl

Download URL geobinning-2.0.1-py3-none-any.whl
Size 2.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f060b8ae7cbd03925b12c8d4a2cacbe8f87bbaeb3d8bd83a7207c90827dc3e3
BLAKE2b-256 checksum
How to use checksums
cab502b76661378cc3b49fe0ef21d338457e4c1a66ad94948ff5db3a0a3bb2f0
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page