ssb-sgis 1.2.14__tar.gz → 1.2.15__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.
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/PKG-INFO +25 -10
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/README.md +24 -9
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/pyproject.toml +1 -1
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/io/dapla_functions.py +11 -1
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/maps/legend.py +1 -1
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/LICENSE +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/__init__.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/conf.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/debug_config.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/exceptions.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/__init__.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/bounds.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/buffer_dissolve_explode.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/centerlines.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/cleaning.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/conversion.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/duplicates.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/general.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/geocoding.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/geometry_types.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/neighbors.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/overlay.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/point_operations.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/polygon_operations.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/polygons_as_rings.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/runners.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/sfilter.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/geopandas_tools/utils.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/helpers.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/io/__init__.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/io/_is_dapla.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/io/opener.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/io/read_parquet.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/maps/__init__.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/maps/examine.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/maps/explore.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/maps/httpserver.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/maps/map.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/maps/maps.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/maps/norge_i_bilder.json +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/maps/thematicmap.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/maps/tilesources.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/maps/wms.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/networkanalysis/__init__.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/networkanalysis/_get_route.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/networkanalysis/_od_cost_matrix.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/networkanalysis/_points.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/networkanalysis/_service_area.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/networkanalysis/closing_network_holes.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/networkanalysis/cutting_lines.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/networkanalysis/directednetwork.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/networkanalysis/finding_isolated_networks.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/networkanalysis/network.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/networkanalysis/networkanalysis.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/networkanalysis/networkanalysisrules.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/networkanalysis/nodes.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/networkanalysis/traveling_salesman.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/parallel/__init__.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/parallel/parallel.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/py.typed +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/raster/__init__.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/raster/base.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/raster/image_collection.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/raster/indices.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/raster/regex.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/raster/sentinel_config.py +0 -0
- {ssb_sgis-1.2.14 → ssb_sgis-1.2.15}/src/sgis/raster/zonal.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ssb-sgis
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.15
|
|
4
4
|
Summary: GIS functions used at Statistics Norway.
|
|
5
5
|
Home-page: https://github.com/statisticsnorway/ssb-sgis
|
|
6
6
|
License: MIT
|
|
@@ -182,9 +182,13 @@ weights["weight"] = 10
|
|
|
182
182
|
frequencies = nwa.get_route_frequencies(origins, destinations, weight_df=weights)
|
|
183
183
|
|
|
184
184
|
# plot the results
|
|
185
|
-
m = sg.ThematicMap(
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
m = sg.ThematicMap(
|
|
186
|
+
sg.buff(frequencies, 15),
|
|
187
|
+
column="frequency",
|
|
188
|
+
black=True,
|
|
189
|
+
cmap="plasma",
|
|
190
|
+
title="Number of times each road was used,\nweighted * 10",
|
|
191
|
+
)
|
|
188
192
|
m.plot()
|
|
189
193
|
```
|
|
190
194
|
|
|
@@ -199,9 +203,14 @@ service_areas = nwa.service_area(
|
|
|
199
203
|
)
|
|
200
204
|
|
|
201
205
|
# plot the results
|
|
202
|
-
m = sg.ThematicMap(
|
|
203
|
-
|
|
204
|
-
|
|
206
|
+
m = sg.ThematicMap(
|
|
207
|
+
service_areas,
|
|
208
|
+
column="minutes",
|
|
209
|
+
black=True,
|
|
210
|
+
size=10,
|
|
211
|
+
k=10,
|
|
212
|
+
title="Roads that can be reached within 1 to 10 minutes",
|
|
213
|
+
)
|
|
205
214
|
m.plot()
|
|
206
215
|
```
|
|
207
216
|
|
|
@@ -214,9 +223,15 @@ routes = nwa.get_k_routes(
|
|
|
214
223
|
points.iloc[[0]], points.iloc[[1]], k=4, drop_middle_percent=50
|
|
215
224
|
)
|
|
216
225
|
|
|
217
|
-
m = sg.ThematicMap(
|
|
218
|
-
|
|
219
|
-
|
|
226
|
+
m = sg.ThematicMap(
|
|
227
|
+
sg.buff(routes, 15),
|
|
228
|
+
column="k",
|
|
229
|
+
black=True,
|
|
230
|
+
title="Four fastest routes from A to B",
|
|
231
|
+
legend_kwargs=dict(
|
|
232
|
+
title="Rank",
|
|
233
|
+
),
|
|
234
|
+
)
|
|
220
235
|
m.plot()
|
|
221
236
|
```
|
|
222
237
|
|
|
@@ -126,9 +126,13 @@ weights["weight"] = 10
|
|
|
126
126
|
frequencies = nwa.get_route_frequencies(origins, destinations, weight_df=weights)
|
|
127
127
|
|
|
128
128
|
# plot the results
|
|
129
|
-
m = sg.ThematicMap(
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
m = sg.ThematicMap(
|
|
130
|
+
sg.buff(frequencies, 15),
|
|
131
|
+
column="frequency",
|
|
132
|
+
black=True,
|
|
133
|
+
cmap="plasma",
|
|
134
|
+
title="Number of times each road was used,\nweighted * 10",
|
|
135
|
+
)
|
|
132
136
|
m.plot()
|
|
133
137
|
```
|
|
134
138
|
|
|
@@ -143,9 +147,14 @@ service_areas = nwa.service_area(
|
|
|
143
147
|
)
|
|
144
148
|
|
|
145
149
|
# plot the results
|
|
146
|
-
m = sg.ThematicMap(
|
|
147
|
-
|
|
148
|
-
|
|
150
|
+
m = sg.ThematicMap(
|
|
151
|
+
service_areas,
|
|
152
|
+
column="minutes",
|
|
153
|
+
black=True,
|
|
154
|
+
size=10,
|
|
155
|
+
k=10,
|
|
156
|
+
title="Roads that can be reached within 1 to 10 minutes",
|
|
157
|
+
)
|
|
149
158
|
m.plot()
|
|
150
159
|
```
|
|
151
160
|
|
|
@@ -158,9 +167,15 @@ routes = nwa.get_k_routes(
|
|
|
158
167
|
points.iloc[[0]], points.iloc[[1]], k=4, drop_middle_percent=50
|
|
159
168
|
)
|
|
160
169
|
|
|
161
|
-
m = sg.ThematicMap(
|
|
162
|
-
|
|
163
|
-
|
|
170
|
+
m = sg.ThematicMap(
|
|
171
|
+
sg.buff(routes, 15),
|
|
172
|
+
column="k",
|
|
173
|
+
black=True,
|
|
174
|
+
title="Four fastest routes from A to B",
|
|
175
|
+
legend_kwargs=dict(
|
|
176
|
+
title="Rank",
|
|
177
|
+
),
|
|
178
|
+
)
|
|
164
179
|
m.plot()
|
|
165
180
|
```
|
|
166
181
|
|
|
@@ -92,7 +92,11 @@ def read_geopandas(
|
|
|
92
92
|
if isinstance(gcs_path, (Path | os.PathLike)):
|
|
93
93
|
gcs_path = str(gcs_path)
|
|
94
94
|
|
|
95
|
-
if
|
|
95
|
+
if isinstance(gcs_path, str):
|
|
96
|
+
gcs_path = _maybe_strip_prefix(gcs_path, file_system)
|
|
97
|
+
else:
|
|
98
|
+
gcs_path = [_maybe_strip_prefix(str(path), file_system) for path in gcs_path]
|
|
99
|
+
|
|
96
100
|
return _read_geopandas_from_iterable(
|
|
97
101
|
gcs_path,
|
|
98
102
|
mask=mask,
|
|
@@ -925,3 +929,9 @@ def _get_files_in_subfolders(folderinfo: list[dict]) -> list[tuple]:
|
|
|
925
929
|
folderinfo = new_folderinfo
|
|
926
930
|
|
|
927
931
|
return fileinfo
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
def _maybe_strip_prefix(path, file_system):
|
|
935
|
+
if isinstance(file_system, GCSFileSystem) and path.startswith("gs://"):
|
|
936
|
+
return path.replace("gs://", "")
|
|
937
|
+
return path
|
|
@@ -523,7 +523,7 @@ class ContinousLegend(Legend):
|
|
|
523
523
|
def __init__(
|
|
524
524
|
self,
|
|
525
525
|
labels: list[str] | None = None,
|
|
526
|
-
pretty_labels: bool =
|
|
526
|
+
pretty_labels: bool = False,
|
|
527
527
|
label_suffix: str | None = None,
|
|
528
528
|
label_sep: str = "-",
|
|
529
529
|
rounding: int | None = None,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|