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

Ch 6 data missing #3

Open
sandraleebatista opened this issue Nov 7, 2024 · 4 comments
Open

Ch 6 data missing #3

sandraleebatista opened this issue Nov 7, 2024 · 4 comments

Comments

@sandraleebatista
Copy link

Hello,
where can we find the food_nutrient.csv file to trace through the Chapter 6 code?
Thanks,
Sandra

@rlbarter
Copy link
Collaborator

rlbarter commented Nov 7, 2024

Hello Sandra,

Since this file is too large to host on GitHub, you can access it by following the instructions on the front page of this Git repo. https://github.com/Yu-Group/vds-book-supplementary

Scroll down to the "Downloading the supplementary materials in this repository" section

@sandraleebatista
Copy link
Author

Thank you. I downloaded the most recent data from October 2024. The problem that I still had but think I fixed is that in nutrient_name.csv file. The nutrient_id in that file was just the ID in the file; it was not matching when I did join in the cleaning function. When I went to the data website, it looks like the nutrient_nbr is the actually nutrient ID.
Can you please let me know if this is correct or not?

@rlbarter
Copy link
Collaborator

rlbarter commented Nov 7, 2024

Unfortunately, without seeing your code, it's quite difficult to understand what's gone wrong. The R and Python code on this repository should work with the downloaded version of the file.

There are several ID variable columns in the provided nutrient.csv file (1) id, (2) fdc_id, (3) nutrient_id. The nutrient_id column can be used to join to the nutrient_name.csv file and the fdc_id column can be used to join to the food.csv file.

You can also follow the code in the relevant .qmd or .ipynb files on this repository.

I hope that helps!

@sandraleebatista
Copy link
Author

nutrient_name.csv
This is the nutrient_name.csv file in the repo.
There is no nutrient.csv file, but was able to download from original site.
I tried to run the Python code directly from the repo when I had these issues.

thanks for your responsiveness and help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants