---title: "Assignment Five"author: "Professor Lepore"date: "10/30/2022"output: html_document---# *Task(s):*- ***[1]*** Graph (ONLY) the community boards assigned to you with a grouped...

1 answer below »
can you please let me know the price?


--- title: "Assignment Five" author: "Professor Lepore" date: "10/30/2022" output: html_document --- # *Task(s):* - ***[1]*** Graph (ONLY) the community boards assigned to you with a grouped bar chart for both building type and warrant execution type [10 Points (5 points for each graph)] (The graph should consist of just your community boards) - ***[2]*** When turning in your assignment please attach both this RMD file and the html knitted file. I've already set the specific chunk settings for this assignment. Also be sure to rename both as assignment_five_first_lastname. ### Extra points (2) - (1): Separate the community boards into their own graphs in addition to the grouped bar graphs (for both building type's graph and warrant execution type's graph) - (1): Bold text present in all plots (x label, y label, title) # Partial credit is possible with your graphs, but points will be deducted if the graphs include other community boards besides your assigned boards and if percentages weren't calculated based on the whole data set # R [PART ONE] ```{r setup, include = TRUE} # Chunk Options ---------------------------------------------------------------- knitr::opts_chunk$set( echo = TRUE ) # R PACKAGES ------------------------------------------------------------------- if (!require('tidyverse')) install.packages('tidyverse', repos = "http://cran.us.r-project.org"); library('tidyverse') if (!require('svDialogs')) install.packages('svDialogs', repos = "http://cran.us.r-project.org"); library('svDialogs') ``` ```{r data_cleaning} # DATA PULL -------------------------------------------------------------------- eviction_data <- jsonlite::fromjson("https://data.cityofnewyork.us/resource/6z8x-wfk4.json?$limit="100000")" #="" data="" cleaning="" ----------------------------------------------------------------="" eviction_data_clean=""><- eviction_data%="">% select(residential_commercial_ind, eviction_possession, borough, community_board)%>% rename("building_type" = residential_commercial_ind, "warrant_execution_type" = eviction_possession,)%>% mutate(warrant_execution_type = ifelse(warrant_execution_type %in% c("Unspecified"), NA, warrant_execution_type))%>% drop_na() ``` ```{r community_board_analysis} # Run this chunk and enter your student ID to get the three community boards you will graph student_id <- svdialogs::dlginput("enter your student id")$res str_split(gsub("[^1-9]", "", paste(unique(str_split(student_id, "")[[1]]), sep="", collapse="")), "")[[1]][1:3] ``` ```{r data_visualization} # our data prep has already been done, now you're asked to visualize the following: # 1. create a grouped bar chart of your community boards showing the percentage by building type and warrant execution type # 2. label the x, y axes and create a title ``` ```{r hints, eval=false} # there are a couple of ways you could do this, but note that your percentages must be out of the whole data set and not recalculated to be out of 3 community boards... i would recommend running a prop.table of all community boards (assignment 4) to make sure your percentages are correct. also think about how we made a graph in class, and what addition(s) and substitutions are needed to complete this. # hints: ?dplyr::filter() ?subset() # extra credit hints ?ggplot2::facet_grid() ?ggplot2::facet_wrap() ?ggplot2:theme() ``` svdialogs::dlginput("enter="" your="" student="" id")$res="" str_split(gsub("[^1-9]",="" "",="" paste(unique(str_split(student_id,="" "")[[1]]),="" sep="" ,="" collapse="" )),="" "")[[1]][1:3]="" ```="" ```{r="" data_visualization}="" #="" our="" data="" prep="" has="" already="" been="" done,="" now="" you're="" asked="" to="" visualize="" the="" following:="" #="" 1.="" create="" a="" grouped="" bar="" chart="" of="" your="" community="" boards="" showing="" the="" percentage="" by="" building="" type="" and="" warrant="" execution="" type="" #="" 2.="" label="" the="" x,="" y="" axes="" and="" create="" a="" title="" ```="" ```{r="" hints,="" eval="FALSE}" #="" there="" are="" a="" couple="" of="" ways="" you="" could="" do="" this,="" but="" note="" that="" your="" percentages="" must="" be="" out="" of="" the="" whole="" data="" set="" and="" not="" recalculated="" to="" be="" out="" of="" 3="" community="" boards...="" i="" would="" recommend="" running="" a="" prop.table="" of="" all="" community="" boards="" (assignment="" 4)="" to="" make="" sure="" your="" percentages="" are="" correct.="" also="" think="" about="" how="" we="" made="" a="" graph="" in="" class,="" and="" what="" addition(s)="" and="" substitutions="" are="" needed="" to="" complete="" this.="" #="" hints:="" dplyr::filter()="" subset()="" #="" extra="" credit="" hints="" ggplot2::facet_grid()="" ggplot2::facet_wrap()="" ggplot2:theme()="">
Answered 7 days AfterOct 25, 2022

Answer To: ---title: "Assignment Five"author: "Professor Lepore"date: "10/30/2022"output:...

Mohd answered on Nov 01 2022
47 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here