This notebook is a copy of David's notebook of the same name, but using the Metapack datapackages.
In [1]:
import pandas as pd
# For development and debugging
#%load_ext autoreload
#%autoreload 2
In [2]:
import metatab
p = metatab.open_package('/Volumes/Storage/proj/virt-proj/data-projects/healthy-food-access/packages/fns.usda.gov-f2s_census/fns.usda.gov-f2s_census-2015-1')
p
Out[2]:
Farm To School Census
fns.usda.gov-f2s_census-2015-1
This file contains the raw data for all public school districts, private schools, and charter schools (SFAs) that completed the 2015 USDA Farm to School Census. Results can also be found online at https://farmtoschoolcensus.fns.usda.gov.
Documentation
About the Census Detailed of the survey design, data collection and links to datasets.
Common Core of Data Documentatino for the variables linked from the Common Core of Data.
Note: Notes for the 'census' file'
Note: The QuestionSource, Universe, Definition, CodesNotes and QuestionText properties in the schema are taken from the datasets 'Variable Map” data file
Note: However, the variable map diverges from the column headers after colum 223. The remaining columns are from the Common Core of Data.
Note: The file includes matched data from the Common Core of Data (school year 2013-2014) found at https://nces.ed.gov/ccd/pubagency.asp.
Note: The variable map tab describes the coding for each of variables created from the Census data and select variables from the Common Core of Data. All variables matched from the Common Core of Data are described at https://nces.ed.gov/ccd/pdf/2015147_2013-14_LEA_documentation_v1a.pdf.
Note: For detailed information about how this data was collected and analyzed, please visit https://farmtoschoolcensus.fns.usda.gov/about.
Note: All of the data are self-reported and may conflict with other data sources.
Note: If you have questions about the data file or plan to use the data to complete additional analysis, please contact Matthew Benson at matthew.benson@fns.usda.gov.
Note: Updated online October 31, 2016- v1c.
Note: Notes for the state_* files
Note: For the state_census file, the totcost, totdolinclmilk, totdolexclmilk are included in the variable map, but these varibles are actually part of the state_dollar data schema. This files columns diverge from the Variable map after the pctinterstate
variable.
Note: This file contains state, territory, and national level summary statistics for those public school districts, private schools, and charter schools (SFAs) that completed the 2015 USDA Farm to School Census.
Note: All of the respondent data are self-reported and may conflict with other data sources.
Note: For detailed information about how this data was collected and analyzed, please visit https://farmtoschoolcensus.fns.usda.gov/about.
Note: If you have questions about the data file or plan to use the data to complete additional analysis, please contact Matthew Benson at matthew.benson@fns.usda.gov.
Note: The state level CCD estimates tab summarizes the number of schools and students participating in farm to school activities using the Common Core of Data.
Note: The state level dollar estimates tab summarizes the dollars spent on all food and local food (including and excluding fluid milk).
Note: The variable map tab describes the coding for each of variables created from the Census data.
Contacts
Origin: Farm To School Program United States Department of Agriculture
Wrangler: Eric Busboom Civic Knowledge
Resources
state_census - data/state_census.csv This file contains state, territory, and national level summary statistics for those public school districts, private schools, and charter schools (SFAs) that completed the 2015 USDA Farm to School Census.
state_ccd - data/state_ccd.csv The state level CCD estimates tab summarizes the number of schools and students participating in farm to school activities using the Common Core of Data.
state_dollar - data/state_dollar.csv The state level dollar estimates tab summarizes the dollars spent on all food and local food (including and excluding fluid milk).
census - data/census.csv 2015 Farm to School Census Repondent Data (Updated 10/31/16)
In [3]:
r = p.resource('census')
r
Out[3]:
census
Header Type Description sfaname text Name of SFA from list frame
state text State
husscawardwinner text Designates winner of HUSSC (Healthier U.S. School Challenge) award
oneinamelonwinner text Designates state winner of One in a Melon award
oneinamelonstory text Sample story submitted by general public for One in a Melon award
usdaf2sgrantee text Designates recipients of a USDA Farm to School Grant (FY13-FY16)
topdistricts text Designates top school district for that state in farm to school during SY 2013-2014
newzipc text Zipcode (original response)
sfaid text State's school food authority ID
year integer Year Census was fielded
region text FNS region state resides in
coding integer Classifies which FNS region the state resides in
f2s integer Conducts farm to school activities
benenjoyed2red text Started to enjoy reduced food waste as a benefit of farm to school. (SY 2014-2015)
benenjoyed2low text Started to enjoy lower school meal program costs as a benefit of farm to school (SY 2014-2015)
benenjoyed2acc text Started to enjoy greater acceptance of the new meal pattern as a benefit of farm to school (SY 2014-2015)
benenjoyed2inc text Started to enjoy increased participation in school meals as a benefit of farm to school (SY 2014-2015)
benenjoyed2com text Started to enjoy greater community support for school meals as a benefit of farm to school (SY 2014-2015)
benenjoyed2oth text Started to enjoy other benefit of farm to school.
localdef2014 text Definition of "local"
localdefothr2014 text Other definition of "local"
startserv text Started serving locally produced foods in the cafeteria (SY 2014-2015)
startsmrtsnack text Started serving locally produced foods as a Smart Snack (a la carte, as fundraisers, etc.) (SY 2014-2015)
startaftrschool text Started serving locally produced food or providing farm to school activities as part of afterschool programs. (SY 2014-2015)
startsrvg text Started serving products from school-based gardens or school-based farms in the cafeteria (SY 2014-2015)
starttaste text Started holding taste testing/demos of locally produced foods in the cafeteria, classroom, or other school-related setting (SY 2014-2015)
startgrdntst text Started holding taste testing/demos of product from school-based gardens or school-based farms in the cafeteria, classroom or other school-related setting (SY 2014-2015)
startstrategies text Started using Smarter Lunchroom strategies to encourage student selection and consumption of locally produced foods (e.g., product placement, food prompts, creative signage, etc..) (SY 2014-2015)
startuse text Started using cafeteria food coaches (e.g. adults or students in the cafeteria encouraging kids to eat health/local foods) (SY 2014-2015)
startusdamat text Started using USDA Team Nutrition materials (such as The Great Garden Detective Adventure or Dig In!) as part of taste testing or educational activities. (SY 2014-2015)
startgrdn text Started conducting edible school gardening or orchard activities as part of a school curriculum (SY 2014-2015)
startgrdnas text Started conducting edible school gardening or orchard activities as part of an after school program (SY 2014-2015)
starttrip text Started conducting student field trips to farms or orchards (SY 2014-2015)
startvisit text Started having farmer(s) visit the cafeteria, classroom or other school-related setting. (SY 2014-2015)
starttheme text Started promoting local efforts through themed or branded promotions (e.g. Harvest of the Month, Local Day, Taste of Washington, etc..) (SY 2014-2015)
startprom text Started promoting locally produced foods at school in general (e.g. via cafeteria signs, posters, newsletters, etc.) (SY 2014-2015)
startmedia text Started generating media coverage of local foods being used in schools (e.g. press interviews or other activities that
resulted in local coverage) (SY 2014-2015)
starthost text Started hosting farm to school related community events (e.g. invited parents to lunch, corn shucking contests, etc.) (SY 2014-2015)
startceleb text Started celebrating Farm to School Month (October 2014) (SY 2014-2015)
startinteg text Started Integrating farm to school concepts, including school gardening activities, into educational curriculum
(math, science, language arts, etc.) (SY 2014-2015)
starttrng text Started providing training to school food service staff on farm to school or school gardens (SY 2014-2015)
startproducer text Started working with local food producers to develop a specific food product using local foods (SY 2014-2015)
startimplement text Started implementing farm to school activities as part of overall school efforts to reduce food waste (SY 2014-2015)
startevaluate text Started evaluating changes in student acceptance and food waste as a result of implementing farm to school
activities (SY 2014-2015)
startothrspec text Started other activity in SY 2014-2015
benpercred text Planing to enjoy reduced food waste as a benefit of farm to school
benperclow text Planning to enjoy lower school meal program costs as a benefit of farm to school
benpercacc text Planning to enjoy greater acceptance of the new meal pattern as a benefit of farm to school
benpercinc text Planning to enjoy increased participation in school meals as a benefit of farm to school
benperccom text Planning to enjoy greater community support for school meals as a benefit of farm to school
benpercoth text Planning to enjoy other benefit of farm to school.
planserv text Planning to serve locally produced foods in the cafeteria (future)
plansmrtsnack text Planning to serve locally produced foods as a Smart Snack (a la carte, as fundraisers, etc.) (future)
planaftrschool text Planning to serve locally produced foods or providing farm to school activities as part of afterschool programs (future)
plansrvg text Planning to serve products from school-based gardens or school-based farms in the cafeteria (future)
plantaste text Planning to hold taste tests/cooking demonstrations of locally produced foods in the cafeteria, classroom or other school-related setting (future)
plangrdntst text Planning to hold taste tests/demos of products from school-based gardens or school-based farms in the cafeteria,
classroom or other school-related setting (future)
planstrategies text Planning to use Smarter Lunchroom strategies to encourage student selection and consumption of locally produced foods (e.g., product placement, food prompts, creative signage, etc.) (future)
planuse text Planning to use cafeteria food coaches to promote the consumption of local foods (e.g. adults or students in the
cafeteria encouraging kids to eat healthy/local foods) (future)
planusdamat text Planning to use USDA Team Nutrition materials (such as The Great Garden Detective Adventure or Dig In!) as part of taste testing or educational activities (future)
plangrdn text Planning to conduct edible school gardening or orchard activities as part of a school curriculum (future)
plangrdnas text Planning to conduct edible school gardening or orchard activities as part of an after school program (future)
plantrip text Planning to conduct student field trips to farms or orchards (future)
planvisit text Planning to have farmer(s) visit the cafeteria, classroom or other school-related setting (future)
plantheme text Planning to promote local efforts through themed or branded promotions (e.g. Harvest of the Month, Local Day, Taste of Washington, etc.)
planprom text Planning to promote locally produced foods at school in general (e.g. via cafeteria signs, posters, newsletters, etc.) (future)
planmedia text Planning to generate media coverage of local foods being used in schools (e.g. press interviews or other activities that
resulted in local coverage) (future)
planhost text Planning to host farm to school related community events (e.g. invited parents to lunch, corn shucking contests, etc.) (future)
planceleb text Planning to celebrate Farm to School Month (future)
planinteg text Planning to integrate farm to school concepts, including school gardening activities, into educational curriculum
(math, science, language arts, etc.) (future)
plantrng text Planning to provide training to school food service staff on farm to school or school gardens (future)
planproducers text Planning to work with local food producers to develop a specific food product using local foods (future)
planimplement text Planning to implement farm to school activities as part of overall school efforts to reduce food waste (future)
planevaluate text Planning to evaluate changes in student acceptance and food waste as a result of implementing farm to school activities (future)
planothrspec text Planning other farm to school activity (future)
whenstart text When farm to school activities planned to start.
probbidf2sno text Local producers aren't bidding (no plan)
probseasf2sno text Hard to find year-round availability of key items (no plan)
probcoordf2sn text Hard to coordinate procurement of local with regular procurement
probavailf2sno text Local items not available from primary vendors (no plan)
probrangef2sno text Vendors for local items don't offer a broad range of products (no plan)
probhighf2sno text Higher prices (no plan)
probunstablef2sno text Unstable product prices (no plan)
probreliabf2sno text Lack of reliability in delivering ordered items (no plan)
probequipf2sno text Lack of kitchen equipment to process/prepare local foods. (no plan)
probgapf2sno text GAP or other food safety requirements (no plan)
probcomplf2sno text Lack of compliance with your institution's purchasing regulations and policies (no plan)
probprocf2sno text Lack of availability of processed/precut products (no plan)
probsupplierf2sno text Hard to find new suppliers/growers or distributors (no plan)
probinfooff2sno text Hard to get information about product availability (no plan)
proborderf2sno text Hard to place orders with vendors (no plan)
probtimef2sno text Getting on time deliveries (no plan)
probqualf2sno text Getting product delivered that meets your quality requirements & other specs (i.e., size) (no plan)
probdelivf2sno text Having quantity delivered equal to quantity ordered (no plan)
probresolvf2sno text Resolving problem deliveries (no plan)
probpayf2sno text Inability to pay farmers according to farmers' needs due to school district payment procedures (no plan)
probothrf2sno text Other problem with local procurement (no plan)
benenjoyed1red text Enjoying reduced food waste as a benefit of farm to school (SY 2013-2014)
benenjoyed1low text Enjoying lower school meal program costs as a benefit of farm to school (SY 2013-2014)
benenjoyed1acc text Enjoying greater acceptance of the new meal pattern as a benefit of farm to school (SY 2013-2014)
benenjoyed1inc text Enjoying increased participation in school meals as a benefit of farm to school (SY 2013-2014)
benenjoyed1com text Enjoying greater community support for school meals as a benefit of farm to school (SY 2013-2014)
benenjoyed1oth text Enjoying other benefit of farm to school.
ageprek text Pre-K participated in farm to school activities.
agek5 text Grades K-5 participated in farm to school activities.
age68 text Grades 6-8 participated in farm to school activities.
age912 text Grades 9-12 participated in farm to school activities.
ageothr1 text Other age group participated in farm to school activities.
cacfpyes text Participating in the Child and Adult Care Food Program (CACFP)
cacfpno text Not participating in Child and Adult Care Food Program (CACFP)
cacfpidk text Don’t know if participating in Child and Adult Care Food Program (CACFP)
schoolnum text Number of schools participating.
gardennum text Number of schools with school gardens.
saladbarnum text Numberof schools with salad bars.
localdef2013 text Definition of "local"
locdefothr2013 text Other definition of "local"
usedbreak text Used local foods in breakfast program
usedlunch text Used local foods in lunch program
usedsup text Used local foods in supper program
usedsnack text Used local foods in snacks program
usedffvp text Used local foods in Fresh Fruit and Vegetable Program
usedcacfp text Used local foods in CACFP (i.e., in a pre-k setting such as Head Start, etc.) program
usedcacfpas text Used local foods in CACFP at-risk afterschool program
usedsumr text Used local foods in summer meals program (i.e., meals in the summer food service program, in Seamless Summer, or in the NLSP under accredited summer school programs)
directprod text Obtains local food direct from individual food producers (i.e. farmers, fishers, ranchers)
directcoop text Obtains local food direct from farmer, rancher, or fisher cooperatives
directfmkt text Obtains local food direct from farmers markets
directcsa text Obtains local food via a Community Supported Agriculture (CSA) model
directmanu text Obtains local food direct from food processors and manufacturers
interdist text Obtains local food from distributors
intercoop text Obtains local food from food buying cooperative
interfood text Obtains local food from food hub
interfsmc text Obtains local food from food service management companies
interdod text Obtains local food from DoD Fresh Program vendors
interusda text Obtains local food from USDA foods
interstate text Obtains local food from State Farm to School program office
interothr text Obtains local food from other intermediary source
fruit text Bought local fruit
veg text Bought local vegetables
milk text Bought local milk
dairy text Bought local other dairy
meat text Bought local other meat
eggs text Bought local eggs
seafd text Bought local seafood
vegprot text Bought local plant-based protein items such as beans, seeds, nuts.
grain text Bought local grains and flour
baked text Bought local bakery products
herb text Bought local herbs.
othr text Bought other food.
specothrpurch text Other food bought
top1 text First of top 5 local food items
top2 text Second of top 5 local food items
top3 text Third of top 5 local food items
top4 text Fourth of top 5 local food items
top5 text Fifth of top 5 local food items.
top5list text Concatenated list of top 5 local food items
fruitfreq text Frequency of serving local fruit
vegfreq text Frequency of serving local vegables
milkfreq text Frequency of serving local milk
dairyfreq text Frequency of serving local dairy products
meatfreq text Frequency of serving local meat
eggsfreq text Frequency of serving local eggs
seafdfreq text Frequency of serving local seafood
vegprotfreq text Frequency of serving local plant-based protein items such as beans, seeds, nuts
grainfreq text Frequency of serving local grains and flour
bakedfreq text Frequency of serving local bakery products
herbfreq text Frequency of serving local herbs
othrfreq text Frequency of serving other food
specothrfreq text Other food frequency
newcost text Total food expenditures
newcostmilk text Food expenditure (local foods) including milk
pct_newcostmilk text Percent of foodcost that was local, including fluid milk
newcostnomilk text Food expenditure (local foods) not including milk
pct_newcostnomilk text Percent of foodcost that was local, not including fluid milk
future text Expected future local purchases
futureothr text Expected future local purchases, specified other
serv text Served locally produced foods in the cafeteria (SY 2013-2014)
smrtsnack text Served locally produced foods as a Smart Snack (a la carte, as fundraisers, etc.) (SY 2013-2014)
aftrschool text Served locally produced food or providing farm to school activities as part of afterschool programs. (SY 2013-2014)
srvg text Served products from school-based gardens or school-based farms in the cafeteria (SY 2013-2014)
taste text Held taste testing/demos of locally produced foods in the cafeteria, classroom, or other school-related setting (SY 2013-2014)
demo text Held taste testing/demos of product from school-based gardens or school-based farms in the cafeteria, classroom or other school-related setting (SY 2013-2014)
strategies text Used Smarter Lunchroom strategies to encourage student selection and consumption of locally produced foods (e.g., product placement, food prompts, creative signage, etc..) (SY 2013-2014)
coach text Used cafeteria food coaches (e.g. adults or students in the cafeteria encouraging kids to eat health/local foods) (SY 2013-2014)
usdamat text Used USDA Team Nutrition materials (such as The Great Garden Detective Adventure or Dig In!) as part of taste testing or educational activities. (SY 2013-2014)
grdn text Conducted edible school gardening or orchard activities as part of a school curriculum (SY 2013-2014)
grdnas text Conducted edible school gardening or orchard activities as part of an after school program (SY 2013-2014)
trip text Conducted student field trips to farms or orchards (SY 2013-2014)
visit text Had farmer(s) visit the cafeteria, classroom or other school-related setting. (SY 2013-2014)
theme text Promoted local efforts through themed or branded promotions (e.g. Harvest of the Month, Local Day, Taste of Washington, etc..) (SY 2013-2014)
prom text Promoted locally produced foods at school in general (e.g. via cafeteria signs, posters, newsletters, etc.) (SY 2013-2014)
media text Generated media coverage of local foods being used in schools (e.g. press interviews or other activities that
resulted in local coverage) (SY 2013-2014)
host text Hosted farm to school related community events (e.g. invited parents to lunch, corn shucking contests, etc.) (SY 2013-2014)
celeb text Celebrated Farm to School Month (October 2013) (SY 2013-2014)
integ text Integrated farm to school concepts, including school gardening activities, into educational curriculum
(math, science, language arts, etc.) (SY 2013-2014)
trng text Provided training to school food service staff on farm to school or school gardens (SY 2013-2014)
producers text Worked with local food producers to develop a specific food product using local foods (SY 2013-2014)
implement text Implemented farm to school activities as part of overall school efforts to reduce food waste (SY 2013-2014)
evaluate text Evaluated changes in student acceptance and food waste as a result of implementing farm to school
activities (SY 2013-2014)
othr2013spec text Other farm to school activity (SY 2013-2014)
probbid2013 text Local producers aren't bidding (conducts f2s)
probseas2013 text Hard to find year-round availability of key items (conducts f2s)
probcoord2013 text Hard to coordinate procurement of local with regular procurement (conducts f2s)
probavail2013 text Local items not available from primary vendors (conducts f2s)
probrange2013 text Vendors for local items don't offer a broad range of products (conducts f2s)
probhigh2013 text Higher prices (conducts f2s)
probunstable2013 text Unstable product prices (conducts f2s)
probreliab2013 text Lack of reliability in delivering ordered items (conducts f2s)
probequip2013 text Lack of kitchen equipment to process/prepare local foods. (conducts f2s)
probgap2013 text GAP or other food safety requirements (conducts f2s)
probcompl2013 text Lack of compliance with your institution's purchasing regulations and policies (conducts f2s)
probproc2013 text Lack of availability of processed/precut products (conducts f2s)
probsupplier2013 text Hard to find new suppliers/growers or distributors (conducts f2s)
probinfo2013 text Hard to get information about product availability (conducts f2s)
proborder2013 text Hard to place orders with vendors (conducts f2s)
probtime2013 text Getting on time deliveries (conducts f2s)
probqual2013 text Getting product delivered that meets your quality requirements & other specs (i.e., size) (conducts f2s)
probdeliv2013 text Having quantity delivered equal to quantity ordered (conducts f2s)
probresolv2013 text Resolving problem deliveries (conducts f2s)
probpay2013 text Inability to pay farmers according to farmers' needs due to school district payment procedures (conducts f2s)
probothr12013 text Other problem with local procurement (conducts f2s)
othrinfo text Other information
success text Success story
survyear integer
leaid integer
fipst integer
stid text
name text
phone text
mstree text
mcity text
mzip4 text
lstree text
lcity text
lstate text
lzip integer
lzip4 text
type integer
union text
conum integer
coname text Name of county SFA resides in
csa text
cbsa text
metmic integer
ulocal integer
cdcode integer
latcod number
loncod number
biea integer
bound integer
amempup integer
iamempup text
aftepup integer
iaftepup text
aspeced integer
iaspeced text
aell integer
iaell text
aaidcorsup integer
iaaidcorsup text
aguid integer
iaguid text
alibstf integer
ialibstf text
aleaadm integer
ialeaadm text
aschadm integer
iaschadm text
asupstf integer
iasupstf text
gslo text
gshi text
pkoffrd integer
kgoffrd integer
g01offrd integer
g02offrd integer
g03offrd integer
g04offrd integer
g05offrd integer
g06offrd integer
g07offrd integer
g08offrd integer
g09offrd integer
g10offrd integer
g11offrd integer
g12offrd integer
ugoffrd integer
agchrt text
sch integer Percentage of students eligible for free or reduced price school meals
speced integer
ell integer
pktch number
kgtch number
elmtch number
sectch number
ugtch number
tottch number
aides number
corsup number
elmgui number
secgui number
othgui number
totgui number
libspe number
libsup number
leaadm number
leasup number
schadm number
schsup number
stusup number
othsup number
pk integer
ampkm integer
ampkf integer
aspkm integer
aspkf integer
hipkm integer
hipkf integer
blpkm integer
blpkf integer
whpkm integer
whpkf integer
hppkm integer
hppkf integer
trpkm integer
trpkf integer
kg integer
amkgm integer
amkgf integer
askgm integer
askgf integer
hikgm integer
hikgf integer
blkgm integer
blkgf integer
whkgm integer
whkgf integer
hpkgm integer
hpkgf integer
trkgm integer
trkgf integer
g01 integer
am01m integer
am01f integer
as01m integer
as01f integer
hi01m integer
hi01f integer
bl01m integer
bl01f integer
wh01m integer
wh01f integer
hp01m integer
hp01f integer
tr01m integer
tr01f integer
g02 integer
am02m integer
am02f integer
as02m integer
as02f integer
hi02m integer
hi02f integer
bl02m integer
bl02f integer
wh02m integer
wh02f integer
hp02m integer
hp02f integer
tr02m integer
tr02f integer
g03 integer
am03m integer
am03f integer
as03m integer
as03f integer
hi03m integer
hi03f integer
bl03m integer
bl03f integer
wh03m integer
wh03f integer
hp03m integer
hp03f integer
tr03m integer
tr03f integer
g04 integer
am04m integer
am04f integer
as04m integer
as04f integer
hi04m integer
hi04f integer
bl04m integer
bl04f integer
wh04m integer
wh04f integer
hp04m integer
hp04f integer
tr04m integer
tr04f integer
g05 integer
am05m integer
am05f integer
as05m integer
as05f integer
hi05m integer
hi05f integer
bl05m integer
bl05f integer
wh05m integer
wh05f integer
hp05m integer
hp05f integer
tr05m integer
tr05f integer
g06 integer
am06m integer
am06f integer
as06m integer
as06f integer
hi06m integer
hi06f integer
bl06m integer
bl06f integer
wh06m integer
wh06f integer
hp06m integer
hp06f integer
tr06m integer
tr06f integer
g07 integer
am07m integer
am07f integer
as07m integer
as07f integer
hi07m integer
hi07f integer
bl07m integer
bl07f integer
wh07m integer
wh07f integer
hp07m integer
hp07f integer
tr07m integer
tr07f integer
g08 integer
am08m integer
am08f integer
as08m integer
as08f integer
hi08m integer
hi08f integer
bl08m integer
bl08f integer
wh08m integer
wh08f integer
hp08m integer
hp08f integer
tr08m integer
tr08f integer
g09 integer
am09m integer
am09f integer
as09m integer
as09f integer
hi09m integer
hi09f integer
bl09m integer
bl09f integer
wh09m integer
wh09f integer
hp09m integer
hp09f integer
tr09m integer
tr09f integer
g10 integer
am10m integer
am10f integer
as10m integer
as10f integer
hi10m integer
hi10f integer
bl10m integer
bl10f integer
wh10m integer
wh10f integer
hp10m integer
hp10f integer
tr10m integer
tr10f integer
g11 integer
am11m integer
am11f integer
as11m integer
as11f integer
hi11m integer
hi11f integer
bl11m integer
bl11f integer
wh11m integer
wh11f integer
hp11m integer
hp11f integer
tr11m integer
tr11f integer
g12 integer
am12m integer
am12f integer
as12m integer
as12f integer
hi12m integer
hi12f integer
bl12m integer
bl12f integer
wh12m integer
wh12f integer
hp12m integer
hp12f integer
tr12m integer
tr12f integer
ug integer
amugm integer
amugf integer
asugm integer
asugf integer
hiugm integer
hiugf integer
blugm integer
blugf integer
whugm integer
whugf integer
hpugm integer
hpugf integer
trugm integer
trugf integer
member integer Total number of students in the district
am integer
amalm integer
amalf integer
asian integer
asalm integer
asalf integer
hisp integer
hialm integer
hialf integer
black integer
blalm integer
blalf integer
white integer
whalm integer
whalf integer
pacific integer
hpalm integer
hpalf integer
tr integer
tralm integer
tralf integer
toteth integer
chrtleastat text
mzip text
ccdnum integer
farmrate number Percentage of students eligible for free or reduced price school meals
I filtered the data below for schools in CA, in San Diego County, and that have either already been participating in F2S in some capacity or have just started in the 2014-2015 school year.
In [4]:
# Read in the excel file and display
census_df = r.dataframe()
In [5]:
census_df.loc[:4].T
Out[5]:
0
1
2
3
4
sfaname
Alaska Gateway School District
Aleutians East Borough School District
Annette Island School District
Bering Strait School District
Bristol Bay Borough School District
state
AK
AK
AK
AK
AK
husscawardwinner
None
None
None
None
None
oneinamelonwinner
1.0
None
None
None
None
oneinamelonstory
Alaska Gateway has a great greenhouse program!
None
None
None
None
usdaf2sgrantee
1.0
None
None
None
None
topdistricts
1.0
None
None
None
None
newzipc
99780
99661
99926
99684
99633
sfaid
00301
05601
00601
00701
00801
year
2015
2015
2015
2015
2015
region
Western Region
Western Region
Western Region
Western Region
Western Region
coding
7
7
7
7
7
f2s
1
1
3
1
1
benenjoyed2red
None
None
None
None
None
benenjoyed2low
None
None
None
None
None
benenjoyed2acc
None
None
None
None
None
benenjoyed2inc
None
None
None
None
None
benenjoyed2com
None
None
None
None
None
benenjoyed2oth
None
None
None
None
None
localdef2014
None
None
None
None
None
localdefothr2014
None
None
None
None
None
startserv
None
None
None
None
None
startsmrtsnack
None
None
None
None
None
startaftrschool
None
None
None
None
None
startsrvg
None
None
None
None
None
starttaste
None
None
None
None
None
startgrdntst
None
None
None
None
None
startstrategies
None
None
None
None
None
startuse
None
None
None
None
None
startusdamat
None
None
None
None
None
...
...
...
...
...
...
hpugf
-2
-2
-2
-2
-2
trugm
-2
-2
-2
-2
-2
trugf
-2
-2
-2
-2
-2
member
404
249
292
1904
151
am
232
191
285
1887
91
amalm
120
104
149
988
45
amalf
112
87
136
899
46
asian
4
11
3
1
3
asalm
2
6
1
0
2
asalf
2
5
2
1
1
hisp
0
7
2
0
3
hialm
0
6
0
0
3
hialf
0
1
2
0
0
black
4
0
0
0
2
blalm
1
0
0
0
0
blalf
3
0
0
0
2
white
155
23
0
15
49
whalm
82
14
0
6
26
whalf
73
9
0
9
23
pacific
0
8
2
0
3
hpalm
0
4
0
0
2
hpalf
0
4
2
0
1
tr
9
9
0
1
0
tralm
4
6
0
0
0
tralf
5
3
0
1
0
toteth
404
249
292
1904
151
chrtleastat
NOTCHR
NOTCHR
NOTCHR
NOTCHR
NOTCHR
mzip
None
None
None
None
None
ccdnum
200050
200007
200525
200020
200030
farmrate
0.693069
0.51004
0.625571
0.814601
0.430464
563 rows × 5 columns
In [7]:
# Filter the dataframe, fill na values, and display
census_df_CA = census_df[census_df['state'] == 'CA']
census_df_SD = census_df_CA[census_df_CA['coname'] == 'SAN DIEGO COUNTY']
census_df_SD = census_df_SD[census_df_SD['f2s'] <= 2]
census_df_SD.fillna(0, inplace=True)
census_df_SD.head()
Out[7]:
sfaname
state
husscawardwinner
oneinamelonwinner
oneinamelonstory
usdaf2sgrantee
topdistricts
newzipc
sfaid
year
...
hpalm
hpalf
tr
tralm
tralf
toteth
chrtleastat
mzip
ccdnum
farmrate
706
Bonsall Union Elementary School District
CA
0
0
0
0
0
92003
02420
2015
...
7.0
7.0
129.0
73.0
56.0
2260.0
NOTCHR
92003
605670.0
0.354139
707
Borrego Springs Unified School District
CA
0
0
0
0
0
92004
02421
2015
...
0.0
0.0
16.0
9.0
7.0
521.0
NOTCHR
92004
605700.0
0.846449
722
Cajon Valley Union School District
CA
0
0
0
0
0
92022
02423
2015
...
37.0
49.0
1011.0
509.0
502.0
16420.0
NOTCHR
92022
606810.0
0.641973
756
Chula Vista Elementary School District
CA
0
0
0
0
0
91910
02427
2015
...
73.0
87.0
879.0
441.0
438.0
29472.0
NOTCHR
0
608610.0
0.493282
788
Del Mar Union Elementary School District
CA
0
0
0
0
0
92009
02433
2015
...
6.0
4.0
236.0
112.0
124.0
4376.0
NOTCHR
92130
610740.0
0.043717
5 rows × 563 columns
In [9]:
# Perform calculations and display
print('Number of school districts currently participating in F2S or started in 2014-2015 school year:',
len(list(census_df_SD['sfaname'].unique())))
print('Number of schools in those school districts:',
census_df_SD['schoolnum'].astype(int).sum())
print('Number of school gardens in those schools/districts:',
census_df_SD['gardennum'].astype(int).sum())
Number of school districts currently participating in F2S or started in 2014-2015 school year: 27
Number of schools in those school districts: 538
Number of school gardens in those schools/districts: 191
In [ ]:
Content source: sandiegodata/healthy-food-access
Similar notebooks: