• The goal of this analysis is to study the NYC Open Data data set on “Emergency Department (ED) Visits and Admissions for Influenza-like Illness and/or Pneumonia,” and which NYC populations have needed more emergency visits.
• Show the code that responds to each question.
Set-Up
library(rvest)
library(sf)
library(tidyverse)
library(jsonlite)
library(tidycensus)
Reading NYC Open Data on Emergency Visits
emergencyVisits =
fromJSON("https://data.cityofnewyork.us/resource/2nwg-uqyg.json?$limit=3000")
Examining the data, we see two dates: when the visit was actually made, and when the data was made available. We are interested in the former (the actual visits).
Question 1: Convert the dates to proper dates
Question 2: Get only the last 100 days
Create a dataframe that contains only the last 300 visits (sorted by the dates of actual visits)
Question 3: Are the ED Visits in a numerical format? If not, convert
Question 4: Calculate the number of visits per ZIP code.
Students succeed in their courses by connecting and communicating with an expert until they receive help on their questions
Consult our trusted tutors.