VLucet / rgovcan

Easy access to the Canadian Open Government Portal
https://vlucet.github.io/rgovcan/
21 stars 4 forks source link

Add file size to be download. #16

Closed KevCaz closed 3 years ago

KevCaz commented 3 years ago

Note that this is a PR based on your vcr branch.

Originally I worked on this PR to help you with vcr. I've tried to use vcr for the test, but there is something wrong that is somewhat linked with https://github.com/ropensci/crul/issues/150. I would need time to find out what's happening, but I think this is something that needs to be addressed in vcr, not here. This should not prevent you from proceeding with the submission, so I would skip most of the tests on CRAN (https://testthat.r-lib.org/articles/skipping.html).

What I would do though is a vignette and a pkgdown website. Would be happy to help.

VLucet commented 3 years ago

👏🏼 This looks great. I've got to come back to this package asap. Currently juggling a lot of stuff 😅 Happy to say the pkgdwon website is already up and running! https://vlucet.github.io/rgovcan/ Agree on the vignette, If you can help there this would be greatly appreciated!

KevCaz commented 3 years ago

Sorry I've missed the website. I'll do some modif on this PR to remove vcr, and I'll probably create another one for the vignette (do know when, probably this week).

KevCaz commented 3 years ago

@VLucet ,

I've changed tibble for dplyr because you're only using as_tibble(). TBH, I don't think you need tibble at all, you just need as.data.frame() and then you can add the class tibble so that when tibble is loaded, the user would see the data frame formatted as a tibble. I've used that trick in govcan_dl_resources.ckan_resource():

out <- structure(as.data.frame(out), class = c("tbl_df", "tbl", "data.frame"))
VLucet commented 3 years ago

Okay yes that makes complete sense. I really like this new feature, thanks Kevin!