geopandas

Python tools for geographic data

https://github.com/geopandas/geopandas

Science Score: 46.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    7 of 242 committers (2.9%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.7%) to scientific vocabulary

Keywords

geoparquet geospatial pandas python spatial

Keywords from Contributors

flexible alignment cython gdal closember mapbox-satellite-oss geospatial-data distributed wx tk
Last synced: 6 months ago · JSON representation

Repository

Python tools for geographic data

Basic Info
  • Host: GitHub
  • Owner: geopandas
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Homepage: http://geopandas.org/
  • Size: 56.4 MB
Statistics
  • Stars: 4,865
  • Watchers: 104
  • Forks: 981
  • Open Issues: 437
  • Releases: 38
Topics
geoparquet geospatial pandas python spatial
Created over 12 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct

README.md

pypi Actions Status Coverage Status Join the chat at https://gitter.im/geopandas/geopandas Binder DOI Powered by NumFOCUS

GeoPandas

Python tools for geographic data

Introduction

GeoPandas is a project to add support for geographic data to pandas objects. It currently implements GeoSeries and GeoDataFrame types which are subclasses of pandas.Series and pandas.DataFrame respectively. GeoPandas objects can act on shapely geometry objects and perform geometric operations.

GeoPandas geometry operations are cartesian. The coordinate reference system (crs) can be stored as an attribute on an object, and is automatically set when loading from a file. Objects may be transformed to new coordinate systems with the to_crs() method. There is currently no enforcement of like coordinates for operations, but that may change in the future.

Documentation is available at geopandas.org (current release) and Read the Docs (release and development versions).

The GeoPandas project uses an open governance model and is fiscally sponsored by NumFOCUS. Consider making a tax-deductible donation to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.


Install

See the installation docs for all details. GeoPandas depends on the following packages:

  • pandas
  • shapely
  • pyogrio
  • pyproj
  • packaging

Further, matplotlib is an optional dependency, required for plotting. Those packages depend on several low-level libraries for geospatial analysis, which can be a challenge to install. Therefore, we recommend to install GeoPandas using the conda package manager. See the installation docs for more details.

Get in touch

Examples

>>> import geopandas
>>> from shapely.geometry import Polygon
>>> p1 = Polygon([(0, 0), (1, 0), (1, 1)])
>>> p2 = Polygon([(0, 0), (1, 0), (1, 1), (0, 1)])
>>> p3 = Polygon([(2, 0), (3, 0), (3, 1), (2, 1)])
>>> g = geopandas.GeoSeries([p1, p2, p3])
>>> g
0         POLYGON ((0 0, 1 0, 1 1, 0 0))
1    POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))
2    POLYGON ((2 0, 3 0, 3 1, 2 1, 2 0))
dtype: geometry

Example 1

Some geographic operations return normal pandas objects. The area property of a GeoSeries will return a pandas.Series containing the area of each item in the GeoSeries:

>>> print(g.area)
0    0.5
1    1.0
2    1.0
dtype: float64

Other operations return GeoPandas objects:

>>> g.buffer(0.5)
0    POLYGON ((-0.3535533905932737 0.35355339059327...
1    POLYGON ((-0.5 0, -0.5 1, -0.4975923633360985 ...
2    POLYGON ((1.5 0, 1.5 1, 1.502407636663901 1.04...
dtype: geometry

Example 2

GeoPandas objects also know how to plot themselves. GeoPandas uses matplotlib for plotting. To generate a plot of a GeoSeries, use:

>>> g.plot()

GeoPandas also implements alternate constructors that can read any data format recognized by pyogrio. To read a zip file containing an ESRI shapefile with the boroughs boundaries of New York City (the example can be fetched using the geodatasets package):

>>> import geodatasets
>>> nybb_path = geodatasets.get_path('nybb')
>>> boros = geopandas.read_file(nybb_path)
>>> boros.set_index('BoroCode', inplace=True)
>>> boros.sort_index(inplace=True)
>>> boros
               BoroName     Shape_Leng    Shape_Area  \
BoroCode
1             Manhattan  359299.096471  6.364715e+08
2                 Bronx  464392.991824  1.186925e+09
3              Brooklyn  741080.523166  1.937479e+09
4                Queens  896344.047763  3.045213e+09
5         Staten Island  330470.010332  1.623820e+09

                                                   geometry
BoroCode
1         MULTIPOLYGON (((981219.0557861328 188655.31579...
2         MULTIPOLYGON (((1012821.805786133 229228.26458...
3         MULTIPOLYGON (((1021176.479003906 151374.79699...
4         MULTIPOLYGON (((1029606.076599121 156073.81420...
5         MULTIPOLYGON (((970217.0223999023 145643.33221...

New York City boroughs

>>> boros['geometry'].convex_hull
BoroCode
1    POLYGON ((977855.4451904297 188082.3223876953,...
2    POLYGON ((1017949.977600098 225426.8845825195,...
3    POLYGON ((988872.8212280273 146772.0317993164,...
4    POLYGON ((1000721.531799316 136681.776184082, ...
5    POLYGON ((915517.6877458114 120121.8812543372,...
dtype: geometry

Convex hulls of New York City boroughs

Owner

  • Name: GeoPandas
  • Login: geopandas
  • Kind: organization

GitHub Events

Total
  • Create event: 8
  • Release event: 1
  • Issues event: 113
  • Watch event: 347
  • Delete event: 4
  • Issue comment event: 359
  • Push event: 81
  • Pull request review comment event: 100
  • Pull request event: 178
  • Pull request review event: 168
  • Fork event: 66
Last Year
  • Create event: 8
  • Release event: 1
  • Issues event: 113
  • Watch event: 347
  • Delete event: 4
  • Issue comment event: 359
  • Push event: 81
  • Pull request review comment event: 100
  • Pull request event: 178
  • Pull request review event: 168
  • Fork event: 66

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 1,936
  • Total Committers: 242
  • Avg Commits per committer: 8.0
  • Development Distribution Score (DDS): 0.789
Past Year
  • Commits: 146
  • Committers: 34
  • Avg Commits per committer: 4.294
  • Development Distribution Score (DDS): 0.726
Top Committers
Name Email Commits
Joris Van den Bossche j****e@g****m 408
Martin Fleischmann m****n@m****t 277
Kelsey Jordahl k****l@a****u 212
Kelsey Jordahl k****l@e****m 171
Matt Richards 4****s 99
James McBride j****r@g****m 69
Jacob Wasserman j****n@g****m 59
Adrian Garcia Badaracco 1****b 23
Alan D. Snow a****1@g****m 23
Pieter Roggemans p****s@g****m 17
Brendan Ward b****d@a****m 15
Jeff Tratner j****r@g****m 14
Matthew Perry p****o@g****m 13
dependabot[bot] 4****] 13
Nick Eubank n****k@g****m 13
Mike Taves m****s@g****m 11
Geir Arne Hjelle g****e@g****m 11
Carson Farmer c****r@g****m 11
Jeffrey Gerard j****b@g****m 10
Ray Bell r****0@g****m 10
Ewout ter Hoeven E****n@s****l 9
Micah Cochran m****n 9
rraymondgh 4****h 9
mdbartos m****s@g****m 8
Giacomo Caria 4****a 8
Luke l****7@g****m 8
Nicholas YS Tan 3****n 8
Nick Eubank n****k 7
sangarshanan s****8@g****m 7
Flavin f****j@g****m 7
and 212 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 375
  • Total pull requests: 578
  • Average time to close issues: 11 months
  • Average time to close pull requests: 3 months
  • Total issue authors: 240
  • Total pull request authors: 120
  • Average comments per issue: 4.15
  • Average comments per pull request: 2.09
  • Merged pull requests: 419
  • Bot issues: 0
  • Bot pull requests: 27
Past Year
  • Issues: 75
  • Pull requests: 147
  • Average time to close issues: 26 days
  • Average time to close pull requests: 19 days
  • Issue authors: 63
  • Pull request authors: 33
  • Average comments per issue: 1.99
  • Average comments per pull request: 1.08
  • Merged pull requests: 106
  • Bot issues: 0
  • Bot pull requests: 9
Top Authors
Issue Authors
  • martinfleis (48)
  • jorisvandenbossche (30)
  • m-richards (17)
  • EwoutH (6)
  • bretttully (6)
  • snowman2 (4)
  • Zeroto521 (4)
  • brendan-ward (4)
  • sebastic (3)
  • theroggy (3)
  • sehHeiden (3)
  • stevenlis (2)
  • phisan-chula (2)
  • amine-aboufirass (2)
  • naub1n (2)
Pull Request Authors
  • martinfleis (174)
  • jorisvandenbossche (132)
  • m-richards (116)
  • theroggy (29)
  • nicholas-ys-tan (18)
  • dependabot[bot] (16)
  • star1327p (12)
  • github-actions[bot] (11)
  • JamesGardiner (9)
  • kylebarron (8)
  • raybellwaves (5)
  • kaushiksrini (5)
  • pre-commit-ci[bot] (5)
  • bretttully (4)
  • MrAlecJohnson (4)
Top Labels
Issue Labels
bug (152) enhancement (97) needs triage (91) upstream issue (17) good first issue (12) postgis (10) documentation (10) plotting (7) Testing (5) needs info (5) shapely parity (4) I/O (4) installation (3) regression (3) ops:overlay (3) crs (3) ops:sjoin (2) type hints (2) question (2) Continuous Integration (2) wontfix (1) downstream issue (1) duplicate (1) scipy2014 sprint (1)
Pull Request Labels
shapely parity (56) enhancement (20) dependencies (16) postgis (6) bug (5) type hints (4) documentation (4) plotting (3) upstream issue (2) needs discussion (2) Testing (2) I/O (1) github_actions (1)

Packages

  • Total packages: 4
  • Total downloads:
    • pypi 8,760,694 last-month
  • Total docker downloads: 1,339,600
  • Total dependent packages: 1,090
    (may contain duplicates)
  • Total dependent repositories: 7,965
    (may contain duplicates)
  • Total versions: 112
  • Total maintainers: 2
pypi.org: geopandas

Geographic pandas extensions

  • Versions: 59
  • Dependent Packages: 1,083
  • Dependent Repositories: 6,692
  • Downloads: 8,760,694 Last month
  • Docker Downloads: 1,339,600
Rankings
Dependent packages count: 0.0%
Downloads: 0.1%
Dependent repos count: 0.1%
Average: 0.6%
Docker downloads count: 0.8%
Stargazers count: 1.1%
Forks count: 1.4%
Maintainers (2)
Last synced: 8 months ago
proxy.golang.org: github.com/geopandas/geopandas
  • Versions: 38
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 0.6%
Stargazers count: 0.7%
Average: 4.4%
Dependent packages count: 7.0%
Dependent repos count: 9.3%
Last synced: 6 months ago
anaconda.org: geopandas

GeoPandas is an open source project to make working with geospatial data in python easier. GeoPandas extends the datatypes used by pandas to allow spatial operations on geometric types. Geometric operations are performed by shapely. Geopandas further depends on fiona for file access and descartes and matplotlib for plotting. The goal of GeoPandas is to make working with geospatial data in python easier. It combines the capabilities of pandas and shapely, providing geospatial operations in pandas and a high-level interface to multiple geometries to shapely. GeoPandas enables you to easily do operations in python that would otherwise require a spatial database such as PostGIS.

  • Versions: 10
  • Dependent Packages: 5
  • Dependent Repositories: 1,203
Rankings
Dependent repos count: 3.6%
Dependent packages count: 8.6%
Average: 9.5%
Forks count: 12.3%
Stargazers count: 13.4%
Last synced: 6 months ago
anaconda.org: geopandas-base

GeoPandas is an open source project to make working with geospatial data in python easier. GeoPandas extends the datatypes used by pandas to allow spatial operations on geometric types. Geometric operations are performed by shapely. Geopandas further depends on fiona for file access and descartes and matplotlib for plotting. The goal of GeoPandas is to make working with geospatial data in python easier. It combines the capabilities of pandas and shapely, providing geospatial operations in pandas and a high-level interface to multiple geometries to shapely. GeoPandas enables you to easily do operations in python that would otherwise require a spatial database such as PostGIS.

  • Versions: 5
  • Dependent Packages: 2
  • Dependent Repositories: 70
Rankings
Forks count: 12.3%
Stargazers count: 13.4%
Average: 16.8%
Dependent packages count: 20.5%
Dependent repos count: 21.2%
Last synced: 6 months ago

Dependencies

.github/workflows/release_to_pypi.yml actions
  • actions/checkout v4 composite
  • actions/create-release v1 composite
  • actions/setup-python v4 composite
  • actions/upload-release-asset v1 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/tests.yaml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v3 composite
  • mamba-org/setup-micromamba v1 composite
  • pre-commit/action v3.0.0 composite
.github/workflows/versioneer.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • peter-evans/create-pull-request v5 composite
  • psf/black stable composite
doc/environment.yml pypi
  • geodatasets *
  • sphinx-toggleprompt *
environment.yml pypi
pyproject.toml pypi
  • fiona >= 1.8.21
  • packaging *
  • pandas >= 1.4.0
  • pyproj >= 3.3.0
  • shapely >= 2.0.0
requirements-dev.txt pypi
  • GeoAlchemy2 * development
  • SQLAlchemy >=1.3 development
  • black * development
  • codecov * development
  • fiona >=1.8.21 development
  • geopy * development
  • mapclassify * development
  • matplotlib >=3.5.0 development
  • packaging * development
  • pandas >=1.4.0 development
  • pre-commit * development
  • psycopg2 >=2.8.0 development
  • pyproj >=3.3.0 development
  • pytest >=3.1.0 development
  • pytest-cov * development
  • shapely >=2.0.0 development
setup.py pypi