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

Farm To School Home Page

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

  1. 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.

  2. 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.

  3. 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).

  4. 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

data/census.csv

HeaderTypeDescription
sfanametextName of SFA from list frame
statetextState
husscawardwinnertextDesignates winner of HUSSC (Healthier U.S. School Challenge) award
oneinamelonwinnertextDesignates state winner of One in a Melon award
oneinamelonstorytextSample story submitted by general public for One in a Melon award
usdaf2sgranteetextDesignates recipients of a USDA Farm to School Grant (FY13-FY16)
topdistrictstextDesignates top school district for that state in farm to school during SY 2013-2014
newzipctextZipcode (original response)
sfaidtextState's school food authority ID
yearintegerYear Census was fielded
regiontextFNS region state resides in
codingintegerClassifies which FNS region the state resides in
f2sintegerConducts farm to school activities
benenjoyed2redtextStarted to enjoy reduced food waste as a benefit of farm to school. (SY 2014-2015)
benenjoyed2lowtextStarted to enjoy lower school meal program costs as a benefit of farm to school (SY 2014-2015)
benenjoyed2acctextStarted to enjoy greater acceptance of the new meal pattern as a benefit of farm to school (SY 2014-2015)
benenjoyed2inctextStarted to enjoy increased participation in school meals as a benefit of farm to school (SY 2014-2015)
benenjoyed2comtextStarted to enjoy greater community support for school meals as a benefit of farm to school (SY 2014-2015)
benenjoyed2othtextStarted to enjoy other benefit of farm to school.
localdef2014textDefinition of "local"
localdefothr2014textOther definition of "local"
startservtextStarted serving locally produced foods in the cafeteria (SY 2014-2015)
startsmrtsnacktextStarted serving locally produced foods as a Smart Snack (a la carte, as fundraisers, etc.) (SY 2014-2015)
startaftrschooltextStarted serving locally produced food or providing farm to school activities as part of afterschool programs. (SY 2014-2015)
startsrvgtextStarted serving products from school-based gardens or school-based farms in the cafeteria (SY 2014-2015)
starttastetextStarted holding taste testing/demos of locally produced foods in the cafeteria, classroom, or other school-related setting (SY 2014-2015)
startgrdntsttextStarted 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)
startstrategiestextStarted 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)
startusetextStarted using cafeteria food coaches (e.g. adults or students in the cafeteria encouraging kids to eat health/local foods) (SY 2014-2015)
startusdamattextStarted 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)
startgrdntextStarted conducting edible school gardening or orchard activities as part of a school curriculum (SY 2014-2015)
startgrdnastextStarted conducting edible school gardening or orchard activities as part of an after school program (SY 2014-2015)
starttriptextStarted conducting student field trips to farms or orchards (SY 2014-2015)
startvisittextStarted having farmer(s) visit the cafeteria, classroom or other school-related setting. (SY 2014-2015)
startthemetextStarted promoting local efforts through themed or branded promotions (e.g. Harvest of the Month, Local Day, Taste of Washington, etc..) (SY 2014-2015)
startpromtextStarted promoting locally produced foods at school in general (e.g. via cafeteria signs, posters, newsletters, etc.) (SY 2014-2015)
startmediatextStarted 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)
starthosttextStarted hosting farm to school related community events (e.g. invited parents to lunch, corn shucking contests, etc.) (SY 2014-2015)
startcelebtextStarted celebrating Farm to School Month (October 2014) (SY 2014-2015)
startintegtextStarted Integrating farm to school concepts, including school gardening activities, into educational curriculum (math, science, language arts, etc.) (SY 2014-2015)
starttrngtextStarted providing training to school food service staff on farm to school or school gardens (SY 2014-2015)
startproducertextStarted working with local food producers to develop a specific food product using local foods (SY 2014-2015)
startimplementtextStarted implementing farm to school activities as part of overall school efforts to reduce food waste (SY 2014-2015)
startevaluatetextStarted evaluating changes in student acceptance and food waste as a result of implementing farm to school activities (SY 2014-2015)
startothrspectextStarted other activity in SY 2014-2015
benpercredtextPlaning to enjoy reduced food waste as a benefit of farm to school
benperclowtextPlanning to enjoy lower school meal program costs as a benefit of farm to school
benpercacctextPlanning to enjoy greater acceptance of the new meal pattern as a benefit of farm to school
benpercinctextPlanning to enjoy increased participation in school meals as a benefit of farm to school
benperccomtextPlanning to enjoy greater community support for school meals as a benefit of farm to school
benpercothtextPlanning to enjoy other benefit of farm to school.
planservtextPlanning to serve locally produced foods in the cafeteria (future)
plansmrtsnacktextPlanning to serve locally produced foods as a Smart Snack (a la carte, as fundraisers, etc.) (future)
planaftrschooltextPlanning to serve locally produced foods or providing farm to school activities as part of afterschool programs (future)
plansrvgtextPlanning to serve products from school-based gardens or school-based farms in the cafeteria (future)
plantastetextPlanning to hold taste tests/cooking demonstrations of locally produced foods in the cafeteria, classroom or other school-related setting (future)
plangrdntsttextPlanning 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)
planstrategiestextPlanning 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)
planusetextPlanning 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)
planusdamattextPlanning 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)
plangrdntextPlanning to conduct edible school gardening or orchard activities as part of a school curriculum (future)
plangrdnastextPlanning to conduct edible school gardening or orchard activities as part of an after school program (future)
plantriptextPlanning to conduct student field trips to farms or orchards (future)
planvisittextPlanning to have farmer(s) visit the cafeteria, classroom or other school-related setting (future)
planthemetextPlanning to promote local efforts through themed or branded promotions (e.g. Harvest of the Month, Local Day, Taste of Washington, etc.)
planpromtextPlanning to promote locally produced foods at school in general (e.g. via cafeteria signs, posters, newsletters, etc.) (future)
planmediatextPlanning to generate media coverage of local foods being used in schools (e.g. press interviews or other activities that resulted in local coverage) (future)
planhosttextPlanning to host farm to school related community events (e.g. invited parents to lunch, corn shucking contests, etc.) (future)
plancelebtextPlanning to celebrate Farm to School Month (future)
planintegtextPlanning to integrate farm to school concepts, including school gardening activities, into educational curriculum (math, science, language arts, etc.) (future)
plantrngtextPlanning to provide training to school food service staff on farm to school or school gardens (future)
planproducerstextPlanning to work with local food producers to develop a specific food product using local foods (future)
planimplementtextPlanning to implement farm to school activities as part of overall school efforts to reduce food waste (future)
planevaluatetextPlanning to evaluate changes in student acceptance and food waste as a result of implementing farm to school activities (future)
planothrspectextPlanning other farm to school activity (future)
whenstarttextWhen farm to school activities planned to start.
probbidf2snotextLocal producers aren't bidding (no plan)
probseasf2snotextHard to find year-round availability of key items (no plan)
probcoordf2sntextHard to coordinate procurement of local with regular procurement
probavailf2snotextLocal items not available from primary vendors (no plan)
probrangef2snotextVendors for local items don't offer a broad range of products (no plan)
probhighf2snotextHigher prices (no plan)
probunstablef2snotextUnstable product prices (no plan)
probreliabf2snotextLack of reliability in delivering ordered items (no plan)
probequipf2snotextLack of kitchen equipment to process/prepare local foods. (no plan)
probgapf2snotextGAP or other food safety requirements (no plan)
probcomplf2snotextLack of compliance with your institution's purchasing regulations and policies (no plan)
probprocf2snotextLack of availability of processed/precut products (no plan)
probsupplierf2snotextHard to find new suppliers/growers or distributors (no plan)
probinfooff2snotextHard to get information about product availability (no plan)
proborderf2snotextHard to place orders with vendors (no plan)
probtimef2snotextGetting on time deliveries (no plan)
probqualf2snotextGetting product delivered that meets your quality requirements & other specs (i.e., size) (no plan)
probdelivf2snotextHaving quantity delivered equal to quantity ordered (no plan)
probresolvf2snotextResolving problem deliveries (no plan)
probpayf2snotextInability to pay farmers according to farmers' needs due to school district payment procedures (no plan)
probothrf2snotextOther problem with local procurement (no plan)
benenjoyed1redtextEnjoying reduced food waste as a benefit of farm to school (SY 2013-2014)
benenjoyed1lowtextEnjoying lower school meal program costs as a benefit of farm to school (SY 2013-2014)
benenjoyed1acctextEnjoying greater acceptance of the new meal pattern as a benefit of farm to school (SY 2013-2014)
benenjoyed1inctextEnjoying increased participation in school meals as a benefit of farm to school (SY 2013-2014)
benenjoyed1comtextEnjoying greater community support for school meals as a benefit of farm to school (SY 2013-2014)
benenjoyed1othtextEnjoying other benefit of farm to school.
ageprektextPre-K participated in farm to school activities.
agek5textGrades K-5 participated in farm to school activities.
age68textGrades 6-8 participated in farm to school activities.
age912textGrades 9-12 participated in farm to school activities.
ageothr1textOther age group participated in farm to school activities.
cacfpyestextParticipating in the Child and Adult Care Food Program (CACFP)
cacfpnotextNot participating in Child and Adult Care Food Program (CACFP)
cacfpidktextDon’t know if participating in Child and Adult Care Food Program (CACFP)
schoolnumtextNumber of schools participating.
gardennumtextNumber of schools with school gardens.
saladbarnumtextNumberof schools with salad bars.
localdef2013textDefinition of "local"
locdefothr2013textOther definition of "local"
usedbreaktextUsed local foods in breakfast program
usedlunchtextUsed local foods in lunch program
usedsuptextUsed local foods in supper program
usedsnacktextUsed local foods in snacks program
usedffvptextUsed local foods in Fresh Fruit and Vegetable Program
usedcacfptextUsed local foods in CACFP (i.e., in a pre-k setting such as Head Start, etc.) program
usedcacfpastextUsed local foods in CACFP at-risk afterschool program
usedsumrtextUsed 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)
directprodtextObtains local food direct from individual food producers (i.e. farmers, fishers, ranchers)
directcooptextObtains local food direct from farmer, rancher, or fisher cooperatives
directfmkttextObtains local food direct from farmers markets
directcsatextObtains local food via a Community Supported Agriculture (CSA) model
directmanutextObtains local food direct from food processors and manufacturers
interdisttextObtains local food from distributors
intercooptextObtains local food from food buying cooperative
interfoodtextObtains local food from food hub
interfsmctextObtains local food from food service management companies
interdodtextObtains local food from DoD Fresh Program vendors
interusdatextObtains local food from USDA foods
interstatetextObtains local food from State Farm to School program office
interothrtextObtains local food from other intermediary source
fruittextBought local fruit
vegtextBought local vegetables
milktextBought local milk
dairytextBought local other dairy
meattextBought local other meat
eggstextBought local eggs
seafdtextBought local seafood
vegprottextBought local plant-based protein items such as beans, seeds, nuts.
graintextBought local grains and flour
bakedtextBought local bakery products
herbtextBought local herbs.
othrtextBought other food.
specothrpurchtextOther food bought
top1textFirst of top 5 local food items
top2textSecond of top 5 local food items
top3textThird of top 5 local food items
top4textFourth of top 5 local food items
top5textFifth of top 5 local food items.
top5listtextConcatenated list of top 5 local food items
fruitfreqtextFrequency of serving local fruit
vegfreqtextFrequency of serving local vegables
milkfreqtextFrequency of serving local milk
dairyfreqtextFrequency of serving local dairy products
meatfreqtextFrequency of serving local meat
eggsfreqtextFrequency of serving local eggs
seafdfreqtextFrequency of serving local seafood
vegprotfreqtextFrequency of serving local plant-based protein items such as beans, seeds, nuts
grainfreqtextFrequency of serving local grains and flour
bakedfreqtextFrequency of serving local bakery products
herbfreqtextFrequency of serving local herbs
othrfreqtextFrequency of serving other food
specothrfreqtextOther food frequency
newcosttextTotal food expenditures
newcostmilktextFood expenditure (local foods) including milk
pct_newcostmilktextPercent of foodcost that was local, including fluid milk
newcostnomilktextFood expenditure (local foods) not including milk
pct_newcostnomilktextPercent of foodcost that was local, not including fluid milk
futuretextExpected future local purchases
futureothrtextExpected future local purchases, specified other
servtextServed locally produced foods in the cafeteria (SY 2013-2014)
smrtsnacktextServed locally produced foods as a Smart Snack (a la carte, as fundraisers, etc.) (SY 2013-2014)
aftrschooltextServed locally produced food or providing farm to school activities as part of afterschool programs. (SY 2013-2014)
srvgtextServed products from school-based gardens or school-based farms in the cafeteria (SY 2013-2014)
tastetextHeld taste testing/demos of locally produced foods in the cafeteria, classroom, or other school-related setting (SY 2013-2014)
demotextHeld 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)
strategiestextUsed 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)
coachtextUsed cafeteria food coaches (e.g. adults or students in the cafeteria encouraging kids to eat health/local foods) (SY 2013-2014)
usdamattextUsed 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)
grdntextConducted edible school gardening or orchard activities as part of a school curriculum (SY 2013-2014)
grdnastextConducted edible school gardening or orchard activities as part of an after school program (SY 2013-2014)
triptextConducted student field trips to farms or orchards (SY 2013-2014)
visittextHad farmer(s) visit the cafeteria, classroom or other school-related setting. (SY 2013-2014)
themetextPromoted local efforts through themed or branded promotions (e.g. Harvest of the Month, Local Day, Taste of Washington, etc..) (SY 2013-2014)
promtextPromoted locally produced foods at school in general (e.g. via cafeteria signs, posters, newsletters, etc.) (SY 2013-2014)
mediatextGenerated media coverage of local foods being used in schools (e.g. press interviews or other activities that resulted in local coverage) (SY 2013-2014)
hosttextHosted farm to school related community events (e.g. invited parents to lunch, corn shucking contests, etc.) (SY 2013-2014)
celebtextCelebrated Farm to School Month (October 2013) (SY 2013-2014)
integtextIntegrated farm to school concepts, including school gardening activities, into educational curriculum (math, science, language arts, etc.) (SY 2013-2014)
trngtextProvided training to school food service staff on farm to school or school gardens (SY 2013-2014)
producerstextWorked with local food producers to develop a specific food product using local foods (SY 2013-2014)
implementtextImplemented farm to school activities as part of overall school efforts to reduce food waste (SY 2013-2014)
evaluatetextEvaluated changes in student acceptance and food waste as a result of implementing farm to school activities (SY 2013-2014)
othr2013spectextOther farm to school activity (SY 2013-2014)
probbid2013textLocal producers aren't bidding (conducts f2s)
probseas2013textHard to find year-round availability of key items (conducts f2s)
probcoord2013textHard to coordinate procurement of local with regular procurement (conducts f2s)
probavail2013textLocal items not available from primary vendors (conducts f2s)
probrange2013textVendors for local items don't offer a broad range of products (conducts f2s)
probhigh2013textHigher prices (conducts f2s)
probunstable2013textUnstable product prices (conducts f2s)
probreliab2013textLack of reliability in delivering ordered items (conducts f2s)
probequip2013textLack of kitchen equipment to process/prepare local foods. (conducts f2s)
probgap2013textGAP or other food safety requirements (conducts f2s)
probcompl2013textLack of compliance with your institution's purchasing regulations and policies (conducts f2s)
probproc2013textLack of availability of processed/precut products (conducts f2s)
probsupplier2013textHard to find new suppliers/growers or distributors (conducts f2s)
probinfo2013textHard to get information about product availability (conducts f2s)
proborder2013textHard to place orders with vendors (conducts f2s)
probtime2013textGetting on time deliveries (conducts f2s)
probqual2013textGetting product delivered that meets your quality requirements & other specs (i.e., size) (conducts f2s)
probdeliv2013textHaving quantity delivered equal to quantity ordered (conducts f2s)
probresolv2013textResolving problem deliveries (conducts f2s)
probpay2013textInability to pay farmers according to farmers' needs due to school district payment procedures (conducts f2s)
probothr12013textOther problem with local procurement (conducts f2s)
othrinfotextOther information
successtextSuccess story
survyearinteger
leaidinteger
fipstinteger
stidtext
nametext
phonetext
mstreetext
mcitytext
mzip4text
lstreetext
lcitytext
lstatetext
lzipinteger
lzip4text
typeinteger
uniontext
conuminteger
conametextName of county SFA resides in
csatext
cbsatext
metmicinteger
ulocalinteger
cdcodeinteger
latcodnumber
loncodnumber
bieainteger
boundinteger
amempupinteger
iamempuptext
aftepupinteger
iaftepuptext
aspecedinteger
iaspecedtext
aellinteger
iaelltext
aaidcorsupinteger
iaaidcorsuptext
aguidinteger
iaguidtext
alibstfinteger
ialibstftext
aleaadminteger
ialeaadmtext
aschadminteger
iaschadmtext
asupstfinteger
iasupstftext
gslotext
gshitext
pkoffrdinteger
kgoffrdinteger
g01offrdinteger
g02offrdinteger
g03offrdinteger
g04offrdinteger
g05offrdinteger
g06offrdinteger
g07offrdinteger
g08offrdinteger
g09offrdinteger
g10offrdinteger
g11offrdinteger
g12offrdinteger
ugoffrdinteger
agchrttext
schintegerPercentage of students eligible for free or reduced price school meals
specedinteger
ellinteger
pktchnumber
kgtchnumber
elmtchnumber
sectchnumber
ugtchnumber
tottchnumber
aidesnumber
corsupnumber
elmguinumber
secguinumber
othguinumber
totguinumber
libspenumber
libsupnumber
leaadmnumber
leasupnumber
schadmnumber
schsupnumber
stusupnumber
othsupnumber
pkinteger
ampkminteger
ampkfinteger
aspkminteger
aspkfinteger
hipkminteger
hipkfinteger
blpkminteger
blpkfinteger
whpkminteger
whpkfinteger
hppkminteger
hppkfinteger
trpkminteger
trpkfinteger
kginteger
amkgminteger
amkgfinteger
askgminteger
askgfinteger
hikgminteger
hikgfinteger
blkgminteger
blkgfinteger
whkgminteger
whkgfinteger
hpkgminteger
hpkgfinteger
trkgminteger
trkgfinteger
g01integer
am01minteger
am01finteger
as01minteger
as01finteger
hi01minteger
hi01finteger
bl01minteger
bl01finteger
wh01minteger
wh01finteger
hp01minteger
hp01finteger
tr01minteger
tr01finteger
g02integer
am02minteger
am02finteger
as02minteger
as02finteger
hi02minteger
hi02finteger
bl02minteger
bl02finteger
wh02minteger
wh02finteger
hp02minteger
hp02finteger
tr02minteger
tr02finteger
g03integer
am03minteger
am03finteger
as03minteger
as03finteger
hi03minteger
hi03finteger
bl03minteger
bl03finteger
wh03minteger
wh03finteger
hp03minteger
hp03finteger
tr03minteger
tr03finteger
g04integer
am04minteger
am04finteger
as04minteger
as04finteger
hi04minteger
hi04finteger
bl04minteger
bl04finteger
wh04minteger
wh04finteger
hp04minteger
hp04finteger
tr04minteger
tr04finteger
g05integer
am05minteger
am05finteger
as05minteger
as05finteger
hi05minteger
hi05finteger
bl05minteger
bl05finteger
wh05minteger
wh05finteger
hp05minteger
hp05finteger
tr05minteger
tr05finteger
g06integer
am06minteger
am06finteger
as06minteger
as06finteger
hi06minteger
hi06finteger
bl06minteger
bl06finteger
wh06minteger
wh06finteger
hp06minteger
hp06finteger
tr06minteger
tr06finteger
g07integer
am07minteger
am07finteger
as07minteger
as07finteger
hi07minteger
hi07finteger
bl07minteger
bl07finteger
wh07minteger
wh07finteger
hp07minteger
hp07finteger
tr07minteger
tr07finteger
g08integer
am08minteger
am08finteger
as08minteger
as08finteger
hi08minteger
hi08finteger
bl08minteger
bl08finteger
wh08minteger
wh08finteger
hp08minteger
hp08finteger
tr08minteger
tr08finteger
g09integer
am09minteger
am09finteger
as09minteger
as09finteger
hi09minteger
hi09finteger
bl09minteger
bl09finteger
wh09minteger
wh09finteger
hp09minteger
hp09finteger
tr09minteger
tr09finteger
g10integer
am10minteger
am10finteger
as10minteger
as10finteger
hi10minteger
hi10finteger
bl10minteger
bl10finteger
wh10minteger
wh10finteger
hp10minteger
hp10finteger
tr10minteger
tr10finteger
g11integer
am11minteger
am11finteger
as11minteger
as11finteger
hi11minteger
hi11finteger
bl11minteger
bl11finteger
wh11minteger
wh11finteger
hp11minteger
hp11finteger
tr11minteger
tr11finteger
g12integer
am12minteger
am12finteger
as12minteger
as12finteger
hi12minteger
hi12finteger
bl12minteger
bl12finteger
wh12minteger
wh12finteger
hp12minteger
hp12finteger
tr12minteger
tr12finteger
uginteger
amugminteger
amugfinteger
asugminteger
asugfinteger
hiugminteger
hiugfinteger
blugminteger
blugfinteger
whugminteger
whugfinteger
hpugminteger
hpugfinteger
trugminteger
trugfinteger
memberintegerTotal number of students in the district
aminteger
amalminteger
amalfinteger
asianinteger
asalminteger
asalfinteger
hispinteger
hialminteger
hialfinteger
blackinteger
blalminteger
blalfinteger
whiteinteger
whalminteger
whalfinteger
pacificinteger
hpalminteger
hpalfinteger
trinteger
tralminteger
tralfinteger
totethinteger
chrtleastattext
mziptext
ccdnuminteger
farmratenumberPercentage of students eligible for free or reduced price school meals

Below is the data as of the latest F2S Census (6/27/16)

Original data can be found at https://farmtoschoolcensus.fns.usda.gov

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 [ ]: