Upload food nutrition data
This example displays the size and structure of a filtered USDA foundation food nutrition dataset from 2020, showing the file size in kilobytes, the number of data rows, and the number of columns. It fetches a remote CSV file using `d3.csv` and then formats the result with `d3.csvFormat` to calculate the data’s byte length. The output is rendered as large text in a `<pre>` element using the `document.getElementById` and `textContent` API.
AI-generated descriptionFoundation food nutrition
This data is about nutrition in foundation food that recently acquired (by 2020).
Foods whose nutrient and food component values are derived primarily by chemical analysis.
Original data is from US Department of Agriculture, published in April 2021. I have filtered data on foundation food only and acquiring date by 2020
Variables of interest:
| Name | Type | Description |
|---|---|---|
| Description | categorical | Food description |
| name | categorical | Nutrition name |
| amount | quantitative | Amount of the nutrient per 100g of food. |
| unit_name | categorical | The standard unit of measure for the nutrient (per 100g of food) |
Possible questions:
- In a specific nutrition category, say Zinc, what foods contains the most Zinc and what foods contains the least.
- Look at different categories that important to human bodies, such as Zinc, fiber, vitamin, etc.. and answer question 1.
*This is a part of week 2 assignment: Load Your Data