> ## Content Index
> Fetch the complete content index at: https://www.bambooweekly.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Bamboo Weekly #4: Eating well
- URL: https://www.bambooweekly.com/bw-4-eating-well/
- Published: 2023-02-22T16:01:29.000Z
- Updated: 2026-08-06T10:46:10.000Z
- Description: Get practice working with SAS files, CSV files, and joins.
- Author: Reuven M. Lerner
- Tags: sas, csv, joins

## This week’s topic: Vegetables

Growing up, my family generally ate healthy food, including fruits and vegetables. Indeed, my mother always made sure that my school lunch had not just a sandwich, but also a yellow vegetable and a green vegetable. I certainly knew that the other children didn’t eat many vegetables, but it took a good number of years until I realized just how few many of my friends ate.

I was reminded of that when reading [a story in Axios several days ago](https://www.axios.com/2023/02/17/kids-eat-vegetables-map?ref=bambooweekly.com), in which they quoted a study from the Centers for Disease Control and Prevention (CDC), claiming that half of young American children were eating less than one vegetable per day. I mean, we know that Americans don’t eat a lot of fresh vegetables, and we know that kids can be picky eaters, but … wow, could that possibly be true? And it true throughout the US?

This week, we’ll try to find out, by looking at the data from that CDC study, known as the [National Survey of Children's Health](https://mchb.hrsa.gov/data-research/national-survey-childrens-health?ref=bambooweekly.com) (NSCH). The study looked at children 5 and younger, and asked all sorts of questions — not just about their eating habits, but also about such topics and allergies and speaking abilities. It also collected demographic information, including about race, which is important, but which we won’t look at here.

This week, I want you to download the data: [https://www.census.gov/programs-surveys/nsch/data/datasets.html](https://www.census.gov/programs-surveys/nsch/data/datasets.html?ref=bambooweekly.com). In particular, here’s what I want you to do:

- Download the topical data file, in SAS format, from:[https://www2.census.gov/programs-surveys/nsch/datasets/2021/nsch\_2021\_topical\_SAS.zip](https://www2.census.gov/programs-surveys/nsch/datasets/2021/nsch%5F2021%5Ftopical%5FSAS.zip?ref=bambooweekly.com). Turn it into a data frame. We're only interested in the following columns:
  - `FIPSST`
  - `VEGETABLES`
  - `FRUIT`
  - `SUGARDRINK`
- Turn the `FIPSST` column into an integer, and make it the index.
- What percentage of children had, on average, less than one vegetable per day during the week preceding the study?
- What percentage of children had, on average, less than one vegetable per day *and* less than one fruit per day during the week preceding the study?
- What percentage of children had, on average, less than one vegetable per day *and* less than one fruit per day *and* did have a sugary drink during the week preceding the study?
- Download the FIPS state reference info, in CSV format, from [https://www2.census.gov/geo/docs/reference/state.txt](https://www2.census.gov/geo/docs/reference/state.txt?ref=bambooweekly.com). Turn this into a data frame, with the `STATE` column as the index. The only other column we care about is `STATE_NAME`.
- What percentage of children, per state, had, on average, less than one vegetaable per day during the week preceding the study?

The learning goals for this week are to work with SAS-formatted data, using boolean operators, and joining data from two data frames together.

I’ll be back tomorrow (on Thursday) with my answers to these questions.

Reuven