Chapter 19 Data Apps
International Trade
Explore the data of Chapter 19 without any code. Every chart below is live: hover over it to read the values, and use its buttons, menus and sliders to change what it shows.
← Back to Chapter 19: International Trade
19.3 Some basic facts about trade
Fig. 1, beyond the United States: exports and imports around the world
Choose a group of economies from the menu; solid lines are exports and dashed lines imports, and double-clicking the chart shows extreme values.
Sources. Data: World Bank, World Development Indicators: Exports of goods and services, % of GDP (NE.EXP.GNFS.ZS) and Imports of goods and services, % of GDP (NE.IMP.GNFS.ZS); World Bank, country and lending groups (regions and income groups of the menus). Prepared files: data/ch19/wdi_trade.csv and data/ch19/countries.csv (see the data notes). Bolivia: the same World Bank series, in the legend of every group and drawn in the Latin America & Caribbean group. Chart: inspired by Fig. 19.1 in Jones (2024), Macroeconomics, 6th ed.
Fig. 2, beyond the United States: trade balances around the world
Choose a group of economies from the menu; the dotted lines are each economy’s 1976–2024 average, and clicking a name in the legend hides it.
Sources. Data: World Bank, World Development Indicators: External balance on goods and services, % of GDP (NE.RSB.GNFS.ZS); World Bank, country and lending groups (regions and income groups of the menus). Prepared files: data/ch19/wdi_trade.csv and data/ch19/countries.csv (see the data notes). Bolivia: the same World Bank series, in the legend of every group and drawn in the Latin America & Caribbean group. Chart: inspired by Fig. 19.2 in Jones (2024), Macroeconomics, 6th ed.
Fig. 3: The trade balance around the world
Move the slider to change the year; the green bars measure each balance in percent of U.S. GDP, so surpluses abroad mirror the U.S. deficit.
Sources. Data: Groningen Growth and Development Centre, Penn World Table 11.0 (doi:10.34894/FABVLR) and Penn World Table 10.01, the textbook’s version (Feenstra, Inklaar and Timmer 2015, American Economic Review); variables csh_c, csh_i, csh_g (shares of GDP) and cgdpo (GDP at current PPPs). Prepared files: data/ch19/pwt_trade.csv and data/ch19/pwt_trade_world.csv (see the data notes). Bolivia: the same Penn World Table 11.0 variables, from pwt_trade_world.csv. Chart: inspired by Fig. 19.3 in Jones (2024), Macroeconomics, 6th ed.
Fig. 3, the whole world on a map: trade balances of 185 economies
Press the play button or drag the slider to change the year; red is a deficit, blue a surplus, and the colors stop at ±20 percent.
Sources. Data: Groningen Growth and Development Centre, Penn World Table 11.0 (doi:10.34894/FABVLR) (Feenstra, Inklaar and Timmer 2015, American Economic Review); variables csh_c, csh_i and csh_g. Prepared file: data/ch19/pwt_trade_world.csv (see the data notes). Bolivia: the same Penn World Table 11.0 data; the ring in the legend marks it on the map. Map: inspired by Fig. 19.3 in Jones (2024), Macroeconomics, 6th ed.
19.4 Trade and growth around the world
Fig. 4: The trade balance in rapidly growing countries
Move the slider to change the last year of the average, which starts in 2000; all but India run surpluses, not deficits.
Sources. Data: Groningen Growth and Development Centre, Penn World Table 11.0 (doi:10.34894/FABVLR) and Penn World Table 10.01, the textbook’s version (Feenstra, Inklaar and Timmer 2015, American Economic Review); variables csh_c, csh_i and csh_g. Prepared files: data/ch19/pwt_trade.csv and data/ch19/pwt_trade_world.csv (see the data notes). Bolivia (not one of the textbook’s fast growers, shown for comparison): the same Penn World Table 11.0 variables, from pwt_trade_world.csv. Chart: inspired by Fig. 19.4 in Jones (2024), Macroeconomics, 6th ed.
Fig. 4, look at your data: the yearly balances behind the averages
Hover over a line to read each year’s balance; Singapore’s and Ireland’s swing widely, so their averages depend on the years chosen.
Sources. Data: Groningen Growth and Development Centre, Penn World Table 11.0 (doi:10.34894/FABVLR) (Feenstra, Inklaar and Timmer 2015, American Economic Review); variables csh_c, csh_i and csh_g. Prepared file: data/ch19/pwt_trade.csv (see the data notes). Bolivia: the same Penn World Table 11.0 variables, from data/ch19/pwt_trade_world.csv. Chart: inspired by Fig. 19.4 in Jones (2024), Macroeconomics, 6th ed.
Fig. 4, beyond the textbook’s five: growth and trade in 176 economies
Hover over a dot to see the economy; the fitted line slopes down, but the link is weak and fast growers sit on both sides of zero.
Correlation: -0.22
Sources. Data: Groningen Growth and Development Centre, Penn World Table 11.0 (doi:10.34894/FABVLR) (Feenstra, Inklaar and Timmer 2015, American Economic Review); variables csh_c, csh_i, csh_g, rgdpna (real GDP) and pop (population). Prepared file: data/ch19/pwt_trade_world.csv (see the data notes). Bolivia: one of the gray points, the same Penn World Table 11.0 data; the ring in the legend marks it. Chart: inspired by Fig. 19.4 and the discussion in Chapter 19 of Jones (2024), Macroeconomics, 6th ed.
19.5 The twin deficits
Fig. 5: U.S. investment, budget deficit, and trade deficit
Move the slider to pick an episode; click “Domestic saving” in the legend to hide it, since its gap with investment is the trade deficit.
Sources. Data: U.S. Bureau of Economic Analysis (BEA), National Income and Product Accounts, via FRED: Gross private domestic investment (GPDIA), Federal government net saving (FGDEF), Gross domestic product, quarterly (GDP), Net exports of goods and services (A019RC1A027NBEA) and Gross domestic product (GDPA). Prepared file: data/ch19/fig19-5.csv (see the data notes). Bolivia: gross capital formation (World Bank, public and private investment) and general government net lending (IMF World Economic Outlook, all levels of government, not only the central one) and the World Bank trade balance (one legend entry: solid, investment; dashed, budget deficit; dotted, trade deficit); file data/ch19/bolivia.csv. Chart: inspired by Fig. 19.5 in Jones (2024), Macroeconomics, 6th ed.
Fig. 5, beyond the United States: twin deficits in the G20 economies
Pick an economy from the menu (the G20 members); the title gives the correlation of its budget and trade deficits, which can be negative.
Sources. Data: World Bank, World Development Indicators: Gross capital formation, % of GDP (NE.GDI.TOTL.ZS) and External balance on goods and services, % of GDP (NE.RSB.GNFS.ZS); International Monetary Fund, World Economic Outlook (October 2026), General government net lending/borrowing, % of GDP (GGXCNL_NGDP). Prepared file: data/ch19/twin_deficits_world.csv (see the data notes). Bolivia: the same World Bank and IMF series, the last choice of the menu. Chart: inspired by Fig. 19.5 in Jones (2024), Macroeconomics, 6th ed.
19.6 Net foreign assets and foreign debt
Fig. 6: Net international investment position of the United States
Hover over a line to read the position; below zero is a net foreign debt, and the dotted line adds up the trade balances since 1976.
Sources. Data: U.S. Bureau of Economic Analysis (BEA), International Investment Position and National Income and Product Accounts, via FRED: U.S. net international investment position (IIPUSNETIA), Gross domestic product (GDPA) and Net exports of goods and services (A019RC1A027NBEA); the July 2023 vintages of IIPUSNETIA and GDPA via ALFRED. Prepared file: data/ch19/us_trade.csv, checked against data/ch19/fig19-6.csv (see the data notes). Bolivia: Lane and Milesi-Ferretti, External Wealth of Nations database, net position as a percent of GDP; file data/ch19/bolivia.csv. Chart: inspired by Fig. 19.6 in Jones (2024), Macroeconomics, 6th ed.
Fig. 6, beyond the United States: creditors and debtors around the world
Choose a group of economies from the menu; double-click the chart to show the extreme positions of a few financial centers and oil exporters.
Sources. Data: Philip R. Lane and Gian Maria Milesi-Ferretti, External Wealth of Nations database, Brookings release of February 2026 (Lane and Milesi-Ferretti 2018, IMF Economic Review); World Bank, country and lending groups (regions and income groups of the menus). Prepared files: data/ch19/niip_world.csv and data/ch19/countries.csv (see the data notes). Bolivia: the same database, in the legend of every group and drawn in the Latin America & Caribbean group. Chart: inspired by Fig. 19.6 in Jones (2024), Macroeconomics, 6th ed.