Skip to content

Commit

Permalink
Merge pull request #40 from Vizzuality/data/update-statistic-table
Browse files Browse the repository at this point in the history
add evapotranspiration data
  • Loading branch information
ikerey authored Nov 28, 2024
2 parents 5528674 + 8d0a117 commit 552d5e0
Showing 1 changed file with 33 additions and 48 deletions.
81 changes: 33 additions & 48 deletions data-processing/notebooks/04_prepare_tabular_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -117,7 +117,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -158,22 +158,22 @@
"name": "stdout",
"output_type": "stream",
"text": [
"{'Agricultural drought exposure': <datasets.datasets.Dataset object at 0x7f6f4aff5670>,\n",
" 'Agricultural drought hazard': <datasets.datasets.Dataset object at 0x7f6e89fdb3b0>,\n",
" 'Boundaries': <datasets.datasets.Dataset object at 0x7f6f63f0ffe0>,\n",
" 'Contextual layers': <datasets.datasets.Dataset object at 0x7f6e89b324e0>,\n",
" 'EO-based flood exposure': <datasets.datasets.Dataset object at 0x7f6e89b32870>,\n",
" 'EO-based flood hazard': <datasets.datasets.Dataset object at 0x7f6e89b329f0>,\n",
" 'Hydrographic data': <datasets.datasets.Dataset object at 0x7f6e89b328a0>,\n",
" 'Hydrometeorological Data': <datasets.datasets.Dataset object at 0x7f6e89b328d0>,\n",
" 'In-situ Data': <datasets.datasets.Dataset object at 0x7f6e89b32a80>,\n",
" 'Meteorological drought exposure': <datasets.datasets.Dataset object at 0x7f6e89b32ab0>,\n",
" 'Meteorological drought hazard': <datasets.datasets.Dataset object at 0x7f6e89b32ae0>,\n",
" 'Model-based flood exposure': <datasets.datasets.Dataset object at 0x7f6e89b32b10>,\n",
" 'Model-based flood hazard': <datasets.datasets.Dataset object at 0x7f6e89b32b40>,\n",
" 'Populated infrastructures': <datasets.datasets.Dataset object at 0x7f6e89b32b70>,\n",
" 'Transportation Network Infrastructures': <datasets.datasets.Dataset object at 0x7f6e89b32ba0>,\n",
" 'Water-related infrastructures': <datasets.datasets.Dataset object at 0x7f6e89b32bd0>}\n"
"{'Agricultural drought exposure': <datasets.datasets.Dataset object at 0x7f79df77a3f0>,\n",
" 'Agricultural drought hazard': <datasets.datasets.Dataset object at 0x7f79df77a420>,\n",
" 'Boundaries': <datasets.datasets.Dataset object at 0x7f79df77a480>,\n",
" 'Contextual layers': <datasets.datasets.Dataset object at 0x7f79df77a540>,\n",
" 'EO-based flood exposure': <datasets.datasets.Dataset object at 0x7f79df77a600>,\n",
" 'EO-based flood hazard': <datasets.datasets.Dataset object at 0x7f79df77a4b0>,\n",
" 'Hydrographic data': <datasets.datasets.Dataset object at 0x7f79df77a4e0>,\n",
" 'Hydrometeorological Data': <datasets.datasets.Dataset object at 0x7f79df77a690>,\n",
" 'In-situ Data': <datasets.datasets.Dataset object at 0x7f79df77a6c0>,\n",
" 'Meteorological drought exposure': <datasets.datasets.Dataset object at 0x7f79df77a6f0>,\n",
" 'Meteorological drought hazard': <datasets.datasets.Dataset object at 0x7f79df77a720>,\n",
" 'Model-based flood exposure': <datasets.datasets.Dataset object at 0x7f79df77a750>,\n",
" 'Model-based flood hazard': <datasets.datasets.Dataset object at 0x7f79df77a780>,\n",
" 'Populated infrastructures': <datasets.datasets.Dataset object at 0x7f79df77a7b0>,\n",
" 'Transportation Network Infrastructures': <datasets.datasets.Dataset object at 0x7f79df77a7e0>,\n",
" 'Water-related infrastructures': <datasets.datasets.Dataset object at 0x7f79df77a810>}\n"
]
}
],
Expand All @@ -197,11 +197,11 @@
{
"data": {
"text/plain": [
"{'Administrative Boundaries - adm0': <datasets.datasets.Layer at 0x7f6e89b333e0>,\n",
" 'Administrative Boundaries - adm1': <datasets.datasets.Layer at 0x7f6e89b33380>,\n",
" 'Administrative Boundaries - adm2': <datasets.datasets.Layer at 0x7f6e89b334a0>,\n",
" 'Administrative Boundaries - adm3': <datasets.datasets.Layer at 0x7f6e89b33500>,\n",
" 'Hydrological Basins': <datasets.datasets.Layer at 0x7f6e89b33560>}"
"{'Administrative Boundaries - adm0': <datasets.datasets.Layer at 0x7f79df77a930>,\n",
" 'Administrative Boundaries - adm1': <datasets.datasets.Layer at 0x7f79df77a840>,\n",
" 'Administrative Boundaries - adm2': <datasets.datasets.Layer at 0x7f79df77b110>,\n",
" 'Administrative Boundaries - adm3': <datasets.datasets.Layer at 0x7f79df77b140>,\n",
" 'Hydrological Basins': <datasets.datasets.Layer at 0x7f79df77b1a0>}"
]
},
"execution_count": 4,
Expand Down Expand Up @@ -335,7 +335,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -352,34 +352,19 @@
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[52]"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"keys_to_remove = [\"Evapotranspiration\"]\n",
"[layer_ids.pop(key, None) for key in keys_to_remove]"
]
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Processing Evapotranspiration\n",
"Processing Administrative Boundaries - adm0\n",
"Processing Administrative Boundaries - adm1\n",
"Processing Administrative Boundaries - adm2\n",
"Processing Administrative Boundaries - adm3\n",
"Processing Hydrological Basins\n",
"Processing Precipitation\n",
"Processing Administrative Boundaries - adm0\n",
"Processing Administrative Boundaries - adm1\n",
Expand Down Expand Up @@ -474,7 +459,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand All @@ -493,7 +478,7 @@
"# Initialize the JSON structure\n",
"json_data = {\"version\": 2, \"data\": {\"api::chart-data.chart-data\": {}}}\n",
"\n",
"chart_id = 43027\n",
"chart_id = 53143\n",
"for name, folder_path in folder_paths.items():\n",
" # List all the blobs in the specified folder\n",
" bucket = client.get_bucket(bucket_name)\n",
Expand Down

0 comments on commit 552d5e0

Please sign in to comment.