ANLY482 AY2016-17 T2 Group13 - Project Findings

From Analytics Practicum
Jump to navigation Jump to search



  AP PROJECTS

  HOME

  ABOUT US

  PROJECT OVERVIEW

  PROJECT FINDINGS

  PROJECT MANAGEMENT

  DOCUMENTATION



Data Pre-Processing

Before embarking on an Exploratory Data Analysis (EDA, the data had to be transformed for further analysis. Viewing the data based on 2D HS codes alone was insufficient because aggregated categories included too many possible unrelated items in the same category. These were the data cleaning steps that were attempted:

1. Combination of Data

2.2 combine csv.PNG

All the .csv files were placed in a folder to ensure that concatenation of csv files would only be among datasets that we will be using for the project. Then the “copy *.csv” function was used to combine all the csv folders together though leaving the original folders intact.

2.2 rbind data.png

R was also used to combine folders together. This was done by loading the .csv files into variables. After which, the “rbind” function was used to combine the datasets together.


2. Removal of Unnecessary Columns

2.2 Raw Data 2d 1.png

2.2 Raw Data 2d 2.png

Many of the columns in the raw data file did not have values in them. Due to this, we decided to remove the columns in Microsoft Excel because they would not have been useful to our analysis.

2.2 Removed Columns 2d 1.png

2.2 Removed Columns 2d 2.png

Above is the data set after removing the unnecessary columns. Variables containing weight appeared in 4d and 6d data and were not as apparent for 2d data. Due to this, we decided to leave the variables for the dataset.


3. Sectors and Dimension Tables

We received the names for 18 sectors that the DIT focuses on, listed below.

s/n High Value Campaign High Priority Volume Low Priority Volume Unclassified
1 Aerospace Retail/Consumer Advanced Manufacturing (Excluding aerospace and automotive) Others - Raw Materials
2 Food and Beverage Education Automotive Others - Manufacturing
3 Infrastructure (Water and Environment) Energy Bio-economy (Agri-tech) Others
4 Infrastructure (Rail) Financial and Professional Business Services Bio-economy (Chemicals) Financial and Professional Business Services - Others
5 Technology Healthcare Sports
6 Food and Beverage Life Sciences
7 Infrastructure (Airports)


Dimension Table for Sectors
A separate dimension table was created to individually assign HS codes to the sectors.

2.2 Raw HS.png

Raw data file for the HS codes only includes section, commodity code and commodity.

2.2 Clean HS.png

Cleaned HS data includes sector and sector category. This data was based on the important sectors of our sponsor. Sector category includes information of what our sponsor considered more important commodities or less important commodities. Then, the sectors and sector categories were assigned to the commodity based on approval by our sponsor.


2.2 vlookup HS.png

The “vlookup” function was used to combine the import data and commodity data based on commodity variable to add Section, Sector and Sector Category.


Dimension Table for Countries
2.2 Raw Geog Data.png

The initial geographic data found on the UN website only included name of the country (Partner) and its respective country code.

We referred to the United Nations Statistics Division to assign countries to geographic regions, continents and political organisations.

2.2 Clean Geog Data.png

The information on the UN website was used to manually add in Continent and Region. Economic Unions for particular countries were then assigned to their respective countries.


2.2 vlookup Geog.png

The “vlookup” function was used to combine the import data and geographic data based on Partner variable to add Continent, Region and Economic Union.


4. Calculated Fields

Conversion of “Period” to date variable
2.2 Tableau DateParse.png

“Dateparse” function was used to convert “Period” into a date variable in Tableau.


Calculation of “Benchmarks”
For the UK Benchmark, this value was used as the UK reference line in the bullet chart as a comparison to commodities within the selected country.


For the Average Benchmark, this value was used in the UK reference line in the bullet chart as a comparison to countries within the selected sector/commodity.

Calculation of “Market share of UK imports relative to the world”
This value determines the market share of UK imports relative to the world, and is used in the initial UK overview treemap. The equation used is as follows: 2.2 Calculation of Market Share of UK Imports Relative to World.PNG