hadley / mastering-shiny

Mastering Shiny: a book
https://mastering-shiny.org/
Other
1.33k stars 566 forks source link

Chapter 4 - Wrong URL to download data #617

Open emsing opened 1 year ago

emsing commented 1 year ago

In the online version of the book, I was unable to download the NEISS data using the code from the book. The URL: https://github.com/hadley/mastering-shiny/raw/master/neiss/

gave a 404 message.

I found this URL to work https://github.com/hadley/mastering-shiny/raw/main/neiss/

robertberryuk commented 12 months ago

Awesome, thanks - this was driving me mad

rmflight commented 10 months ago

What's weird, is that the source of the page shows the correct URL (using the main branch), but the rendered shows the incorrect.

I think the book just (I know that's not necessarily that simple) needs to be re-rendered and pushed up.

RyanGerardHoward commented 10 months ago

Thanks emsing. That URL was helpful.

ayoraind commented 9 months ago

In my case (as stated in issue #609), I had to use

https://raw.githubusercontent.com/hadley/mastering-shiny/main/neiss/

So, the function then looks like this

download <- function(name) {
  # url <- "https://github.com/hadley/mastering-shiny/raw/master/neiss/"
  url <- "https://raw.githubusercontent.com/hadley/mastering-shiny/main/neiss/"
  download.file(paste0(url, name), paste0("neiss/", name), quiet = TRUE)
}

I commented out the url stated in the online version of the book for emphasis.