Skip to content

Commit

Permalink
agriculture census import (datacommonsorg#537)
Browse files Browse the repository at this point in the history
* add files

* update

* updates

* readme

* fix dcs

* lint

* more lint

* update schema

* clean

* add missing units
  • Loading branch information
n-h-diaz authored Jul 26, 2023
1 parent 84edcf6 commit 0620ba5
Show file tree
Hide file tree
Showing 9 changed files with 2,280 additions and 0 deletions.
32 changes: 32 additions & 0 deletions scripts/us_usda/nass_census/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# US Census of Agriculture Import

The Census of Agriculture, taken only once every five years, looks at land use and ownership, operator characteristics, production practices, income and expenditures.

This import includes tables 1, 48-54 for the 2017 Census:

* 1 - County Summary Highlights
* 48 - Hispanic, Latino, or Spanish Origin Producers
* 49 - American Indian or Alaska Native Producers
* 50 - Asian Producers
* 51 - Black or African American Producers
* 52 - Native Hawaiian or Other Pacific Islander Producers
* 53 - White Producers
* 54 - Producers Reporting More Than One Race

Source: https://www.nass.usda.gov/AgCensus/index.php

Places: US, State, County

The source data is currently in `https://storage.cloud.google.com/datcom-csv/usda/2017_cdqt_data.txt`.

To generate CSV:
```
python3 process.py
```

The output will be `agriculture.csv`.

To run unit tests:
```
python3 process_test.py
```
Loading

0 comments on commit 0620ba5

Please sign in to comment.