Skip to content

Commit

Permalink
deploy: 9973200
Browse files Browse the repository at this point in the history
  • Loading branch information
SahitiSarva committed Nov 17, 2023
1 parent 00ca3d8 commit b86b515
Show file tree
Hide file tree
Showing 21 changed files with 824 additions and 39 deletions.
6 changes: 4 additions & 2 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<link rel="next" title="Introduction to Data Goods" href="docs/introduction_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="Nov 16, 2023"/>
<meta name="docbuild:last-update" content="Nov 17, 2023"/>
</head>


Expand Down Expand Up @@ -188,6 +188,7 @@
<li class="toctree-l1"><a class="reference internal" href="notebooks/ntl-analysis/README.html">Night Time Lights in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/conflict/conflict.html">Conflict in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/air-pollution/air-pollution.html">Air Pollution in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/ais-analysis/README.html">Seaborn Trade Activity Estimation</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/aviation-trends/aviation.html">Tourism and Air Travel in Lebanon</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Acknowledgements</span></p>
Expand Down Expand Up @@ -443,6 +444,7 @@ <h2>Contents<a class="headerlink" href="#contents" title="Permalink to this head
<li class="toctree-l1"><a class="reference internal" href="notebooks/ntl-analysis/README.html">Night Time Lights in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/conflict/conflict.html">Conflict in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/air-pollution/air-pollution.html">Air Pollution in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/ais-analysis/README.html">Seaborn Trade Activity Estimation</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/aviation-trends/aviation.html">Tourism and Air Travel in Lebanon</a></li>
</ul>
</div>
Expand Down Expand Up @@ -547,7 +549,7 @@ <h2>License<a class="headerlink" href="#license" title="Permalink to this headin

<div class="footer-item">
<p class="last-updated">
Last updated on Nov 16, 2023.
Last updated on Nov 17, 2023.
<br/>
</p>
</div>
Expand Down
Binary file added _images/ais-trade.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
87 changes: 87 additions & 0 deletions _sources/notebooks/ais-analysis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Seaborn Trade Activity Estimation

This section introduces the use of an alternative big data source – Automatic Identification System (hereafter, AIS) – to monitor seaborn trade activity in Lebanon. AIS was originally developed by the International Maritime Organization in 2004 to prevent collisions between large vessels. This system requires all commercial ships (gross tonnage greater than 300) and passenger ships to broadcast their position via ground stations and satellites.

A nascent literature has been dedicated to convert raw AIS messages into volumes of trade ({cite:t}`TrackingTradefromSpaceAnApplicationtoPacificIslandCountries`; {cite:t}`Cerdeiro2020WorldST`; {cite:t}`Jia2019`; {cite:t}`Verschuur2021`; {cite:t}`Verschuur2021-fw`). These papers utilize dynamic information on ship movements, static characteristics of each ship, and reported draft (depth of submergence), to estimate the amount of goods offloaded or loaded at a certain port. While this methodology has produced results that correlate with aggregated trade value statistics, users should use the results with caution as a near real-time proxy for relative trends in trade. The methodology is based primarily on draft values from AIS data which are subject to a few limitations. Thus, AIS-derived trade values may not match perfectly with reported values.

For the purposes of the monitor, we implement and adjust the methodology described in “**Tracking trade from space: an application to pacific island countries**” {cite}`TrackingTradefromSpaceAnApplicationtoPacificIslandCountries`, using the same AIS data used by the authors, facilitated by the [UN Global Platform AIS Task Team](https://unstats.un.org/wiki/display/AIS/AIS+Handbook+Outline).

```{note}
This workflow and notebooks were originally developed by Cherryl Chico in support of the World Bank's Pacific Observatory project. It has been adapted for the Lebanon Monitor by Andres Chamorro.
```

## Methodology

The method can be broken down into the following four steps (each step was implemented in a python notebook).

### Step 1. Data Extraction

We retrieve all AIS messages that intersect a 10-kilometer buffer from each port in Lebanon (Bayrut, Sayda, and Tarabulus), available from December 1st, 2018, to November 1st, 2023. We use international port boundaries provided by {cite:t}`Verschuur2021-fw`.

#### Summarize AIS Data by Routes

We collapse the AIS data into routes. An incoming or outgoing route is captured by grouping continous AIS messages from a unique vessel traversing from port buffer to port boundary (or vice versa). We keep the first and last AIS messages for each route as they contain relevant arrival and departure information.

### Step 2. Data Filtering and Ship Registry Information

There may be routes that are quick because of small movements by vessels located at the edges of the boundaries. To remove the noise, we say that a vessel has fully exited the port when it spends at least 1 day outside of Port Boundary. Otherwise, we treat consecutive routes within 24 hours of each other as one.

We then combine the routes data with Ship Registry data to get the finer vessel categories and other information on the vessel required for trade estimation. The matching is done using both MMSI and IMO numbers from both data sources. We validate the match by comparing the vessel names.

### Step 3. Backpropagate Departure Draft

The difference in arrival vs. departure draught is a key calculation to estimate trade. However, the difference between outgoing and incoming draft is only identified in a subset of port calls. For the remaining routes, we apply the *back-propagation* technique, searching for the arrival draft at the next port visited.

### Step 4. Trade Estimation

#### Volume Displacement Method

We estimate the volume of the load of the ship based on the volume of the displaced water. The volume of the displaced water by the ship is derived from the volume of a rectangular block with the same length and width. The ship's draught or the height of the ship submerged in water is the height of the rectangular block. Since the ship is not rectangular, we reduce this by a factor called block coefficent that is dependent on the ship's draught. To convert volume into weight (in tonnes), we multiply the volume by the density of saltwater.

#### Design Block Coefficient

From any reported draught $D_r$​, displacement at reported draught $Disp_r$ can be estimated as the volume of a rectangular block with the same dimensions of the ship. The length and width of the ship represents the length and width of the rectangular block and the draught represents the height. The volume is adjusted by a factor called block coefficient and then converted to tonnes by multiplying by the density of salt water.

$$Disp_r = Cb_rLW\rho d_r$$


> where $Cb_{r}$ is the block coefficient at draught $d_{r}$, $L$ is the length, $W$ is the width, $\rho$ = density of salt water, and $d_r$ = reported draught
We can derive the block coefficent for any given draught as follows:

$$Cb_{r} = \frac{Disp_{r}}{LW\rho*d_{r}}$$

Given design draught, and design block coeffient, the block coefficient at reported draught can be estimated as:

$$ Cb_r = 1 - (1 - Cb_d) \frac{d_d}{d_r} ^ \frac{1}{3} $$

## Implementation

- [01 Data Extraction](./01-lebanon.ipynb)
- [02 Data Filtering and Ship Registry Information](./02-lebanon.ipynb)
- [03 Backpropagate Departure Draft](./03-lebanon.ipynb)
- [04 Trade Estimation](./04-lebanon.ipynb)

## Findings

We present results of the estimated volume of trade (imports and exports) across all ports in Lebanon. The trade flow is consistently dominated by imports. We find a decrease in trade volume in 2023.

```{figure} ./ais-trade.JPG
---
align: center
---
Estimated Monthly Trade Volume from AIS signal
```

## Limitations

- The accuracy of the trade estimation method depends heavily on the level of draft reporting in ports, which varies globally.

- The methodology doesn’t currently account for transshipment (goods that are offloaded at a port and then loaded onto another vessel without going through customs).

- AIS data can be noisy, and the methodology is sensitive to days with data blackouts.

## References

```{bibliography}
```
5 changes: 3 additions & 2 deletions docs/foundational_datasets_and_data_products.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<link rel="prev" title="Introduction to Data Goods" href="introduction_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="Nov 16, 2023"/>
<meta name="docbuild:last-update" content="Nov 17, 2023"/>
</head>


Expand Down Expand Up @@ -189,6 +189,7 @@
<li class="toctree-l1"><a class="reference internal" href="../notebooks/ntl-analysis/README.html">Night Time Lights in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notebooks/conflict/conflict.html">Conflict in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notebooks/air-pollution/air-pollution.html">Air Pollution in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notebooks/ais-analysis/README.html">Seaborn Trade Activity Estimation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notebooks/aviation-trends/aviation.html">Tourism and Air Travel in Lebanon</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Acknowledgements</span></p>
Expand Down Expand Up @@ -622,7 +623,7 @@ <h2>Sample Indicators<a class="headerlink" href="#sample-indicators" title="Perm

<div class="footer-item">
<p class="last-updated">
Last updated on Nov 16, 2023.
Last updated on Nov 17, 2023.
<br/>
</p>
</div>
Expand Down
5 changes: 3 additions & 2 deletions docs/introduction_to_data_goods.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<link rel="prev" title="Understanding Lebanon’s Economy through Alternative Data" href="../README.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
<meta name="docbuild:last-update" content="Nov 16, 2023"/>
<meta name="docbuild:last-update" content="Nov 17, 2023"/>
</head>


Expand Down Expand Up @@ -189,6 +189,7 @@
<li class="toctree-l1"><a class="reference internal" href="../notebooks/ntl-analysis/README.html">Night Time Lights in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notebooks/conflict/conflict.html">Conflict in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notebooks/air-pollution/air-pollution.html">Air Pollution in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notebooks/ais-analysis/README.html">Seaborn Trade Activity Estimation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notebooks/aviation-trends/aviation.html">Tourism and Air Travel in Lebanon</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Acknowledgements</span></p>
Expand Down Expand Up @@ -532,7 +533,7 @@ <h2>How Data Goods are Managed<a class="headerlink" href="#how-data-goods-are-ma

<div class="footer-item">
<p class="last-updated">
Last updated on Nov 16, 2023.
Last updated on Nov 17, 2023.
<br/>
</p>
</div>
Expand Down
5 changes: 3 additions & 2 deletions docs/team.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<link rel="prev" title="Tourism and Air Travel in Lebanon" href="../notebooks/aviation-trends/aviation.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
<meta name="docbuild:last-update" content="Nov 16, 2023"/>
<meta name="docbuild:last-update" content="Nov 17, 2023"/>
</head>


Expand Down Expand Up @@ -188,6 +188,7 @@
<li class="toctree-l1"><a class="reference internal" href="../notebooks/ntl-analysis/README.html">Night Time Lights in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notebooks/conflict/conflict.html">Conflict in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notebooks/air-pollution/air-pollution.html">Air Pollution in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notebooks/ais-analysis/README.html">Seaborn Trade Activity Estimation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../notebooks/aviation-trends/aviation.html">Tourism and Air Travel in Lebanon</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Acknowledgements</span></p>
Expand Down Expand Up @@ -515,7 +516,7 @@ <h1>Data Goods Team and Acknowledgements<a class="headerlink" href="#data-goods-

<div class="footer-item">
<p class="last-updated">
Last updated on Nov 16, 2023.
Last updated on Nov 17, 2023.
<br/>
</p>
</div>
Expand Down
5 changes: 3 additions & 2 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<link rel="search" title="Search" href="search.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
<meta name="docbuild:last-update" content="Nov 16, 2023"/>
<meta name="docbuild:last-update" content="Nov 17, 2023"/>
</head>


Expand Down Expand Up @@ -186,6 +186,7 @@
<li class="toctree-l1"><a class="reference internal" href="notebooks/ntl-analysis/README.html">Night Time Lights in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/conflict/conflict.html">Conflict in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/air-pollution/air-pollution.html">Air Pollution in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/ais-analysis/README.html">Seaborn Trade Activity Estimation</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/aviation-trends/aviation.html">Tourism and Air Travel in Lebanon</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Acknowledgements</span></p>
Expand Down Expand Up @@ -383,7 +384,7 @@ <h1 id="index">Index</h1>

<div class="footer-item">
<p class="last-updated">
Last updated on Nov 16, 2023.
Last updated on Nov 17, 2023.
<br/>
</p>
</div>
Expand Down
11 changes: 6 additions & 5 deletions notebooks/air-pollution/air-pollution.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@
<link rel="canonical" href="https://datapartnership.github.io/datapartnership/lebanon-economic-monitor/notebooks/air-pollution/air-pollution.html" />
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Tourism and Air Travel in Lebanon" href="../aviation-trends/aviation.html" />
<link rel="next" title="Seaborn Trade Activity Estimation" href="../ais-analysis/README.html" />
<link rel="prev" title="Conflict in Lebanon" href="../conflict/conflict.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
<meta name="docbuild:last-update" content="Nov 16, 2023"/>
<meta name="docbuild:last-update" content="Nov 17, 2023"/>
</head>


Expand Down Expand Up @@ -189,6 +189,7 @@
<li class="toctree-l1"><a class="reference internal" href="../ntl-analysis/README.html">Night Time Lights in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="../conflict/conflict.html">Conflict in Lebanon</a></li>
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Air Pollution in Lebanon</a></li>
<li class="toctree-l1"><a class="reference internal" href="../ais-analysis/README.html">Seaborn Trade Activity Estimation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../aviation-trends/aviation.html">Tourism and Air Travel in Lebanon</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Acknowledgements</span></p>
Expand Down Expand Up @@ -1263,11 +1264,11 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
</div>
</a>
<a class="right-next"
href="../aviation-trends/aviation.html"
href="../ais-analysis/README.html"
title="next page">
<div class="prev-next-info">
<p class="prev-next-subtitle">next</p>
<p class="prev-next-title">Tourism and Air Travel in Lebanon</p>
<p class="prev-next-title">Seaborn Trade Activity Estimation</p>
</div>
<i class="fa-solid fa-angle-right"></i>
</a>
Expand Down Expand Up @@ -1313,7 +1314,7 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this

<div class="footer-item">
<p class="last-updated">
Last updated on Nov 16, 2023.
Last updated on Nov 17, 2023.
<br/>
</p>
</div>
Expand Down
Loading

0 comments on commit b86b515

Please sign in to comment.