appliedepi / case_studies

0 stars 0 forks source link

Bring in data package #24

Closed PBBlomquist closed 1 month ago

PBBlomquist commented 1 month ago

Hello! I've looked through the package: https://appliedepi.github.io/appliedepidata/index.html

Questions/thoughts

Steps for me: I will start writing the instructions for users, for inside the case studies. I think it will basically be the following plus narrative (plus tweaks based on your answers above)

  1. Install the appliedepidata package install.packages("pak") pak::pak("appliedepi/appliedepidata")

  2. Import the XXXX dataset using the appliedepidata packageget_data("XXXX")

  3. You can also save the XXX dataset to your own computer. Make sure you do this into an appropriate folder, ideally in your R Project. save_data("XXXXX")

For more information on how to use this package, see: https://appliedepi.github.io/appliedepidata/index.html

aspina7 commented 1 month ago
* get_data(): could that print the data if written as is, and then saves to environment with whatever object name you want with assignment operator?

I thought about doing this, it is an option, I would just add a line in the function to use return(...). But the reason decided against it because datasets that had multiple excel sheets they are stored as lists and I wanted to make that less scary for users (i.e. they would assign to an object then have to unlist).

* save_data(): what is the reason the default is xlsx? I guess easier for most of our users?

It can be anything - it is just whatever the original dataset was (xlsx, shapefile, whatever else...).

* Why use pak rather than remotes for installation? Is this something we'd do as applied epi across github installations now?

No reason at all - it is just default when you create a package repo with the {usethis} helper functions. Probably just stick with remotes for now.

* datasets - would you like me to put more rdas into the data folder of the appliedepidata repo? I see the downloadable version also in extdata.

Yes I think it would be good if you added the case study datasets. You put the original in extdata (e.g. the excel sheet). And then transform to an rda (can jump on a call if not clear).

Steps for me: I will start writing the instructions for users, for inside the case studies. I think it will basically be the following plus narrative (plus tweaks based on your answers above)

Yes that sounds good - just use remotes...