Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 5, 2024
1 parent 3a2684b commit 57378b6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
12 changes: 6 additions & 6 deletions notebooks/chokepoints/red-sea-chokepoints.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1294,12 +1294,12 @@
"outputs": [],
"source": [
"df.loc[:, \"period\"] = \"\"\n",
"df.loc[\n",
" (df.date >= start_reference_date) & (df.date < crisis_date), \"period\"\n",
"] = \"Reference\"\n",
"df.loc[\n",
" (df.date >= conflict_date) & (df.date < crisis_date), \"period\"\n",
"] = \"Middle East Conflict\"\n",
"df.loc[(df.date >= start_reference_date) & (df.date < crisis_date), \"period\"] = (\n",
" \"Reference\"\n",
")\n",
"df.loc[(df.date >= conflict_date) & (df.date < crisis_date), \"period\"] = (\n",
" \"Middle East Conflict\"\n",
")\n",
"df.loc[(df.date >= crisis_date), \"period\"] = \"Red Sea Crisis\""
]
},
Expand Down
12 changes: 6 additions & 6 deletions notebooks/ports/red-sea-ports.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1428,12 +1428,12 @@
"outputs": [],
"source": [
"df.loc[:, \"period\"] = \"\"\n",
"df.loc[\n",
" (df.date >= start_reference_date) & (df.date < crisis_date), \"period\"\n",
"] = \"Reference\"\n",
"df.loc[\n",
" (df.date >= conflict_date) & (df.date < crisis_date), \"period\"\n",
"] = \"Middle East Conflict\"\n",
"df.loc[(df.date >= start_reference_date) & (df.date < crisis_date), \"period\"] = (\n",
" \"Reference\"\n",
")\n",
"df.loc[(df.date >= conflict_date) & (df.date < crisis_date), \"period\"] = (\n",
" \"Middle East Conflict\"\n",
")\n",
"df.loc[(df.date >= crisis_date), \"period\"] = \"Red Sea Crisis\"\n",
"df = df.merge(ports_red_sea[[\"portid\", \"country\"]], on=\"portid\")"
]
Expand Down
24 changes: 12 additions & 12 deletions notebooks/routes/3-process-routes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1735,12 +1735,12 @@
"outputs": [],
"source": [
"df_filt.loc[df_filt.Port == \"Suez Canal\", \"Country\"] = \"Chokepoint Suez Canal\"\n",
"df_filt.loc[\n",
" df_filt.Port == \"Cape of Good Hope\", \"Country\"\n",
"] = \"Chokepoint Cape of Good Hope\"\n",
"df_filt.loc[\n",
" df_filt.Port == \"Bab el-Mandeb Strait\", \"Country\"\n",
"] = \"Chokepoint Bab el-Mandeb Strait\""
"df_filt.loc[df_filt.Port == \"Cape of Good Hope\", \"Country\"] = (\n",
" \"Chokepoint Cape of Good Hope\"\n",
")\n",
"df_filt.loc[df_filt.Port == \"Bab el-Mandeb Strait\", \"Country\"] = (\n",
" \"Chokepoint Bab el-Mandeb Strait\"\n",
")"
]
},
{
Expand All @@ -1750,12 +1750,12 @@
"outputs": [],
"source": [
"df_filt.loc[df_filt.prev_port == \"Suez Canal\", \"prev_country\"] = \"Chokepoint Suez Canal\"\n",
"df_filt.loc[\n",
" df_filt.prev_port == \"Cape of Good Hope\", \"prev_country\"\n",
"] = \"Chokepoint Cape of Good Hope\"\n",
"df_filt.loc[\n",
" df_filt.prev_port == \"Bab el-Mandeb Strait\", \"prev_country\"\n",
"] = \"Chokepoint Bab el-Mandeb Strait\""
"df_filt.loc[df_filt.prev_port == \"Cape of Good Hope\", \"prev_country\"] = (\n",
" \"Chokepoint Cape of Good Hope\"\n",
")\n",
"df_filt.loc[df_filt.prev_port == \"Bab el-Mandeb Strait\", \"prev_country\"] = (\n",
" \"Chokepoint Bab el-Mandeb Strait\"\n",
")"
]
},
{
Expand Down

0 comments on commit 57378b6

Please sign in to comment.