Skip to content

Instantly share code, notes, and snippets.

@rcquan
Created November 22, 2014 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rcquan/f05a235a84321896386c to your computer and use it in GitHub Desktop.
Save rcquan/f05a235a84321896386c to your computer and use it in GitHub Desktop.
# Check if file exists in working directory; if not, downloads
fileName = "medMis.csv"
if (!file.exists(fileName)){
url <- "https://health.data.ny.gov/api/views/ebmi-8ctw/rows.csv?accessType=DOWNLOAD"
fileName <- "medMis.csv"
download.file(url, fileName, method = "curl")
}
medMis <- read.csv(fileName)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment