Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken link to Neiss dataset #588

Open
msmith01 opened this issue Sep 23, 2022 · 5 comments · May be fixed by #598 or #601
Open

Broken link to Neiss dataset #588

msmith01 opened this issue Sep 23, 2022 · 5 comments · May be fixed by #598 or #601

Comments

@msmith01
Copy link

On the following page there is a link in the code:

download <- function(name) {
  url <- "https://github.com/hadley/mastering-shiny/raw/master/neiss/"
  [download.file](https://rdrr.io/r/utils/download.file.html)([paste0](https://rdrr.io/r/base/paste.html)(url, name), [paste0](https://rdrr.io/r/base/paste.html)("neiss/", name), quiet = TRUE)
}

The link is broken.

It should be:

https://github.com/hadley/mastering-shiny/tree/main/neiss

Not

https://github.com/hadley/mastering-shiny/raw/master/neiss/.

Additionally, injuries <- vroom::[vroom](https://vroom.r-lib.org/reference/vroom.html)("neiss/injuries.tsv.gz") doesn't read in correctly.

@SprengelLeo
Copy link

SprengelLeo commented Oct 13, 2022

@pstevens-hawk
Copy link

I think "https://github.com/hadley/mastering-shiny/tree/main/neiss/" is the correct link but even after using that, I can't seem to use the code listed to open those files. The tsv files look like html or something like that as opposed to a tsv file. Is anyone else experiencing this?

@jialinx007
Copy link

I have the same issue as @MathGorilla. Even after updating the link to https://github.com/hadley/mastering-shiny/tree/main/neiss/. The vroom runs into errors about delim. I tried a few different delim options such as "\t" and " ". It does not read in the data as you show in the ebook (https://mastering-shiny.org/basic-case-study.html) as copied below.

products <- vroom::vroom("neiss/products.tsv")
products
#> # A tibble: 38 × 2
#> prod_code title
#>
#> 1 464 knives, not elsewhere classified
#> 2 474 tableware and accessories
#> 3 604 desks, chests, bureaus or buffets

@iaulike
Copy link

iaulike commented Nov 30, 2022

I think "https://github.com/hadley/mastering-shiny/tree/main/neiss/" is the correct link but even after using that, I can't seem to use the code listed to open those files. The tsv files look like html or something like that as opposed to a tsv file. Is anyone else experiencing this?

Yes. I’m just going to try to get the files from the neiss package: # install.packages("devtools")
devtools::install_github("hadley/neiss")

@jonthegeek jonthegeek linked a pull request Dec 12, 2022 that will close this issue
@JohnCost
Copy link

JohnCost commented Dec 23, 2022

I think "https://github.com/hadley/mastering-shiny/tree/main/neiss/" is the correct link but even after using that, I can't seem to use the code listed to open those files. The tsv files look like html or something like that as opposed to a tsv file. Is anyone else experiencing this?

Yes. I’m just going to try to get the files from the neiss package: # install.packages("devtools") devtools::install_github("hadley/neiss")

I think that the reason that the tsv files are not as expected is that the link you are using has changed 'raw' to 'tree', as well as 'master' to 'main'. When using curl to download the raw data you need to use the url with raw in the path. In this case "https://github.com/hadley/mastering-shiny/raw/main/neiss/" works for me.

@Mkranj Mkranj linked a pull request Jan 4, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants