We have decided on this database considering the primary sources that include:
a. Exports&Imports: Analyze composition of exports and imports data by complexity for each commodity
b. Trade Partnerships: Utilize international trade databases to identify Turkey’s major trade partner and assess trade volumes
c. Additional Insights: Explore supplementary datasets as needed to uncover specific aspects of Turkey’s trade dynamics, such as tariffs and distances data to map out key trading routes, highlighting the connectivity and strategic importance of Turkey in global trade.
With this project, we aim to produce a comprehensive report that synthesizes the findings into a coherent narrative. Visualizations, charts, and infographics will be employed to enhance the accessibility of the data.
1.2 Dataset Installation and Preprocessing
1.2.1 Necessary Source Packages
library(tidyverse)
Warning: package 'dplyr' was built under R version 4.3.2
Warning: package 'stringr' was built under R version 4.3.2
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.4
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.4.4 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.0
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Warning: package 'tradestatistics' was built under R version 4.3.2
library(tibble)
1.2.2 Datasets
The data retrieval and table creation were facilitated using the ‘tradestatistics’ package developed by a group of developers led by Mauricio Vargas. This package streamlines the process of fetching data from api.tradestatistics.io and generates tables that are convenient for analytical purposes. We used otc_create_tidy_data for our analysis
DataSet 1: This data set shows Turkey’s export and import values with product categories & related commodities’ names & codes only
DataSet 2: This data set shows Turkey’s and its partners’ export and import values with product categories & related commodities’ names & codes
#DataSet 1: wits_turkey_data_only <-ots_create_tidy_data(years =2002:2020,reporters ="tur",table ="yrc")head(wits_turkey_data_only)#DataSet 2: wits_turkey_data_with_partners <-ots_create_tidy_data(years =2002:2020,reporters ="tur",table ="yrpc")head(wits_turkey_data_with_partners)#Combine the datasets into a listcombined_datasets <-list(wits_turkey_data_only = wits_turkey_data_only,wits_turkey_data_with_partners = wits_turkey_data_with_partners)
1.3 Creating RDS file
saveRDS(combined_datasets, file ="wits_data.rds")
The created .Rdata file can be reached through RDS Link
1.4 Monitoring the Data
library(DT)
Warning: package 'DT' was built under R version 4.3.2