Skip to content

Commit 98bb0a0

Browse files
committed
updated data file paths
1 parent c91fde0 commit 98bb0a0

15 files changed

Lines changed: 61 additions & 55 deletions

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ _build
33
_static
44

55
#Data
6-
**/data/*
6+
**/data/raster_data/*
77

88
#Extra nbs
99
sentinel1/subste_nbs
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "FeatureCollection",
3+
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::32646" } },
4+
"features": [
5+
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 700132.5, 3300067.5 ], [ 799972.5, 3300067.5 ], [ 799972.5, 3399907.5 ], [ 700132.5, 3399907.5 ], [ 700132.5, 3300067.5 ] ] ] } }
6+
]
7+
}
Binary file not shown.

book/itslive/data/vector_data/single_glacier_vec.json

Lines changed: 7 additions & 0 deletions
Large diffs are not rendered by default.

book/itslive/nbs/1_accessing_itslive_s3_data.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@
572572
"metadata": {
573573
"celltoolbar": "Tags",
574574
"kernelspec": {
575-
"display_name": "Python 3 (ipykernel)",
575+
"display_name": "geospatial_datacube_book_env",
576576
"language": "python",
577577
"name": "python3"
578578
},
@@ -586,7 +586,7 @@
586586
"name": "python",
587587
"nbconvert_exporter": "python",
588588
"pygments_lexer": "ipython3",
589-
"version": "3.13.2"
589+
"version": "3.11.3"
590590
}
591591
},
592592
"nbformat": 4,

book/itslive/nbs/2_larger_than_memory_data.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@
545545
],
546546
"metadata": {
547547
"kernelspec": {
548-
"display_name": "Python 3 (ipykernel)",
548+
"display_name": "geospatial_datacube_book_env",
549549
"language": "python",
550550
"name": "python3"
551551
},
@@ -559,7 +559,7 @@
559559
"name": "python",
560560
"nbconvert_exporter": "python",
561561
"pygments_lexer": "ipython3",
562-
"version": "3.13.2"
562+
"version": "3.11.3"
563563
}
564564
},
565565
"nbformat": 4,

book/itslive/nbs/3_combining_raster_vector_data.ipynb

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@
296296
"metadata": {},
297297
"outputs": [],
298298
"source": [
299-
"se_asia = gpd.read_parquet(\"../data/rgi7_region15_south_asia_east.parquet\")"
299+
"se_asia = gpd.read_parquet(\"../data/vector_data/rgi7_region15_south_asia_east.parquet\")"
300300
]
301301
},
302302
{
@@ -484,7 +484,7 @@
484484
"metadata": {},
485485
"outputs": [],
486486
"source": [
487-
"bbox_dc.to_file(\"../data/bbox_dc.geojson\")"
487+
"bbox_dc.to_file(\"../data/vector_data/bbox_dc.geojson\")"
488488
]
489489
},
490490
{
@@ -623,8 +623,7 @@
623623
"cell_type": "markdown",
624624
"metadata": {},
625625
"source": [
626-
"TODO\n",
627-
"2/26 running this i got a ClientResponseError:500 when trying to write to zarr. Added in above two steps and it worked, not entirely sure why? if keep these in, add explanation."
626+
"Now, let's try to write the object as a Zarr group."
628627
]
629628
},
630629
{
@@ -634,17 +633,10 @@
634633
"outputs": [],
635634
"source": [
636635
"single_glacier_raster.drop_encoding().to_zarr(\n",
637-
" \"../data/single_glacier_itslive.zarr\", mode=\"w\"\n",
636+
" \"../data/raster_data/single_glacier_itslive.zarr\", mode=\"w\"\n",
638637
")"
639638
]
640639
},
641-
{
642-
"cell_type": "markdown",
643-
"metadata": {},
644-
"source": [
645-
"Now, let's try to write the object as a Zarr group."
646-
]
647-
},
648640
{
649641
"cell_type": "markdown",
650642
"metadata": {},
@@ -657,7 +649,7 @@
657649
],
658650
"metadata": {
659651
"kernelspec": {
660-
"display_name": "Python 3 (ipykernel)",
652+
"display_name": "geospatial_datacube_book_env",
661653
"language": "python",
662654
"name": "python3"
663655
},
@@ -671,7 +663,7 @@
671663
"name": "python",
672664
"nbconvert_exporter": "python",
673665
"pygments_lexer": "ipython3",
674-
"version": "3.13.2"
666+
"version": "3.11.3"
675667
}
676668
},
677669
"nbformat": 4,

book/itslive/nbs/4_exploratory_data_analysis_single.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@
154154
"source": [
155155
"# Read raster\n",
156156
"single_glacier_raster = xr.open_zarr(\n",
157-
" \"../data/single_glacier_itslive.zarr\", decode_coords=\"all\"\n",
157+
" \"../data/raster_data/single_glacier_itslive.zarr\", decode_coords=\"all\"\n",
158158
")\n",
159159
"# Read vector\n",
160-
"single_glacier_vector = gpd.read_file(\"../data/single_glacier_vec.json\")"
160+
"single_glacier_vector = gpd.read_file(\"../data/vector_data/single_glacier_vec.json\")"
161161
]
162162
},
163163
{
@@ -1373,7 +1373,7 @@
13731373
"metadata": {
13741374
"celltoolbar": "Tags",
13751375
"kernelspec": {
1376-
"display_name": "Python 3 (ipykernel)",
1376+
"display_name": "geospatial_datacube_book_env",
13771377
"language": "python",
13781378
"name": "python3"
13791379
},
@@ -1387,7 +1387,7 @@
13871387
"name": "python",
13881388
"nbconvert_exporter": "python",
13891389
"pygments_lexer": "ipython3",
1390-
"version": "3.13.2"
1390+
"version": "3.11.3"
13911391
}
13921392
},
13931393
"nbformat": 4,

book/itslive/nbs/5_exploratory_data_analysis_group.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@
255255
"metadata": {},
256256
"outputs": [],
257257
"source": [
258-
"se_asia = gpd.read_parquet(\"../data/rgi7_region15_south_asia_east.parquet\")\n",
258+
"se_asia = gpd.read_parquet(\"../data/vector_data/rgi7_region15_south_asia_east.parquet\")\n",
259259
"\n",
260260
"se_asia.head(3)"
261261
]
@@ -516,7 +516,7 @@
516516
" ```python\n",
517517
" with ProgressBar():\n",
518518
"\n",
519-
" encoded_vdc.to_zarr('../data/regional_glacier_velocity_vector_cube.zarr', mode='w')\n",
519+
" encoded_vdc.to_zarr('../data/raster_data/regional_glacier_velocity_vector_cube.zarr', mode='w')\n",
520520
" ```\n",
521521
" Output:\n",
522522
" [########################################] | 100% Completed | 12m 15s"
@@ -548,7 +548,7 @@
548548
"outputs": [],
549549
"source": [
550550
"vector_data_cube_cf = xr.open_zarr(\n",
551-
" os.path.join(tutorial1_dir, \"data/regional_glacier_velocity_vector_cube.zarr\")\n",
551+
" os.path.join(tutorial1_dir, \"data/raster_data/regional_glacier_velocity_vector_cube.zarr\")\n",
552552
")\n",
553553
"vector_data_cube = vector_data_cube_cf.xvec.decode_cf().compute()"
554554
]
@@ -663,7 +663,7 @@
663663
],
664664
"metadata": {
665665
"kernelspec": {
666-
"display_name": "Python 3 (ipykernel)",
666+
"display_name": "geospatial_datacube_book_env",
667667
"language": "python",
668668
"name": "python3"
669669
},
@@ -677,7 +677,7 @@
677677
"name": "python",
678678
"nbconvert_exporter": "python",
679679
"pygments_lexer": "ipython3",
680-
"version": "3.13.2"
680+
"version": "3.11.3"
681681
}
682682
},
683683
"nbformat": 4,

book/sentinel1/nbs/1_read_asf_data.ipynb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
"outputs": [],
180180
"source": [
181181
"timeseries_type = \"full\"\n",
182-
"path_to_rtcs = f\"data/{timeseries_type}_timeseries/asf_rtcs\"\n"
182+
"path_to_rtcs = f\"data/raster_data/{timeseries_type}_timeseries/asf_rtcs\"\n"
183183
]
184184
},
185185
{
@@ -407,8 +407,8 @@
407407
" \"\"\"Function to create VRT files for each variable given a\n",
408408
" list of file paths fo that variable.\"\"\"\n",
409409
"\n",
410-
" full_timeseries_data = '../data/full_timeseries'\n",
411-
" subset_timeseries_data = '../data/subset_timeseries'\n",
410+
" full_timeseries_data = '../data/raster_data/full_timeseries'\n",
411+
" subset_timeseries_data = '../data/raster_data/subset_timeseries'\n",
412412
"\n",
413413
" if timeseries_type == 'full':\n",
414414
" data_path = full_timeseries_data\n",
@@ -473,9 +473,9 @@
473473
"metadata": {},
474474
"outputs": [],
475475
"source": [
476-
"ds_vv = xr.open_dataset(f\"../data/{timeseries_type}_timeseries/vrt_files/s1_stack_vv.vrt\", chunks=\"auto\")\n",
477-
"ds_vh = xr.open_dataset(f\"../data/{timeseries_type}_timeseries/vrt_files/s1_stack_vh.vrt\", chunks=\"auto\")\n",
478-
"ds_ls = xr.open_dataset(f\"../data/{timeseries_type}_timeseries/vrt_files/s1_stack_ls_map.vrt\", chunks=\"auto\")"
476+
"ds_vv = xr.open_dataset(f\"../data/raster_data/{timeseries_type}_timeseries/vrt_files/s1_stack_vv.vrt\", chunks=\"auto\")\n",
477+
"ds_vh = xr.open_dataset(f\"../data/raster_data/{timeseries_type}_timeseries/vrt_files/s1_stack_vh.vrt\", chunks=\"auto\")\n",
478+
"ds_ls = xr.open_dataset(f\"../data/raster_data/{timeseries_type}_timeseries/vrt_files/s1_stack_ls_map.vrt\", chunks=\"auto\")"
479479
]
480480
},
481481
{
@@ -518,7 +518,7 @@
518518
],
519519
"metadata": {
520520
"kernelspec": {
521-
"display_name": "Python 3 (ipykernel)",
521+
"display_name": "geospatial_datacube_book_env",
522522
"language": "python",
523523
"name": "python3"
524524
},
@@ -532,7 +532,7 @@
532532
"name": "python",
533533
"nbconvert_exporter": "python",
534534
"pygments_lexer": "ipython3",
535-
"version": "3.13.2"
535+
"version": "3.11.3"
536536
},
537537
"widgets": {
538538
"application/vnd.jupyter.widget-state+json": {

0 commit comments

Comments
 (0)