swisslandstats-geopy

swisslandstats-geopy: Python tools for the land statistics datasets from the Swiss Federal Statistical Office - Published in JOSS (2019)

https://github.com/martibosch/swisslandstats-geopy

Science Score: 95.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
    Found 2 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    1 of 4 committers (25.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords from Contributors

mesh geoscience

Scientific Fields

Earth and Environmental Sciences Physical Sciences - 36% confidence
Last synced: 4 months ago · JSON representation

Repository

Python tools for preprocessing geodata from the Swiss Federal Statistical Office

Basic Info
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 2
  • Open Issues: 2
  • Releases: 9
Created about 7 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing License

README.md

PyPI version fury.io Conda Version Documentation Status pre-commit.ci status tests codecov GitHub license Binder status DOI

swisslandstats-geopy

Extended pandas-like interface for the Swiss Federal Statistics Geodata (GEOSTAT).

Citation: Bosch M. 2019. "swisslandstats-geopy: Python tools for the land statistics datasets from the Swiss Federal Statistical Office". The Journal Open Source Software 4(40), 1511. https://doi.org/10.21105.joss.01511

Many datasets of the GEOSTAT inventory are provided in a relational database format which allows storing a coolection of variables into a single CSV file, nevertheless, libraries to process geographical raster data aree rarely capable of processing such format. Therefore, the aim of swisslandstats-geopy is to provide an extended pandas DataFrame interface to such inventory (see the "Features" section below).

The target audience of swisslandstats-geopy is researchers and developers in environmental sciences and GIS, who intend to produce repeatable and reproducible computational workflows that make use of the geodata inventory provided by the SFSO.

Features

  • Automatically read CSV files from the GEOSTAT inventory into dataframes
  • Export columns into numpy arrays and GeoTIFF files
  • Clip dataframes by vector geometries
  • Plot information as raster maps

```python import swisslandstats as sls

ldf = sls.loaddataset(datasetkey="sls") ldf.plot("LU094", cmap=sls.noas044_cmap, legend=True) ```

landstats

python vaud_ldf = ldf.clip_by_nominatim("Vaud, Switzerland") vaud_ldf.plot("LU09_4", cmap=sls.noas04_4_cmap, legend=True)

landstats-vaud

See the example notebook for a more thorough overview and example uses with the land use statistics and population and household statistics. You might click the Binder badge above to execute it interactively in your browser.

Examples of applications of the library in the academic literature include:

  • The assessment of the carbon sequestration for the canton of Vaud (see the dedicated GitHub repository with the materials necessary to reproduce the results)
  • The evaluation of the spatio-temporal patterns of LULC change in the urban agglomerations of Zurich, Bern and Lausanne (see the dedicated GitHub repository with the materials necessary to reproduce the results).

Installation

With conda

The easiest way to install swisslandstats-geopy is with conda as in:

bash conda install -c conda-forge swisslandstats-geopy

With pip

If you want to be able to clip dataframes by vector geometries, you will need geopandas (and osmnx to clip dataframes from place names e.g., "Zurich, Switzerland"). The easiest way to install such requirements is via conda as in:

bash conda install -c conda-forge geopandas osmnx rasterio

Although rasterio can be installed via pip, it is recommended to install it via conda to avoid potential issues with GDAL (such as the support of the Swiss EPSG coordinate reference systems).

Then you can install swisslandstats-geopy via pip as in:

bash pip install swisslandstats-geopy

TODO

  • Add missing colormaps
    • Automatically assign columns to cmaps when plotting
  • Exceptions for no land use/land cover columns
  • Implement methods to merge DataFrames from multiple csv files

Owner

  • Name: Martí Bosch
  • Login: martibosch
  • Kind: user
  • Location: Lausanne
  • Company: EPFL

Doctor in civil and environmental engineering. Urban sprawl, Python, and a bit of landscape ecology and complexity

JOSS Publication

swisslandstats-geopy: Python tools for the land statistics datasets from the Swiss Federal Statistical Office
Published
September 15, 2019
Volume 4, Issue 41, Page 1511
Authors
Martí Bosch ORCID
Urban and Regional Planning Community, École Polytechnique Fédérale de Lausanne, Switzerland
Editor
Leonardo Uieda ORCID
Tags
land use land cover GIS raster

GitHub Events

Total
  • Release event: 1
  • Watch event: 2
  • Delete event: 7
  • Issue comment event: 7
  • Push event: 70
  • Pull request event: 9
  • Create event: 6
Last Year
  • Release event: 1
  • Watch event: 2
  • Delete event: 7
  • Issue comment event: 7
  • Push event: 70
  • Pull request event: 9
  • Create event: 6

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 134
  • Total Committers: 4
  • Avg Commits per committer: 33.5
  • Development Distribution Score (DDS): 0.149
Past Year
  • Commits: 33
  • Committers: 2
  • Avg Commits per committer: 16.5
  • Development Distribution Score (DDS): 0.121
Top Committers
Name Email Commits
Martí Bosch m****h@e****h 114
Martí Bosch m****2@g****m 14
dependabot[bot] 4****] 4
Leonardo Uieda l****a@g****m 2
Committer Domains (Top 20 + Academic)
epfl.ch: 1

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 10
  • Total pull requests: 19
  • Average time to close issues: 11 days
  • Average time to close pull requests: 3 months
  • Total issue authors: 2
  • Total pull request authors: 4
  • Average comments per issue: 1.9
  • Average comments per pull request: 1.0
  • Merged pull requests: 10
  • Bot issues: 0
  • Bot pull requests: 16
Past Year
  • Issues: 0
  • Pull requests: 9
  • Average time to close issues: N/A
  • Average time to close pull requests: about 1 month
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 1.0
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 9
Top Authors
Issue Authors
  • weikang9009 (7)
  • darribas (3)
Pull Request Authors
  • dependabot[bot] (14)
  • pre-commit-ci[bot] (3)
  • leouieda (2)
  • martibosch (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (14)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 30 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 2
    (may contain duplicates)
  • Total versions: 19
  • Total maintainers: 1
pypi.org: swisslandstats-geopy

Python for the Swiss Federal Statistics Geodata

  • Versions: 16
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 30 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 19.1%
Dependent repos count: 21.6%
Average: 25.3%
Downloads: 36.9%
Stargazers count: 38.8%
Maintainers (1)
Last synced: 4 months ago
conda-forge.org: swisslandstats-geopy
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
Rankings
Dependent repos count: 24.3%
Average: 50.7%
Dependent packages count: 51.6%
Forks count: 59.2%
Stargazers count: 67.6%
Last synced: 4 months ago

Dependencies

.github/workflows/release.yml actions
  • actions/checkout v4 composite
  • actions/download-artifact v4 composite
  • actions/upload-artifact v4 composite
  • ncipollo/release-action v1.12.0 composite
  • pre-commit/action v3.0.1 composite
  • pypa/gh-action-pypi-publish release/v1 composite
  • requarks/changelog-action v1 composite
  • stefanzweifel/git-auto-commit-action v4 composite
.github/workflows/tests.yml actions
  • actions/checkout v4 composite
  • codecov/codecov-action v3 composite
  • mamba-org/setup-micromamba v1 composite
docs/requirements.txt pypi
  • pydata-sphinx-theme ==0.15.2
  • sphinx ==7.2.6
pyproject.toml pypi
  • matplotlib >= 2.2.0
  • numpy >= 1.15.0
  • pandas >= 0.17.0
  • rasterio >= 1.0.0
  • xarray *