swisslandstats-geopy
swisslandstats-geopy: Python tools for the land statistics datasets from the Swiss Federal Statistical Office - Published in JOSS (2019)
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
Scientific Fields
Repository
Python tools for preprocessing geodata from the Swiss Federal Statistical Office
Basic Info
- Host: GitHub
- Owner: martibosch
- License: gpl-3.0
- Language: Python
- Default Branch: main
- Homepage: https://doi.org/10.21105/joss.01511
- Size: 1.77 MB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 2
- Releases: 9
Metadata Files
README.md
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
numpyarrays andGeoTIFFfiles - 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) ```

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

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
- Website: https://fosstodon.org/@martibosch
- Twitter: mortybosch
- Repositories: 83
- Profile: https://github.com/martibosch
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
Authors
Tags
land use land cover GIS rasterGitHub 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
Top Committers
| Name | 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)
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
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
- Documentation: https://swisslandstats-geopy.readthedocs.io/
- License: GPL-3.0
-
Latest release: 0.12.0
published 11 months ago
Rankings
Maintainers (1)
conda-forge.org: swisslandstats-geopy
- Homepage: https://github.com/martibosch/swisslandstats-geopy
- License: GPL-3.0-or-later
-
Latest release: 0.10.0
published about 4 years ago
Rankings
Dependencies
- 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
- actions/checkout v4 composite
- codecov/codecov-action v3 composite
- mamba-org/setup-micromamba v1 composite
- pydata-sphinx-theme ==0.15.2
- sphinx ==7.2.6
- matplotlib >= 2.2.0
- numpy >= 1.15.0
- pandas >= 0.17.0
- rasterio >= 1.0.0
- xarray *
