UNICEF Migration and Displacement Country Profiles R Shiny app.
The app is basically a selection tool. When a country is selected, it shows a prebuilt.html of the selected country.
The htmls for the countries were generated in August, 2023*.* When building the htmls for each country, the code uses data from UNHCR, IOM, UN Population Division, IDMC. It also adds child protection, child mortality data. When running generate_profile.R, updated data is downloaded directly rom ILO and WB APIs.
app.R | Shinyapp that creates a tool to select a country. This can be a country picked in a map or from a list. |
data/all_ctry.Rdata | List of countries to analyze ISO 3166-1 alpha-3 |
data/location.Rdata | Country table with iso codes, region, UNICEF regions. Also includes a table with region codes |
data/MMG.Rdata | Missing Migrant Project data |
data/UNSD_M49_Aug2019.Rdata | Country table with iso codes and region |
www/generate_profile.R | Loads the data, ggplot variables, creates country lists, and more. This code produces the profiles for countries using the template in profile_v6.Rmd |
www/generatereport_check.R | Produces a table showing which countries do not have a profile |
www/profile_v6.Rmd | Template of the html for the countries. It creates an html_fragment. Note that HTML fragments are not complete HTML documents. Rather, they are intended for inclusion within other web pages or content management systems (like blogs). As such, they don't support features like embedded images, themes, or code highlighting (it's expected that the environment they are ultimately published within handles these things). The theme is applied at the UI level in app.R |
Yukun Pei, Sebastian Palmas, Jan Beise and Danzhen You.