Team Members:
Rahul Chauhan
Mani Krishna Tippani
Divya Vemula
2024-10-30
The project investigates the factors influencing which countries import the most commodities. With globalization, understanding export-import dynamics is crucial for optimizing trade strategies and supporting economic policies. Analyzing import patterns can provide insights into market dependencies, identify potential new markets, and enhance decision-making for exporters.
Data collect data using the U.S. Census Bureau’s International Trade API, which provides detailed information on exports and imports, including commodity codes and values. This will serve as our primary data source.
Dataset Source: U.S. Census Bureau’s International Trade API
Dataset URL: “https://api.census.gov/data/timeseries/intltrade/exports/hs”
Variables Included
Total 41 Variables
In this project, we aim to analyze export data from the Baltimore, MD district to uncover insights related to export patterns, trends, and factors influencing export values. Using a dataset that includes various metrics, such as monthly and year-to-date export values, shipping methods, and commodity descriptions.
This dataset enables to predict export values, for different commodities, transport modes across different countries.
Dataset holds both time-series and categorical features, provide an opportunity to explore patterns over time and the potential effects of commodity type, country of origin, and mode of transport on export volumes.
Export data holds both short-term and long-term patterns that vary by mode, which RNNs are well-suited to capture due to their ability to maintain and use memory over sequences.
Performance of different modes under varying conditions is essential for logistics optimization helps forecast inventory needs, plan shipments and reduce supply chain bottlenecks.
Data Exploration(EDA):
Summary Statistics: Generate descriptive statistics to capture the essence of the data.
Visualizations: Create plots to visualize trends over time and identify any seasonal patterns in exports.
Data Wrangling:
Addressing any missing or inconsistent values
Converting categorical fields to factors for analytical use
Creating derived metrics where applicable to enhance analysis
Feature Engineering: Implement advanced feature engineering techniques to enhance model performance by creating new variables based on existing data.
Data Modelling:
Utilize machine learning frameworks, specifically H2O and Keras, to predict future export values based on historical data.
Deep Learning Models: Leverage neural networks tailored for structured data analysis, particularly focusing on the relationships among various export-related variables.
Applying deep learning models like RNNs, CNNs, and bidirectional LSTMs enables the captures complex, nonlinear dependencies in processing sequential data.
Dynamic Time Warping (DTW) techniques to measure similarity between time-series sequences to compare the temporal structure of sequences. Explore ways to combine Dynamic Time Warping (DTW) techniques and deep learning technique, to enhance model performance.
Model Evaluation:
Model’s performance is evaluated on the test set, using metrics such as RMSE, Adj-R2, MSE for different model and compare their performance.
if (!require('tidyverse')) install.packages('tidyverse'); library('tidyverse')
if (!require('tidyr')) install.packages('tidyr'); library('tidyr')
if (!require('kableExtra')) install.packages('kableExtra'); library('kableExtra')
if (!require('RColorBrewer')) install.packages('RColorBrewer'); library('RColorBrewer')
if (!require('ggplot2')) install.packages('ggplot2'); library('ggplot2')
if (!require('ggthemes')) install.packages('ggthemes'); library('ggthemes')
if (!require('httr')) install.packages('httr'); library('httr')
if (!require('jsonlite')) install.packages('jsonlite'); library('jsonlite')
if (!require('stringr')) install.packages('stringr'); library('stringr')
if (!require('skimr')) install.packages('skimr'); library('skimr')
if (!require('recipes')) install.packages('recipes'); library('recipes')
if (!require('tibble')) install.packages('tibble'); library('tibble')
if (!require('h2o')) install.packages('h2o'); library('h2o')
if (!require('kableExtra')) install.packages('kableExtra'); library('kableExtra')
url <- "https://api.census.gov/data/timeseries/intltrade/exports/hs?get=DISTRICT,DIST_NAME,E_COMMODITY,E_COMMODITY_LDESC,ALL_VAL_MO,ALL_VAL_YR,VES_VAL_MO,VES_VAL_YR,AIR_VAL_MO,AIR_VAL_YR,CC_YR,QTY_1_YR,QTY_2_YR,CTY_CODE,CTY_NAME,COMM_LVL,DF,LAST_UPDATE,YEAR,MONTH,VES_WGT_YR&YEAR=2013&MONTH=12&DISTRICT=13"
response <- GET(url, timeout(60))
This project aims to provide valuable insights into global trade dynamics, supporting stakeholders in making informed decisions about export strategies and market targeting.