-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME_Desciprtion.Rmd
More file actions
35 lines (27 loc) · 4.45 KB
/
README_Desciprtion.Rmd
File metadata and controls
35 lines (27 loc) · 4.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
title: "README_Description"
output: pdf_document
date: "2025-11-19"
---
## Introduction
The COVID-19 pandemic revealed significant vulnerabilities in global economies, especially those heavily reliant on specific industries or trade partners. These vulnerabilities were particularly evident in the global supply chain disruptions that persisted throughout the pandemic, sparking widespread concern about the ability of economies to withstand future crises. In response to these challenges, the question of how economic diversification can protect economies from such shocks became highly relevant. This project seeks to explore how economic diversification—defined as the degree to which an economy relies on a variety of industries and trade partners—can serve as a buffer against external shocks, such as the COVID-19 pandemic. Specifically, it investigates how diversification affects economic recovery and growth, with an emphasis on trade diversification and sectoral diversification.
The data used in this analysis comes from several reputable sources. UNCTAD (United Nations Conference on Trade and Development) provided the Export Diversification Index, a measure of the diversity of an economy's exports. The World Bank supplied the GDP data, including the 2023 recovery indicators. A third-party online dataset provided the Economic Diversification Index, representing the economic diversification of countries based on sectoral diversification.
## Files Contained:
- data.R: The R Script used to load data, clean and merge data, and create two data visualizations, the scatterplot and the choropleth map.
- shinyapp.R: The R Script used to generate an interactive ShinyApp. There are two tabs: Economic Diversification Index tab and Country data tab. Users can input a number into the economic diversification index section, and the choropleth will display which countries have above that value. Users can also select a country, and if that country data exists, it will appear in the Country data tab.
## Getting Started
- Packages Used: tidyverse, dplyr, rvest, ggplot2, sf, spData, tidytext, textdata, SnowballC, udpipe, sentimentr, pdftools, plotly, shiny, shinyFeedback
- Will need the text analysis files, from IMF, downloaded into a folder. There will be a path that the user can customize to call to this folder
- Will also need the data files stored, I used the folder called "Data"
- GDP_countries.csv: Contains GDP data for various countries for the years 2019-2023
- Export_diversification_index.csv: Contains the export diversification index for various countries.
- Scraped economic diversification data: Data obtained from a web scraping process.
- Will also have an output folder for the images to be stored
- My working directory: setwd("/Users/marinefujisawa1/Documents/GitHub/Coding-Sample")
## Methodology
To explore the relationships between economic diversification and resilience to economic shocks, a series of data processing and analysis steps were undertaken, involving data collection, cleaning, exploratory data analysis, and regression modeling.
The first step in the methodology was the collection and cleaning of data. After obtaining the data outlined previously, it was then cleaned to ensure consistency across the different datasets.
Additionally, scatterplots were used to visualize the relationship between economic diversification and GDP recovery in 2023. They displayed how variations in the Economic Diversification Index and Export Diversification Index correlated with the extent of recovery across countries. These visualizations provided an initia view of the trends.
A Shiny app was then used to visualize the relationship between economic diversification and GDP recovery. The app featured choropleth maps to display the different levels of the Economic Diversification Index (measured by the "Average" score) across nations. The Shiny app was interactive, allowing users to input specific values for the Economic Diversification Index. Additionally, the app offered a tab to display country-level data, including specific metrics like GDP recovery, the export diversification index, and the economic diversification index for each country.
## Note
For the sake of brevity, as this is only a coding sample, I did not include the code where I ran regressions, conducted a sentiment analysis, and created more scatterplots. Those all contributed to the research report. If that is something you would like to see as well, please let me know and I would be happy to provide them.