Data analysis
We provide here some basic elements about the data set and
descriptive statistics on some variables of interest.
- First we load the data
- second we print a summary
We loaded the data set and compile the report on 2024-10-21
Summary statistics
Here are some summary statistics of the export value
(Stat_Value variable), all products combined:
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 98.9 159.6 336.7 303.4 443.6 492.8
The data set contains 88 observations, and
16 variables.
Here is a list of all variables available in the data set:
## [1] "X" "Reg_Date" "Type"
## [4] "CP4" "Stat_Value" "IMPORT_COUNTRY"
## [7] "IMPORT_REGION" "EXPORT_COUNTRY" "EXPORT_REGION"
## [10] "Principle_Exports" "Principle_ReExports" "Principle_Imports"
## [13] "Year" "Month" "Day"
## [16] "epsilon"
Type of exports
The variable Principle_Export list all the types of goods
exported from Vanuatu. There are 10 different goods
exported. Let’s have the list of all these goods.
## [1] "Beef" "Coffee" "Vanilla" "Copra"
## [5] "Kava" "Coconut Oil" "Cocoa" "Alcoholic Drinks"
## [9] "Cowhides" "Wood"
Main Exports by type of goods
As a table
It could be nicer to have this as a table:
Principle_Exports | total |
|---|
Alcoholic Drinks | 14,908.72 |
Wood | 4,765.27 |
Kava | 2,699.67 |
Coffee | 1,340.77 |
Coconut Oil | 1,051.49 |
Cocoa | 957.56 |
Beef | 409.04 |
Cowhides | 247.46 |
Vanilla | 167.25 |
Copra | 148.90 |
As a graphic:
Since we have a limited number of goods, a bar chart would probably
describe the data in a very good way. We follow here some good practices
in terms of data visualization:
- The bar chart is horizontal to facilitate the
reading of the labels for each good
- The bar chart is ordered to follow the data
(largest on top)

Some extensions on this dynamic report
Selection of the Year
The previous analysis was done for all years. Imagine now the same
report but for any year in [2000, 2010]. let’s pick a year in the code
chunck below!
we have now selected the year 2009, let’s see the
new report!
As a table
We use the same table as before. Maybe that could be a function later
;-).
Principle_Exports | total |
|---|
Alcoholic Drinks | 1,264.08 |
Coconut Oil | 404.34 |
Wood | 367.30 |
Vanilla | 167.25 |
Cowhides | 141.75 |
As expected, the graphic shows the difference with the
