getopendatafvg 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. getopendatafvg-0.2.0/.gitignore +16 -0
  2. getopendatafvg-0.2.0/CHANGELOG.md +114 -0
  3. getopendatafvg-0.2.0/CITATION.cff +27 -0
  4. getopendatafvg-0.2.0/LICENSE +21 -0
  5. getopendatafvg-0.2.0/PKG-INFO +525 -0
  6. getopendatafvg-0.2.0/README.md +486 -0
  7. getopendatafvg-0.2.0/docs/upstream-defects.md +168 -0
  8. getopendatafvg-0.2.0/pyproject.toml +83 -0
  9. getopendatafvg-0.2.0/src/getopendatafvg/__init__.py +119 -0
  10. getopendatafvg-0.2.0/src/getopendatafvg/_errors.py +6 -0
  11. getopendatafvg-0.2.0/src/getopendatafvg/avalanche.py +135 -0
  12. getopendatafvg-0.2.0/src/getopendatafvg/catalog.py +838 -0
  13. getopendatafvg-0.2.0/src/getopendatafvg/catasto.py +82 -0
  14. getopendatafvg-0.2.0/src/getopendatafvg/coverage.py +75 -0
  15. getopendatafvg-0.2.0/src/getopendatafvg/dem.py +132 -0
  16. getopendatafvg-0.2.0/src/getopendatafvg/elevation.py +37 -0
  17. getopendatafvg-0.2.0/src/getopendatafvg/indices.py +142 -0
  18. getopendatafvg-0.2.0/src/getopendatafvg/istat.py +421 -0
  19. getopendatafvg-0.2.0/src/getopendatafvg/landsat.py +211 -0
  20. getopendatafvg-0.2.0/src/getopendatafvg/open_data_fvg.py +137 -0
  21. getopendatafvg-0.2.0/src/getopendatafvg/overpass.py +94 -0
  22. getopendatafvg-0.2.0/src/getopendatafvg/pmtiles.py +51 -0
  23. getopendatafvg-0.2.0/src/getopendatafvg/scene_date.py +35 -0
  24. getopendatafvg-0.2.0/src/getopendatafvg/sentinel2.py +224 -0
  25. getopendatafvg-0.2.0/src/getopendatafvg/vectorize.py +120 -0
  26. getopendatafvg-0.2.0/src/getopendatafvg/viz.py +35 -0
  27. getopendatafvg-0.2.0/src/getopendatafvg/weather.py +54 -0
  28. getopendatafvg-0.2.0/src/getopendatafvg/wfs.py +95 -0
  29. getopendatafvg-0.2.0/src/getopendatafvg/wikipedia.py +65 -0
  30. getopendatafvg-0.2.0/tests/test_avalanche.py +131 -0
  31. getopendatafvg-0.2.0/tests/test_catalog.py +241 -0
  32. getopendatafvg-0.2.0/tests/test_catalog_live.py +235 -0
  33. getopendatafvg-0.2.0/tests/test_catasto.py +46 -0
  34. getopendatafvg-0.2.0/tests/test_coverage.py +50 -0
  35. getopendatafvg-0.2.0/tests/test_dem.py +102 -0
  36. getopendatafvg-0.2.0/tests/test_elevation.py +37 -0
  37. getopendatafvg-0.2.0/tests/test_indices.py +108 -0
  38. getopendatafvg-0.2.0/tests/test_istat.py +464 -0
  39. getopendatafvg-0.2.0/tests/test_landsat.py +214 -0
  40. getopendatafvg-0.2.0/tests/test_open_data_fvg.py +108 -0
  41. getopendatafvg-0.2.0/tests/test_overpass.py +77 -0
  42. getopendatafvg-0.2.0/tests/test_pmtiles.py +28 -0
  43. getopendatafvg-0.2.0/tests/test_public_api.py +122 -0
  44. getopendatafvg-0.2.0/tests/test_scene_date.py +25 -0
  45. getopendatafvg-0.2.0/tests/test_sentinel2.py +98 -0
  46. getopendatafvg-0.2.0/tests/test_upstream_defects.py +124 -0
  47. getopendatafvg-0.2.0/tests/test_upstream_defects_live.py +177 -0
  48. getopendatafvg-0.2.0/tests/test_vectorize.py +72 -0
  49. getopendatafvg-0.2.0/tests/test_viz.py +25 -0
  50. getopendatafvg-0.2.0/tests/test_weather.py +46 -0
  51. getopendatafvg-0.2.0/tests/test_wfs.py +88 -0
  52. getopendatafvg-0.2.0/tests/test_wikipedia.py +62 -0
