18 lines
732 B
Bash
Executable file
18 lines
732 B
Bash
Executable file
#!/usr/bin/env nix-shell
|
|
#! nix-shell -i bash --pure
|
|
#! nix-shell -p bash wget unzip python3 python3Packages.geopandas python3Packages.fiona python3Packages.pyproj
|
|
# TODO: do I need all the python packages?
|
|
|
|
set -x -euo pipefail
|
|
|
|
wget -nc https://www.nass.usda.gov/Research_and_Science/Crop-Sequence-Boundaries/datasets/NationalCSB_2016-2023_rev23.zip
|
|
wget -nc https://www2.census.gov/geo/docs/reference/codes2020/national_cousub2020.txt
|
|
unzip -u NationalCSB_2016-2023_rev23.zip
|
|
|
|
mkdir -p data
|
|
|
|
# HEADS UP: this script takes something like 40GB of RAM. In theory, I could
|
|
# probably do something clever with streaming...but I have 40 GB of RAM, so this
|
|
# works!
|
|
python -i extract_counties.py NationalCSB_2016-2023_rev23/CSB1623.gdb
|