# Domestically Significant Ports

So far, we've focused on **globally significant ports** — the major ones that handle huge volumes of vessels. These are clearly important: if any of them were disrupted, global trade could feel the impact.

But what about **smaller ports** — especially in smaller countries?\
Let’s consider this idea:

> If a country has only a few ports — or even just one — it likely **depends heavily** on those ports for its imports.

This brings us to the next step: identifying **domestically significant ports**, i.e., ports that are vital within their own country.

Researchers behind the PortWatch dataset defined:

> Domestically significant ports are ports that, together, handle **more than 80%** of a country’s total imports.

***

### **🔧 Your tasks:**

* [ ] &#x20;Define a **dummy variable** where `dummy = 1` if a port is domestically significant
* [ ] Calculate:
  * How many ports are **domestically significant** (`dummy = 1`)?
  * How many ports **are not** (`dummy = 0`)?
* [ ] 💬 Comment your code clearly so that someone else can easily follow your logic

> <img src="https://2669499530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnYNN3nXNuXMJpHACcH73%2Fuploads%2Ft1yAGmUambZeYVQvPSeu%2Fp.png?alt=media&#x26;token=01872756-9ca8-44f9-9ec1-1ff5f70ce561" alt="" data-size="line">
>
> * You can use `numpy.where()` **or** `.loc[]` to create a **dummy variable** based on a given condition.
> * To **count** how many ports fall into each group (`1` or `0`), try using `.value_counts()` on your dummy column
>
> 📌 *Tip:* You may already have a column showing each port’s **percent share of imports within its country** — use this to calculate **cumulative shares** for each country.
