Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

what story can i tell with graphs in Visualizing & Analyzing Data with R with the following dataset. this is the assignment i need the

what story can i tell with graphs in Visualizing & Analyzing Data with R with the following dataset. this is the assignment i need the story for: he United States has resettled more than 600,000 refugees from 60 different countries since 2006.
In this assignment, you will use R, ggplot to explore where these refugees have come from. Feel free to use also graphical tools like InkscapeLinks to an external site..
Instructions
Heres what you need to do:
Use the Department of Homeland Securitys annual count of people granted refugee status between 2006-2015:
A2_refugee_status.csvDownload A2_refugee_status.csv
Create a new R Markdown file
Clean the data using the suggestions Ive given you below.
Summarize the data somehow. There is data for 60 countries over 10 years, so youll probably need to aggregate or reshape the data somehow (unless you do a 60-country sparkline). Ive included some examples down below.
Create an appropriate time-based visualization based on the data. Dont just calculate overall averages or totals per countrythe visualization needs to deal with change over time. Do as much polishing and refining in Rmake adjustments to the colors, scales, labels, grid lines, and even fonts, etc. and this is that code i have: # Load required packages library(dplyr) library(countrycode) library(lubridate) library(tidyr) library(tidyverse) # Load the data df - read.csv("~/Documents/R and Rstudio/A2.1: Refugees/data/A2_refugee_status.csv")
refugees_raw - read_csv("~/Documents/R and Rstudio/A2.1: Refugees/data/A2_refugee_status.csv", na = c("-","X","D")) non_countries - c("Africa", "Asia", "Europe", "North America", "Oceania", "South America", "Unknown", "Other", "Total") refugees_clean - refugees_raw %>% # Make this column name easier to work with rename(origin_country =`Continent/Country of Nationality`)%>% # Get rid of non-countries filter(!(origin_country %in% non_countries))%>% # Convert country names to ISO3 codes mutate(iso3= countrycode(origin_country, "country.name", "iso3c", custom_match = c("Korea, North" ="PRK")))%>% # Convert ISO3 codes to country names, regions, and continents mutate(origin_country = countrycode(iso3, "iso3c", "country.name"), origin_region = countrycode(iso3, "iso3c", "region"), origin_continent = countrycode(iso3, "iso3c", "continent"))%>% # Make this data tidy gather(year, number, -origin_country, -iso3,-origin_region, -origin_continent)%>% # Make sure the year column is numeric + make an actual date column for years mutate(year = as.numeric(year), year_date = ymd(paste0(year,"-01-01")))
refugees_clean
refugees_countries_cumulative - refugees_clean %>% arrange(year_date)%>% group_by(origin_country)%>% mutate(cumulative_total = cumsum(number)) refugees_countries_cumulative
refugees_continents - refugees_clean %>% group_by(origin_continent, year_date)%>% summarize(total = sum(number, na.rm = TRUE))
refugees_continents_cumulative - refugees_clean %>% group_by(origin_continent, year_date)%>% summarize(total = sum(number, na.rm = TRUE))%>% arrange(year_date)%>% group_by(origin_continent)%>% mutate(cumulative_total = cumsum(total))
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

How is an animated film like a VIS application?

Answered: 1 week ago

Question

=+3. How should disciplinary problems be handled? Why?

Answered: 1 week ago

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago