ams-goonies / usda-hackathon-2024

R Shiny app for visualizing 2022 Ag Census data
GNU General Public License v3.0
0 stars 0 forks source link

Get state level demographic data capturing "underserved communties" #7

Closed elhohn closed 3 months ago

elhohn commented 3 months ago

Preferably, use something like the following, but modified to get different data:

tidyUSDA::getQuickstat(
  sector = 'CROPS',
  #group = c('FIELD CROPS', 'FRUIT & TREE NUTS', 'VEGETABLES'),
  #commodity='CROP TOTALS',
  category='SALES',
  #domain='SALES & DISTRIBUTION',
  #county=NULL,
  key = ag_census_api_key,
  program = 'CENSUS',
  #data_item = 'CROP TOTALS - SALES, MEASURED in $',
  geographic_level = 'COUNTY',
  year = '2017',
  state = 'ALABAMA',
  geometry = TRUE,
  lower48 = TRUE, 
  weighted_by_area = TRUE) %>%
  filter(grepl("SALES, MEASURED IN", short_desc))

That way, it can be saved in a script and easily reproduced and/or modified.

selazan commented 3 months ago

Pull race/ethnicity, age, gender

stel-ls commented 3 months ago

I think veterans would also be good to add!