Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions landsat8-cog-ndvi-hvplot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,13 @@
"source": [
"# Merge all acquisitions into a single large Dataset\n",
"datasets = []\n",
"dates = []\n",
"for i,row in df.iterrows():\n",
" try:\n",
" print('loading...', row.date)\n",
" ds = create_multiband_dataset(row)\n",
" datasets.append(ds)\n",
" dates.append(row.date)\n",
" except Exception as e:\n",
" print('ERROR loading, skipping acquistion!')\n",
" print(e)"
Expand All @@ -359,7 +361,7 @@
"outputs": [],
"source": [
"%%time\n",
"DS = xr.concat(datasets, dim=pd.DatetimeIndex(df.date.tolist(), name='time'))\n",
"DS = xr.concat(datasets, dim=pd.DatetimeIndex(dates, name='time'))\n",
"print('Dataset size (Gb): ', DS.nbytes/1e9)"
]
},
Expand Down Expand Up @@ -658,7 +660,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.6.7"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
6 changes: 4 additions & 2 deletions landsat8-cog-ndvi.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -590,11 +590,13 @@
"source": [
"# Merge all acquisitions into a single large Dataset\n",
"datasets = []\n",
"dates = []\n",
"for i,row in df.iterrows():\n",
" try:\n",
" print('loading...', row.date)\n",
" ds = create_multiband_dataset(row)\n",
" datasets.append(ds)\n",
" dates.append(row.date)\n",
" except Exception as e:\n",
" print('ERROR loading, skipping acquistion!')\n",
" print(e)"
Expand Down Expand Up @@ -632,7 +634,7 @@
}
],
"source": [
"DS = xr.concat(datasets, dim=pd.DatetimeIndex(df.date.tolist(), name='time'))\n",
"DS = xr.concat(datasets, dim=pd.DatetimeIndex(dates, name='time'))\n",
"print('Dataset size (Gb): ', DS.nbytes/1e9)\n",
"DS"
]
Expand Down Expand Up @@ -981,7 +983,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.6.7"
}
},
"nbformat": 4,
Expand Down