Skip to content

Commit

Permalink
downloaded updated version of hydat database
Browse files Browse the repository at this point in the history
  • Loading branch information
wknoben committed Aug 2, 2023
1 parent e2ed7ec commit 88f9c05
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"id": "ac6e3ce1",
"metadata": {},
"outputs": [],
Expand All @@ -96,15 +96,15 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"id": "e761bcbe",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Successfully downloaded https://collaboration.cmc.ec.gc.ca/cmc/hydrometrics/www/Hydat_sqlite3_20220721.zip\n",
"Successfully downloaded https://collaboration.cmc.ec.gc.ca/cmc/hydrometrics/www/Hydat_sqlite3_20230505.zip\n",
"Successfully downloaded https://collaboration.cmc.ec.gc.ca/cmc/hydrometrics/www/HYDAT_Definition_EN.pdf\n"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 5,
"id": "2ec73ac7",
"metadata": {},
"outputs": [],
Expand All @@ -34,7 +34,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 6,
"id": "0bd4a19f",
"metadata": {},
"outputs": [],
Expand All @@ -45,7 +45,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 7,
"id": "4855e428",
"metadata": {},
"outputs": [],
Expand All @@ -67,7 +67,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 8,
"id": "4fa8ede1",
"metadata": {},
"outputs": [],
Expand All @@ -78,19 +78,29 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 21,
"id": "f3830949",
"metadata": {},
"outputs": [],
"source": [
"# Find the HYDAT database. Assumes only 1 sqlite3 database exists\n",
"hydat_db_name = sorted(data_folder.glob('*.sqlite3'))[0]"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "261976aa",
"metadata": {},
"outputs": [],
"source": [
"# Make the file name\n",
"hydat_db_name = hydat_url.split('/')[-1].strip().replace('.zip','.sqlite3')\n",
"hydat_csv_name = hydat_db_name.replace('.sqlite3','_RHBN_2020_subset.csv')"
"hydat_csv_name = hydat_url.split('/')[-1].strip().replace('.zip','_RHBN_2020_subset.csv')"
]
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 18,
"id": "929785e2",
"metadata": {},
"outputs": [],
Expand All @@ -109,7 +119,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 24,
"id": "ddca6e60",
"metadata": {},
"outputs": [],
Expand All @@ -120,7 +130,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 25,
"id": "74966da2",
"metadata": {},
"outputs": [],
Expand All @@ -131,7 +141,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 26,
"id": "54ab70c1",
"metadata": {},
"outputs": [],
Expand All @@ -145,7 +155,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 27,
"id": "d5d4a292",
"metadata": {},
"outputs": [],
Expand All @@ -156,7 +166,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 28,
"id": "fdef2abe",
"metadata": {},
"outputs": [],
Expand All @@ -167,7 +177,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 29,
"id": "a29ba8d1",
"metadata": {},
"outputs": [
Expand All @@ -186,7 +196,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 32,
"id": "96658ada",
"metadata": {},
"outputs": [],
Expand All @@ -197,7 +207,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 33,
"id": "d5a66592",
"metadata": {},
"outputs": [],
Expand All @@ -213,7 +223,7 @@
"metadata": {},
"outputs": [],
"source": [
"# if needed: remove larger databse file"
"# We'll keep the larger database for the moment, because we want to get flow observations out of it later"
]
},
{
Expand Down

0 comments on commit 88f9c05

Please sign in to comment.