International Trade Data Examples
International Trade Data Nuances
The OEC offers annual data on trade between countries, broken down by individual products. These products are classified using the Harmonized System (HS), a globally recognized coding framework used by customs agencies around the world for categorizing traded goods. Since its introduction, the HS has been updated multiple timesโin 1992, 1996, 2002, 2007, 2012, 2017 and 2022. Corresponding to each version, the BACI database provides data organized into separate datasets, or "data cubes."
HS Revision | Years | Cube Name |
---|---|---|
HS92 | 1995-2023 | trade_i_baci_a_92 |
HS96 | 1996-2023 | trade_i_baci_a_96 |
HS02 | 2002-2023 | trade_i_baci_a_02 |
HS07 | 2007-2023 | trade_i_baci_a_07 |
HS12 | 2012-2023 | trade_i_baci_a_12 |
HS17 | 2017-2023 | trade_i_baci_a_17 |
HS22 | 2022-2023 | trade_i_baci_a_22 |
How Do I Choose the Correct Data Cube?
Each Harmonized System (HS) revision offers a consistent set of product classifications specific to the years it covers. When conducting trade analysis across multiple years, it's crucial to select the HS revision that aligns with your time range to maintain consistency in how products are defined and categorized.
A good rule of thumb is to choose the most recent HS revision that still applies to the earliest year in your dataset. For example, if you're analyzing trade data from 2010 to the present, the HS 2007 (HS07) classification would be the most appropriate, as it ensures uniformity in product definitions throughout your entire analysis period.
1. Total World Trade Value Over Time
Since we are interested in the total world trade value for the longest time series possible, we should use the HS92 revision cube: trade_i_baci_a_92
API URL:
Response:
2. Total Exports of Estonia Over the Last 5 Years ๐ช๐ช
Since we are interested in the total exports of Estonia over the last 5 years, we should use the HS17 revision cube: trade_i_baci_a_17
. To find the ID of the Exporter Country (in this case euest
for Estonia), we can use the /members endpoint for this cube and set Exporter Country
as the level
parameter.
API URL:
Response:
3. Total Exports of Drones In The Most Recent 2 Years ๐ฉ๏ธ
Since we are interested in the total exports of drones in the most recent 2 years, we should use the HS22 revision cube since it is a newer product and because we are interested in the most recent 2 years: trade_i_baci_a_22
. To find the ID of the specific product we are interested in (in this case Section 17 HS6 880629 for drones, so 17880629
), we can use the /members endpoint for this cube and set HS6
as the level
parameter.
API URL:
Response:
4. Products Imported by Canada in the Most Recent Year ๐จ๐ฆ
For this example, we'll look at Canada's total imports broken down by product categories in the most recent year. We'll use the HS22 revision since we're interested in recent data, and we'll use the HS2 level for broad product categories. The country code for Canada is nacan
.
Note: To filter by the most recent year, instead of specifying the year in the include
parameter, we can use the time
parameter with the latest
keyword.
API URL:
Response:
5. Total Imports of Cars to Canada from Germany In the Most Recent Year ๐จ๐ฆ ๐ ๐ฉ๐ช
For this next example we are going to make use of the full bilateral trade data. Since we are interested in the total imports of cars to Canada from Germany in the most recent year, we should use the latest revision (HS22) and because we are interested in Cars which is an aggregate product category we should use the 4 digit depth (HS4) level. To find the ID of the specific product we are interested in (in this case 178703
for cars), we can use the /members endpoint for this cube and include HS4
as the level
parameter.