@@ -0,0 +1,16 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ .eggs/
5
+ build/
6
+ dist/
7
+ .venv/
8
+ venv/
9
+ .pytest_cache/
10
+ .ruff_cache/
11
+ .coverage
12
+ coverage.xml
13
+ htmlcov/
14
+ .mypy_cache/
15
+ .env
16
+ site/
@@ -0,0 +1,114 @@
1
+ # Changelog
2
+
3
+ All notable changes to getopendatafvg are recorded here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project
5
+ uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html): 0.x until
6
+ the first stable release, with the public API defined as exactly
7
+ `getopendatafvg.__all__`.
8
+
9
+ Every public name must appear somewhere in this file:
10
+ `tests/test_public_api.py` fails otherwise. A new export therefore needs an
11
+ entry here in the same change.
12
+
13
+ ## [Unreleased]
14
+
15
+ ## [0.2.0] - 2026-11-11
16
+
17
+ ### Added
18
+
19
+ - `fetch_known_dataset`, which dispatches a catalog entry to the right
20
+ client (WFS or portal) so callers no longer branch on `entry.source`.
21
+ - Boundary filtering for portal entries:
22
+ - through `KnownDataset.geometry_column`, using SoQL `within_box`;
23
+ - through `KnownDataset.lon_lat_columns` plus `lon_lat_box_clause`, for
24
+ datasets that store points as numeric longitude/latitude columns.
25
+ - `search_open_data_fvg` and `PortalAsset`, a full-text search over the
26
+ portal's own catalog. It covers every asset type, including the saved
27
+ views (`filter`) that `only=dataset` hides.
28
+ - ISTAT:
29
+ - `fetch_employment_rate` and `FVG_NUTS_AREAS`. The flow has no comune
30
+ granularity, and it uses the pre-2013 NUTS codes (`ITD4`).
31
+ - `fetch_tourism_capacity` (down to comune) and `fetch_tourism_flows`
32
+ (down to province).
33
+ - `fetch_consumer_price_index` (down to province).
34
+ - `fetch_avalanche_sites` and `AvalancheSite`. These merge the
35
+ ground-surveyed and photo-interpreted avalanche layers, grouped by site.
36
+ - Catalog grown from 43 to 94 entries:
37
+ - 32 WFS layers;
38
+ - 9 portal datasets;
39
+ - one example entry per municipal budget family;
40
+ - 7 ARPA FVG air-quality series under a new `aria` category.
41
+ - `docs/upstream-defects.md`, a registry of 19 upstream defects and traps
42
+ with how each is handled. Tests that pin an entry carry a `quirk`
43
+ marker, so `pytest -m quirk` runs them, and a test keeps the registry
44
+ and the markers in step. An opt-in live suite,
45
+ `tests/test_upstream_defects_live.py`, checks that each defect still
46
+ exists upstream.
47
+ - An API reference built with MkDocs and mkdocstrings, published to
48
+ GitHub Pages; CI fails if it does not build cleanly or if a public
49
+ name is missing from it.
50
+ - A release workflow that publishes to PyPI through trusted publishing
51
+ when a GitHub release is published, after checking that the tag
52
+ matches the package version.
53
+ - CI:
54
+ - Python 3.11–3.13 matrix;
55
+ - branch coverage with a 95% floor;
56
+ - a weekly scheduled run of the live catalog checks.
57
+
58
+ ### Changed
59
+
60
+ - The source distribution now contains only the package, its tests, and
61
+ the files needed to cite and build it.
62
+
63
+ ### Deprecated
64
+
65
+ - `fetch_elevation` and `fetch_wikipedia_summary` now emit a
66
+ `DeprecationWarning` and will be removed in 1.0. Neither is specific to
67
+ Friuli Venezia Giulia. Use `DemSampler` or Open-Elevation directly in
68
+ place of the first, and the Wikipedia REST API in place of the second.
69
+
70
+ ### Fixed
71
+
72
+ - Five catalog entries pointed at the wrong WFS workspace, for example
73
+ `IDROGRAF:CORSI_ACQUA` instead of `IRDAT:CORSI_ACQUA`.
74
+
75
+ ## [0.1.0] - 2026-09-15
76
+
77
+ First release of the library, repurposed from an earlier project in this
78
+ repository.
79
+
80
+ ### Added
81
+
82
+ - Satellite imagery:
83
+ - `fetch_sentinel2_scene`, `CdseCredentials`, `Band`, `DEFAULT_BANDS`,
84
+ `Sentinel2Scene`;
85
+ - `fetch_landsat_scene`, `UsgsCredentials`, `LandsatScene`;
86
+ - `NoCleanSceneFoundError`;
87
+ - `sentinel2_scene_date`, `landsat_scene_date`.
88
+ - Indices and rasters: `compute_ndvi`, `compute_nbr`, `compute_lst`,
89
+ `IndexRaster`, `classify_and_vectorize`, `ClassBreak`, `plot_index`.
90
+ - WFS: `fetch_wfs_features`, `fetch_and_clip_wfs_features`,
91
+ `clip_to_boundary`.
92
+ - Open Data FVG portal: `fetch_open_data_fvg`, `within_box_clause`.
93
+ - Catalog: `CATALOG`, `KnownDataset`, `list_known_datasets`,
94
+ `search_known_datasets`, starting with 43 entries.
95
+ - ISTAT SDMX:
96
+ - `fetch_istat_dataflow`, `fetch_population_series`,
97
+ `fetch_demographic_balance`, `fetch_demographic_indicators`,
98
+ `fetch_bank_branches`, `fetch_income_series`;
99
+ - a client-side rate limit;
100
+ - the end-period off-by-one correction.
101
+ - OpenStreetMap: `query_overpass`, `fetch_overpass_elements`,
102
+ `boundary_poly_filter`, `element_point`.
103
+ - Cadastre: `fetch_cadastral_parcels`, `region_parquet_name`.
104
+ - Terrain and geometry:
105
+ - `DemSampler`, `compute_line_slope`, `compute_line_grade`,
106
+ `slope_class_for_value`;
107
+ - `build_coverage_union`, `line_coverage_pct`;
108
+ - `build_pmtiles`, `TippecanoeNotFoundError`.
109
+ - Other sources: `fetch_historical_weather`, `DailyWeather`,
110
+ `fetch_elevation`, `fetch_wikipedia_summary`.
111
+
112
+ [Unreleased]: https://github.com/leoventuroso/getopendatafvg/compare/v0.2.0...HEAD
113
+ [0.2.0]: https://github.com/leoventuroso/getopendatafvg/compare/v0.1.0...v0.2.0
114
+ [0.1.0]: https://github.com/leoventuroso/getopendatafvg/releases/tag/v0.1.0
@@ -0,0 +1,27 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it using the metadata below."
3
+ type: software
4
+ title: "getopendatafvg"
5
+ abstract: >-
6
+ A Python library that extracts open geographic, socio-economic and
7
+ environmental data for a comune or area of Friuli Venezia Giulia (Italy):
8
+ the regional WFS GeoServer and Open Data portal, ISTAT statistics,
9
+ cadastral parcels, OpenStreetMap, and Sentinel-2/Landsat imagery, with
10
+ documented upstream defects handled and tested against the live services.
11
+ authors:
12
+ - family-names: Venturoso
13
+ given-names: Leonardo
14
+ affiliation: "Fraunhofer Italia Research"
15
+ orcid: "https://orcid.org/0000-0001-7789-2412"
16
+ version: 0.2.0
17
+ date-released: 2026-11-11
18
+ license: MIT
19
+ repository-code: "https://github.com/leoventuroso/getopendatafvg"
20
+ url: "https://github.com/leoventuroso/getopendatafvg"
21
+ keywords:
22
+ - open data
23
+ - Friuli Venezia Giulia
24
+ - GIS
25
+ - ISTAT
26
+ - WFS
27
+ - remote sensing
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Leonardo Venturoso
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.