allisonhorst / palmerpenguins

A great intro dataset for data exploration & visualization (alternative to iris).
https://allisonhorst.github.io/palmerpenguins/
Creative Commons Zero v1.0 Universal
875 stars 206 forks source link

Include data as csv files? #51

Open ttimbers opened 4 years ago

ttimbers commented 4 years ago

One really great aspect of the gapminder package is that it includes the tsv files so that learners can also practice reading data in from a file. Would that be possible to add here? Is there interest for this feature (beyond myself)?

apreshill commented 4 years ago

Hi @ttimbers!

Yes we have this function for working with the two *.csv files: https://allisonhorst.github.io/palmerpenguins/reference/path_to_file.html

So you can do:

pp <- readr::read_csv(path_to_file("penguins_raw.csv"))

Were you wanting specifically *.tsv files though?

ttimbers commented 4 years ago

Oh perfect, I missed these (I was looking for them in the data directories and did not see them). One addition that could be nice for this package for teaching, related to the tsv's, is having the data set stored a few different different ways (tsv, an excel file, white space delimited, some meta data at the top or bottom) to have a practice set for reading in files into R and getting the know the readr and readxl package functions. Perhaps there is already another package/repo that has this kind of resource and I am not aware of it? I just thought this could be nice for this as this data set isn't too big?

apreshill commented 4 years ago

Gotcha! That does sound useful for teaching. I spoke with @allisonhorst and we are both game, but have some penguin fatigue 🐧 and are catching up after a brief sprint to submit to CRAN last week. We'll leave this issue open for now, and note that PRs are most welcome here if you have the inclination 🌟

ttimbers commented 4 years ago

No worries about the penguin fatgue 😆 ! I am happy send a PR for this in the next couple weeks.

allisonhorst commented 4 years ago

Awesome! Thank you!