datablob 0.9.1__tar.gz → 0.9.3__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.
- {datablob-0.9.1 → datablob-0.9.3}/PKG-INFO +1 -1
- {datablob-0.9.1 → datablob-0.9.3}/datablob/__init__.py +10 -10
- {datablob-0.9.1 → datablob-0.9.3}/datablob.egg-info/PKG-INFO +1 -1
- {datablob-0.9.1 → datablob-0.9.3}/setup.py +1 -1
- {datablob-0.9.1 → datablob-0.9.3}/LICENSE +0 -0
- {datablob-0.9.1 → datablob-0.9.3}/README.md +0 -0
- {datablob-0.9.1 → datablob-0.9.3}/datablob.egg-info/SOURCES.txt +0 -0
- {datablob-0.9.1 → datablob-0.9.3}/datablob.egg-info/dependency_links.txt +0 -0
- {datablob-0.9.1 → datablob-0.9.3}/datablob.egg-info/requires.txt +0 -0
- {datablob-0.9.1 → datablob-0.9.3}/datablob.egg-info/top_level.txt +0 -0
- {datablob-0.9.1 → datablob-0.9.3}/setup.cfg +0 -0
|
@@ -11,7 +11,6 @@ import pandas as pd
|
|
|
11
11
|
from shapely.geometry import shape
|
|
12
12
|
import tempfile
|
|
13
13
|
import tzdata
|
|
14
|
-
from typing import Optional
|
|
15
14
|
import zipfile
|
|
16
15
|
from zoneinfo import ZoneInfo
|
|
17
16
|
|
|
@@ -417,17 +416,17 @@ class DataBlobClient:
|
|
|
417
416
|
name: str,
|
|
418
417
|
version: str,
|
|
419
418
|
data: list[dict],
|
|
420
|
-
column_names:
|
|
421
|
-
description:
|
|
422
|
-
polygon_key:
|
|
423
|
-
latitude_key:
|
|
424
|
-
longitude_key:
|
|
419
|
+
column_names: list[str] | None = None,
|
|
420
|
+
description: str | None = None,
|
|
421
|
+
polygon_key: str | None = None,
|
|
422
|
+
latitude_key: str | None = None,
|
|
423
|
+
longitude_key: str | None = None,
|
|
425
424
|
json: bool = True,
|
|
426
425
|
jsonl: bool = True,
|
|
427
426
|
geojson: bool = True,
|
|
428
427
|
parquet: bool = True,
|
|
429
428
|
xlsx: bool = False,
|
|
430
|
-
xlsx_data_types:
|
|
429
|
+
xlsx_data_types: list[str] | None = None,
|
|
431
430
|
):
|
|
432
431
|
lastUpdated = dict(
|
|
433
432
|
[(tz, datetime.now(ZoneInfo(tz)).isoformat()) for tz in self.timezones]
|
|
@@ -468,7 +467,7 @@ class DataBlobClient:
|
|
|
468
467
|
crs="EPSG:4326",
|
|
469
468
|
)
|
|
470
469
|
# drops polygonal column that we don't use in shapefile output
|
|
471
|
-
if polygon_key:
|
|
470
|
+
if polygon_key and polygon_key != "geometry":
|
|
472
471
|
gdf.drop(columns=[polygon_key], inplace=True)
|
|
473
472
|
buffer = io.BytesIO()
|
|
474
473
|
gdf.to_parquet(buffer, engine="pyarrow")
|
|
@@ -492,8 +491,9 @@ class DataBlobClient:
|
|
|
492
491
|
crs="EPSG:4326",
|
|
493
492
|
)
|
|
494
493
|
|
|
495
|
-
|
|
496
|
-
|
|
494
|
+
if polygon_key != "geometry":
|
|
495
|
+
# can drop old polygon column, since we replaced with a geometry column
|
|
496
|
+
gdf.drop(columns=[polygon_key], inplace=True)
|
|
497
497
|
|
|
498
498
|
buffer = io.BytesIO()
|
|
499
499
|
gdf.to_parquet(buffer, engine="pyarrow")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|