Icon

2026 September Challenge

<p>The United States Department of Agriculture tracks coffee production, trade, and consumption across 94 countries going back to 1960. Each country plays a different structural role in the global coffee supply chain, falling into one of three trade profiles: <strong>Pure Producer</strong>, <strong>Pure Consumer</strong>, or <strong>Trade Hub</strong>.</p><p>Use the USDA coffee data to classify each country into one of these profiles using four metrics:</p><ul><li><p><strong>Production Self-Sufficiency Ratio:</strong> The share of supply grown domestically (PSR = Production / Total Supply).</p></li><li><p><strong>Import Dependency Ratio:</strong> The share of supply coming from imports (IDR = Imports / Total Supply).</p></li><li><p><strong>Export Intensity Ratio:</strong> The share of distributed coffee that leaves the country (EIR = Exports / Total Distribution).</p></li><li><p><strong>Domestic Consumption Share:</strong> The share of distributed coffee consumed domestically (DCS = Domestic Consumption / Total Distribution).</p></li></ul><p>Since coffee production is volatile due to weather and harvest cycles, focus on the <strong>last ten years</strong> (2017-2026) and classify based on 10-year averages to capture each country’s structural role rather than a single good or bad year.</p><p>Design and apply your own threshold rules for "high" and "low" (e.g., quartiles, fixed cutoffs, clustering), following the profile definitions below. Document your choice and visualize the classification results appropriately.&nbsp;</p><ul><li><p><strong>Pure Producer:</strong> Mainly grow their own coffee with little to no imports (high PSR / low IDR) and mainly export it with comparatively little domestic consumption (high EIR / low DCS).</p></li><li><p><strong>Pure Consumer:</strong> Cannot grow coffee (or grow negligible amounts), so they mainly import coffee (high IDR / low PSR) and mainly consume the imported coffee domestically rather than re-exporting it (high DCS / low EIR).</p></li><li><p><strong>Trade Hub:</strong> Have relatively high imports and exports compared to their total supply and distribution (high IDR and high EIR). They may or may not grow coffee itself but it is mainly defined by the sheer volume of coffee passing through the country.</p></li></ul><p><strong><em>Note:</em></strong> Not every country will fit a profile, there are countries that fall in between.</p><p>Model Synopsis</p><ul><li><p>Create four metric data groups.</p></li><li><p>Use K-Means to crate three clusters for each metric.</p></li><li><p>Sort cluster centroids descending to order all metric groups the same.</p></li><li><p>Assign cluster labels.</p></li><li><p>Join metric tables.</p></li><li><p>Use Rule Engine node to classify each country.</p></li></ul>

The United States Department of Agriculture tracks coffee production, trade, and consumption across 94 countries going back to 1960. Each country plays a different structural role in the global coffee supply chain, falling into one of three trade profiles: Pure Producer, Pure Consumer, or Trade Hub.

Use the USDA coffee data to classify each country into one of these profiles using four metrics:

  • Production Self-Sufficiency Ratio: The share of supply grown domestically (PSR = Production / Total Supply).

  • Import Dependency Ratio: The share of supply coming from imports (IDR = Imports / Total Supply).

  • Export Intensity Ratio: The share of distributed coffee that leaves the country (EIR = Exports / Total Distribution).

  • Domestic Consumption Share: The share of distributed coffee consumed domestically (DCS = Domestic Consumption / Total Distribution).

Since coffee production is volatile due to weather and harvest cycles, focus on the last ten years (2017-2026) and classify based on 10-year averages to capture each country’s structural role rather than a single good or bad year.

Design and apply your own threshold rules for "high" and "low" (e.g., quartiles, fixed cutoffs, clustering), following the profile definitions below. Document your choice and visualize the classification results appropriately. 

  • Pure Producer: Mainly grow their own coffee with little to no imports (high PSR / low IDR) and mainly export it with comparatively little domestic consumption (high EIR / low DCS).

  • Pure Consumer: Cannot grow coffee (or grow negligible amounts), so they mainly import coffee (high IDR / low PSR) and mainly consume the imported coffee domestically rather than re-exporting it (high DCS / low EIR).

  • Trade Hub: Have relatively high imports and exports compared to their total supply and distribution (high IDR and high EIR). They may or may not grow coffee itself but it is mainly defined by the sheer volume of coffee passing through the country.

Note: Not every country will fit a profile, there are countries that fall in between.

Model Synopsis

  • Create four metric data groups.

  • Use K-Means to crate three clusters for each metric.

  • Sort cluster centroids descending to order all metric groups the same.

  • Assign cluster labels.

  • Join metric tables.

  • Use Rule Engine node to classify each country.

PSD Coffee Data
CSV Reader
Market Year2017-2026
Row Filter
Remove Countriesw/ No Data
Missing Value
Country 10 Yr.Attribute Sums
GroupBy
Production
Row Filter
Total Supply
Row Filter
Remove Countriesw/ No Data
Missing Value
Joiner
Remove Countriesw/ No Data
Missing Value
Joiner
Table Manipulator
Table Manipulator
3 Clusters
k-Means
Rule Engine
3 Clusters
k-Means
Table View
3 Clusters
k-Means
Joiner
3 Clusters
k-Means
Table Manipulator
Joiner
Sort ClustersDescending
Sorter
Sort ClustersDescending
Sorter
Assign ClusterLabels
Rule Engine
Joiner
Exports
Row Filter
Sort ClustersDescending
Sorter
Assign ClusterLabels
Rule Engine
Imports
Row Filter
Table Manipulator
Joiner
Column Appender
PSR
Math Formula
Sort ClustersDescending
Sorter
Total DIStribution
Row Filter
Assign ClusterLabels
Rule Engine
Domestic Consumption
Row Filter
Joiner
DCS
Math Formula
Table Manipulator
Remove Countriesw/ No Data
Missing Value
IDR
Math Formula
Assign ClusterLabels
Rule Engine
EIR
Math Formula
Table Manipulator

Nodes

Extensions

Links