Skip to content

Commit

Permalink
deploy: 26a9a52
Browse files Browse the repository at this point in the history
  • Loading branch information
SahitiSarva committed Feb 28, 2024
1 parent 89a515a commit 2309e43
Show file tree
Hide file tree
Showing 20 changed files with 5,277 additions and 143 deletions.
6 changes: 4 additions & 2 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<link rel="next" title="Introduction to Data Goods" href="docs/1-intro-to-data-goods.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
<meta name="docbuild:last-update" content="Feb 27, 2024"/>
<meta name="docbuild:last-update" content="Feb 28, 2024"/>
</head>


Expand Down Expand Up @@ -194,10 +194,12 @@
<li class="toctree-l2"><a class="reference internal" href="notebooks/ports/red-sea-ports.html">Ports Notebook</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/conflict/acled.html">Conflict Location and Trends Monitor</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Insights and Indicators</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="docs/4-sample-insights-and-ind.html">Insights, Indicators, and Data Sources: Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/indicators/conflict-and-trade.html">Shipping and Conflict</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Acknowledgements</span></p>
<ul class="nav bd-sidenav">
Expand Down Expand Up @@ -572,7 +574,7 @@ <h2>License<a class="headerlink" href="#license" title="Permalink to this headin

<div class="footer-item">
<p class="last-updated">
Last updated on Feb 27, 2024.
Last updated on Feb 28, 2024.
<br/>
</p>
</div>
Expand Down
57 changes: 38 additions & 19 deletions _sources/notebooks/chokepoints/red-sea-chokepoints.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
"\n",
"plotnine.options.figure_size = (10, 8)\n",
"\n",
"output_dir = r\"C:\\Users\\WB514197\\WBG\\Development Data Partnership - Red Sea Maritime Monitoring\"\n",
"output_dir = (\n",
" r\"C:\\Users\\WB514197\\WBG\\Development Data Partnership - Red Sea Maritime Monitoring\"\n",
")\n",
"charts_dir = join(git_root, \"reports\")"
]
},
Expand Down Expand Up @@ -256,8 +258,12 @@
"metadata": {},
"outputs": [],
"source": [
"chokepoints_sel.loc[:, \"geometry\"] = chokepoints_sel.apply(lambda x: Point(x.lon, x.lat), axis=1)\n",
"chokepoints_sel = gpd.GeoDataFrame(chokepoints_sel, geometry='geometry', crs='EPSG:4326')\n",
"chokepoints_sel.loc[:, \"geometry\"] = chokepoints_sel.apply(\n",
" lambda x: Point(x.lon, x.lat), axis=1\n",
")\n",
"chokepoints_sel = gpd.GeoDataFrame(\n",
" chokepoints_sel, geometry=\"geometry\", crs=\"EPSG:4326\"\n",
")\n",
"# chokepoints_sel.to_file(join(output_dir, \"chokepoints.shp\"), driver='ESRI Shapefile')"
]
},
Expand Down Expand Up @@ -538,18 +544,27 @@
}
],
"source": [
"chokepoints_sel[[\n",
" 'geometry', 'portname', 'vessel_count_total', 'vessel_count_container',\n",
" 'vessel_count_dry_bulk', 'vessel_count_general_cargo',\n",
" 'vessel_count_RoRo', 'vessel_count_tanker', 'industry_top1',\n",
" 'industry_top2', 'industry_top3'\n",
" ]].explore(\n",
" column='portname',\n",
" cmap = 'Dark2',\n",
" marker_kwds= {'radius': 15},\n",
" tiles = 'Esri Ocean Basemap',\n",
" legend_kwds={'loc': 'upper right', 'caption': 'Choke Points'}\n",
" )"
"chokepoints_sel[\n",
" [\n",
" \"geometry\",\n",
" \"portname\",\n",
" \"vessel_count_total\",\n",
" \"vessel_count_container\",\n",
" \"vessel_count_dry_bulk\",\n",
" \"vessel_count_general_cargo\",\n",
" \"vessel_count_RoRo\",\n",
" \"vessel_count_tanker\",\n",
" \"industry_top1\",\n",
" \"industry_top2\",\n",
" \"industry_top3\",\n",
" ]\n",
"].explore(\n",
" column=\"portname\",\n",
" cmap=\"Dark2\",\n",
" marker_kwds={\"radius\": 15},\n",
" tiles=\"Esri Ocean Basemap\",\n",
" legend_kwds={\"loc\": \"upper right\", \"caption\": \"Choke Points\"},\n",
")"
]
},
{
Expand Down Expand Up @@ -594,7 +609,9 @@
"outputs": [],
"source": [
"# df = pd.read_csv(join(output_dir, f'chokepoints_data_{time.strftime(\"%m_%d_%Y\")}.csv'))\n",
"df = pd.read_csv(join(output_dir, 'data', 'PortWatch-data', \"chokepoints_data_02_26_2024.csv\"))\n",
"df = pd.read_csv(\n",
" join(output_dir, \"data\", \"PortWatch-data\", \"chokepoints_data_02_26_2024.csv\")\n",
")\n",
"df.date = pd.to_datetime(df.date)\n",
"df = df.loc[df.date >= \"2019-01-01\"].copy()"
]
Expand Down Expand Up @@ -1595,9 +1612,11 @@
"metadata": {},
"outputs": [],
"source": [
"with pd.ExcelWriter(join(output_dir, \"tables\", \"summary-tables-chokepoints.xlsx\")) as writer: \n",
" table.to_excel(writer, sheet_name='Chokepoints Summary')\n",
" df_agg_pct.to_excel(writer, sheet_name='Chokepoints % Change')"
"with pd.ExcelWriter(\n",
" join(output_dir, \"tables\", \"summary-tables-chokepoints.xlsx\")\n",
") as writer:\n",
" table.to_excel(writer, sheet_name=\"Chokepoints Summary\")\n",
" df_agg_pct.to_excel(writer, sheet_name=\"Chokepoints % Change\")"
]
}
],
Expand Down
1,418 changes: 1,418 additions & 0 deletions _sources/notebooks/conflict/acled.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 2309e43

Please sign in to comment.