The Palos Publishing Company

Follow Us On The X Platform @PalosPublishing
Categories We Write About

How to Use EDA to Investigate the Impact of Trade Tariffs on Domestic Markets

Exploratory Data Analysis (EDA) serves as a foundational step in understanding how trade tariffs influence domestic markets. Through EDA, analysts can uncover trends, patterns, anomalies, and relationships within data that might otherwise remain hidden. When it comes to evaluating the effects of trade tariffs, EDA helps dissect variables like import/export volumes, domestic prices, production levels, employment, and consumer behavior. Here’s how to conduct a structured EDA to investigate the impact of trade tariffs on domestic markets.

Understanding the Context and Hypotheses

Before diving into the data, it’s essential to define the scope of the analysis:

  • What types of tariffs are being studied (e.g., steel, electronics, agriculture)?

  • What are the timeframes (before and after tariff implementation)?

  • What are the primary domestic market indicators to evaluate (e.g., prices, output, employment)?

Developing hypotheses helps focus the EDA. For instance:

  • Hypothesis 1: Tariffs on imported steel lead to higher domestic steel prices.

  • Hypothesis 2: Tariffs reduce import volume and increase domestic production.

  • Hypothesis 3: Tariffs negatively affect industries dependent on imported inputs.

Gathering and Preparing Data

The quality of EDA hinges on the quality and relevance of data. Common data sources include:

  • Customs/import-export records

  • Producer and consumer price indexes (PPI, CPI)

  • Industry-specific datasets (e.g., steel production volumes, agricultural yields)

  • Employment and wage statistics

  • Company-level financials and production metrics

Key preparation steps:

  • Data cleaning: Address missing values, incorrect entries, and inconsistent formats.

  • Time alignment: Ensure data are synchronized to reflect the same time intervals.

  • Unit normalization: Standardize units across datasets (e.g., tons, dollars, indices).

Visualizing Import and Export Trends

A fundamental analysis involves visualizing import and export volumes of the tariffed goods over time. Line graphs can illustrate:

  • Monthly or quarterly trends before and after tariffs were enacted.

  • Volume changes by trading partners.

  • Changes in product categories or tariff codes.

These visualizations help identify whether there’s a clear drop in imports post-tariff and if exports are affected by retaliatory tariffs.

Analyzing Price Movements

To assess whether tariffs influenced prices:

  • Plot domestic prices of the tariffed goods over time.

  • Compare with global prices to determine if changes are global or tariff-specific.

  • Evaluate input costs for downstream industries (e.g., how higher steel prices affect auto manufacturing).

Boxplots, line charts, and histogram distributions can illustrate price dispersion and volatility.

Studying Domestic Production and Output

If tariffs are intended to boost domestic industries, production and output metrics should be evaluated:

  • Use bar charts or time series to compare production volumes before and after tariff enactment.

  • Analyze capacity utilization and inventory levels.

  • Correlate output with price movements and import volumes.

Pivot tables and grouped time-series plots can reveal which sectors are most responsive.

Employment and Wage Analysis

One of the most tangible domestic impacts of trade policy is on labor:

  • Use line charts and heat maps to explore employment changes in tariff-protected industries.

  • Evaluate wages for skilled vs. unskilled labor pre- and post-tariff.

  • Examine regional employment if tariff impacts are geographically concentrated.

This can be enhanced with categorical analysis, segmenting by industry, region, and job type.

Consumer Impact and Inflation

To assess how tariffs affect consumers:

  • Compare CPI across goods categories, especially those directly impacted by tariffs.

  • Evaluate shifts in spending behavior or substitution effects (e.g., switching to domestic alternatives or reducing consumption).

  • Use paired comparisons or basket analysis to understand net inflationary effects.

Scatter plots and regression lines can illustrate the correlation between tariff rates and price inflation at the consumer level.

Correlation and Causality Insights

EDA is exploratory, not confirmatory, but it sets the stage for further analysis:

  • Compute correlation matrices to see how variables like import volume, price, and employment are interrelated.

  • Use lag plots to detect delayed impacts (e.g., tariffs might affect employment with a time lag).

  • Identify outliers and anomalies—did an event besides tariffs influence the market?

Heatmaps and pair plots (from tools like seaborn or matplotlib in Python) can be powerful for multi-variable assessment.

Regional and Sectoral Breakdown

Not all industries or regions experience tariffs the same way:

  • Segment data by region to identify localized effects (e.g., Midwest manufacturing vs. coastal ports).

  • Analyze firm-level data if available to distinguish between small businesses and large corporations.

  • Use multi-panel plots or dashboards to juxtapose sector responses.

This allows for a nuanced view of winners and losers in the domestic economy.

Time Series Decomposition

For a deeper look at temporal patterns:

  • Apply time series decomposition (trend, seasonality, residuals) to key indicators.

  • Examine intervention analysis—mark the date of tariff introduction and evaluate shifts in trend.

  • Utilize moving averages to smooth short-term fluctuations and highlight long-term effects.

This approach helps isolate the structural impact of tariffs from normal seasonal variation.

Feature Engineering for Deeper Insights

To enrich EDA further, construct new features:

  • Tariff exposure index per industry or region.

  • Price markup ratios comparing pre- and post-tariff periods.

  • Import penetration rates.

  • Cost pass-through ratios (how much of the tariff is absorbed vs. passed to consumers).

Derived metrics offer clearer insights than raw data, especially in complex multivariate environments.

Tools and Technologies for EDA

Modern data analysis tools streamline EDA:

  • Python (pandas, matplotlib, seaborn, plotly) for scripting and visualization.

  • R (ggplot2, tidyverse) for statistical exploration.

  • Power BI / Tableau for interactive dashboards and presentations.

  • Jupyter Notebooks for documentation and reproducibility.

Automating EDA with scripts ensures scalability when working across multiple product categories or time periods.

Conclusion

EDA is a critical first step in investigating the impact of trade tariffs on domestic markets. It helps break down complex macroeconomic shifts into digestible visualizations and insights. Through careful data preparation, visualization, and segmentation, analysts can uncover how tariffs ripple through prices, production, employment, and consumer behavior. While EDA doesn’t confirm causality, it lays the empirical groundwork for hypothesis testing, econometric modeling, and informed policy analysis. By systematically applying EDA techniques, businesses and policymakers can make better decisions grounded in data.

Share this Page your favorite way: Click any app below to share.

Enter your email below to join The Palos Publishing Company Email List

We respect your email privacy

Categories We Write About