Datasets:
The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
Wisconsin Dairy CAFO Detection Dataset
Dataset accompanying the paper: [Title TBD upon publication].
This dataset contains all data needed to reproduce the paper's results using the analysis code at reglab/wi-cafo-analysis.
Study area: Wisconsin, USA Subject: Dairy Concentrated Animal Feeding Operations (CAFOs) — remote sensing detection, permit compliance, and environmental risk assessment
Repository Structure
wi_cafo_facilities.geojson ← Primary publication dataset (WGS84)
wi_cafo_facilities.parquet ← Same data in GeoParquet (WI State Plane EPSG:3071)
wi_cafo_facilities.csv ← Same data with geometry as WKT column
input_data/
annotations/
full_state_cf_annotations.geojson
ewg_region_train_labels.geojson
WDNR_CAFOs.geojson
ewg_AFOs_012022.geojson
permit_animal_type_records.csv
milk_producers.geojson
clusters/
all_cf_clusters.geojson
four_band_clusters.csv
three_band_clusters.csv
geospatial/
county_boundaries/
water_data/
Publication Dataset (wi_cafo_facilities.*)
The main output of the study: 1,469 detected dairy CAFO facilities across Wisconsin, with permit linkage, animal unit estimates, milk producer linkage, and environmental risk indices.
Column Descriptions
| Column | Type | Source | Description |
|---|---|---|---|
polygon_indices |
int | Constructed | Unique integer identifier for each facility (0-indexed). Corresponds to the row position in the full-state cluster file used to generate this dataset. |
animal_unit_estimate |
float | Constructed | Median estimated animal units (AU) at the facility, derived from the barn footprint area detected by the segmentation model. Uses a probabilistic model of barn area per cow and cow-to-AU conversion factors. |
animal_units_lower |
float | Constructed | Lower bound of the 90% credible interval for the AU estimate. |
animal_units_upper |
float | Constructed | Upper bound of the 90% credible interval for the AU estimate. |
type |
string | Constructed | Facility classification based on permit matching and estimated animal units. Categories: "Permitted dairy CAFOs" (matched to a WDNR CAFO permit), "AFOs between 500 and 1000 AU" (estimated 500–1000 AU, no permit match), "Potential unpermitted CAFOs (>1000 AU)" (estimated >1000 AU, no permit match — above the threshold requiring a CAFO permit in Wisconsin), "Smaller detected AFOs (<500 AU)" (estimated <500 AU, no permit match). |
permit_facility_id |
float | WDNR permit data | Wisconsin DNR Facility Identification Number (FIN) for facilities matched to a CAFO permit. NaN for unmatched facilities. Source: WDNR_CAFOs.geojson. |
permit_allowable_animal_units |
float | WDNR permit data | Maximum animal units allowed under the facility's CAFO permit. NaN for unmatched facilities. Source: WDNR_CAFOs.geojson. |
matched_milk |
bool | WI DATCP milk producer licenses | Whether the facility was spatially matched (within 500m) to an active Wisconsin milk producer license. Source: milk_producers.geojson. |
type_of_milk |
string | WI DATCP milk producer licenses | Type of milk produced at the matched milk license ("Bovine", "Goat", etc.). None if matched_milk is False. Source: milk_producers.geojson. |
water_distance |
float | WI DNR hydrography | Distance (m) from the facility centroid to the nearest surface water body (open water, perennial or intermittent stream). |
impaired_water_distance |
float | EPA 303(d) / WI DNR | Distance (m) to the nearest EPA 303(d)-listed impaired water body or stream. |
closest_water_impaired |
bool | EPA 303(d) / WI DNR | True if the nearest water body is 303(d)-listed impaired (i.e., impaired_water_distance ≤ water_distance). |
hydro_intermit_distance |
float | WI DNR 24K hydrography | Distance (m) to the nearest intermittent stream. |
hydro_perennial_distance |
float | WI DNR 24K hydrography | Distance (m) to the nearest perennial stream. |
gw_0 |
bool | WI DNR groundwater | True if the facility is located in an area with a water table depth of 0 ft (i.e., at or above the surface). Source: GCSM water table depth layer. |
gw_20 |
bool | WI DNR groundwater | True if the facility is in an area with water table depth ≤ 20 ft. |
gw_50 |
bool | WI DNR groundwater | True if the facility is in an area with water table depth ≤ 50 ft. |
bedrock_lt5ft_distance |
float | SNAPMAPs | Distance (m) to the nearest area with bedrock depth < 5 ft (shallow bedrock). Source: SNAPMAPs soils layer. |
bedrock_lt5ft_dummy |
bool | SNAPMAPs | True if the facility itself is located on shallow bedrock (depth < 5 ft). |
silurian_0_2_distance |
float | SNAPMAPs | Distance (m) to the nearest area with Silurian carbonate bedrock at 0–2 ft depth. |
silurian_0_2_dummy |
bool | SNAPMAPs | True if the facility sits on Silurian carbonate bedrock at 0–2 ft. |
silurian_2_5_distance |
float | SNAPMAPs | Distance (m) to the nearest area with Silurian carbonate bedrock at 2–5 ft depth. |
silurian_2_5_dummy |
bool | SNAPMAPs | True if the facility sits on Silurian carbonate bedrock at 2–5 ft. |
shallow_silurian_distance |
float | SNAPMAPs | Distance (m) to the nearest area with any shallow Silurian carbonate bedrock (0–5 ft). |
shallow_silurian_dummy |
bool | SNAPMAPs | True if the facility sits on any shallow Silurian carbonate bedrock (0–5 ft). |
mean_slope |
float | WI DNR 30m DEM | Mean terrain slope (%) within a 1 km radius of the facility centroid, derived from a 30m digital elevation model. |
slope_greater_12_distance |
float | WI DNR 30m DEM | Distance (m) to the nearest area with slope > 12%. |
slope_greater_12_dummy |
bool | WI DNR 30m DEM | True if the facility is located in an area with slope > 12%. |
swqma_300ft_distance |
float | SNAPMAPs | Distance (m) to the nearest Surface Water Quality Management Area (SWQMA) 300 ft buffer zone — a regulatory setback for manure spreading. |
swqma_300ft_dummy |
bool | SNAPMAPs | True if the facility is within a SWQMA 300 ft zone. |
swqma_1000ft_distance |
float | SNAPMAPs | Distance (m) to the nearest SWQMA 1,000 ft buffer zone. |
swqma_1000ft_dummy |
bool | SNAPMAPs | True if the facility is within a SWQMA 1,000 ft zone. |
cafo_w_restrict_distance |
float | SNAPMAPs | Distance (m) to the nearest winter-restricted spreading zone for CAFOs (areas where manure spreading is prohibited in winter). |
cafo_r_restrict_distance |
float | SNAPMAPs | Distance (m) to the nearest CAFO regulatory restriction area (general CAFO-specific spreading restriction zone). |
hand_built_risk_index |
float | Constructed | Composite environmental risk index (0–1) built by manually weighting proximity to impaired waters, groundwater depth, bedrock depth, and regulatory restriction zones. Higher = greater environmental risk. |
pca_risk_index |
float | Constructed | Composite environmental risk index (0–1) derived from principal component analysis of the same geospatial risk factors used in hand_built_risk_index. Higher = greater environmental risk. |
n_buildings |
int | Constructed | Number of individual barn polygons predicted by the segmentation model that make up this facility cluster. |
n_parcels |
int | Constructed | Number of distinct land parcels associated with this facility cluster (via spatial join to WI statewide parcel data). |
cluster_area_m2 |
float | Constructed | Total footprint area of all barn polygons in the facility cluster, in square meters. |
geometry |
geometry | Constructed | MultiPolygon of all barn footprints comprising the facility, in WGS84 (EPSG:4326) for GeoJSON/CSV and WI State Plane (EPSG:3071) for Parquet. |
Quick Start
import geopandas as gpd
# Load from local file
gdf = gpd.read_file("wi_cafo_facilities.geojson")
# Or load from Hugging Face Hub
from huggingface_hub import hf_hub_download
path = hf_hub_download(
repo_id="reglab/wisconsin-dairy-cafo",
filename="wi_cafo_facilities.geojson",
repo_type="dataset"
)
gdf = gpd.read_file(path)
Input Data (input_data/)
These are the raw and intermediate datasets used to generate the publication dataset and all paper figures. Download this folder and follow the setup instructions at reglab/wi-cafo-analysis to reproduce all results.
input_data/annotations/
Human-labeled barn polygon annotations produced by CloudFactory workers on NAIP aerial imagery.
| File | Description | Date |
|---|---|---|
full_state_cf_annotations.geojson |
All CloudFactory polygon annotations outside the 9-county EWG study region. Combines submissions from batches on 11/13, 11/27, 12/18, and 2/5, plus annotations from the wider state coverage run. | 2024-02-26 |
ewg_region_train_labels.geojson |
All CloudFactory polygon annotations within the 9-county EWG study region (Brown, Calumet, Fond du Lac, Green Lake, Manitowoc, Outagamie, Sheboygan, Waupaca, Winnebago). Originally created Jan 2023 as the model training set; updated Nov 2023 and Feb 2024 with additional examples caught in review. Contains more labels than were used for the original training run. | Feb 2024 |
input_data/WDNR_CAFOs.geojson
Source: Wisconsin Department of Natural Resources (WDNR) Acquired: 2024-01-25
Locations and full permit metadata for all CAFO sites permitted by WDNR in Wisconsin. This is a full join of CAFO main permit sites (2018 database) and satellite sites (2022 geocoded permits). Three sites with data quality issues are excluded: Richfield Dairy LLC, Oak Ridge Dairy Farm LLC, and UW Arlington Agricultural Research Station. Some corrections were applied to the AnimalType column (see running notes 1/25/24). Use this file as the authoritative source of permitted CAFO locations and permit metadata.
input_data/ewg_AFOs_012022.geojson
Source: Environmental Working Group (EWG) Acquired: January 2022
Point locations and metadata for all Animal Feeding Operations (AFOs) labeled by EWG across Wisconsin. Used to supplement permit data for comparison with model predictions in the 9-county EWG study region. See the EWG methodology paper for full documentation.
input_data/permit_animal_type_records.csv
Source: WDNR permit website (manual compilation) Compiled by: Ryan, Alex, and Mihir Date: 2025-05-14 (latest version)
Animal type counts manually compiled from approximately 200 WDNR CAFO permit documents. Each row corresponds to one permitted facility and contains counts of each animal type on-site (dairy cows, heifers, calves, dry cows, swine, poultry, etc.). These counts are used to derive more precise animal unit estimates for permitted facilities and to validate the model's barn-area-based AU estimates.
Key columns:
- Facility identifiers linking to
WDNR_CAFOs.geojsonvia FIN - Per-animal-type counts (dairy cows, heifers, calves, dry cows, beef, swine, poultry)
- Total reported animal units from the permit
input_data/milk_producers.geojson
Source: Wisconsin Department of Agriculture, Trade and Consumer Protection (DATCP) Acquired: 2023-07-01, updated 2024-03-04 URL: DATCP Milk Producer Licenses
All active permitted milk producer licenses in Wisconsin, geocoded to coordinate points using the Google Geocoding API. 75 instances of inaccurate geocoding were identified and manually corrected in the March 2024 update. Used to match detected facilities to dairy operations with active milk licenses (as a cross-validation of permit matching).
input_data/clusters/
Facility-level clusters: groups of overlapping/adjacent model-predicted barn polygons (or human-annotated polygons) merged into single facility records using the clustering algorithm in cluster.py. All model clusters use confidence threshold 0.5 unless otherwise noted.
| File | Size | Description |
|---|---|---|
all_cf_clusters.geojson |
~14 MB | Facility clusters derived from all CloudFactory human annotations statewide. Includes cluster geometries. Used as human-annotation ground truth for model evaluation. |
four_band_clusters.csv |
~224 MB | Facility clusters from the 4-band (RGB + near-infrared) segmentation model, run at full state coverage. Primary model used in the paper's main results. |
three_band_clusters.csv |
~180 MB | Facility clusters from the 3-band (RGB only) segmentation model, run at full state coverage. Used for model comparison. |
input_data/geospatial/
Ancillary geospatial layers used in environmental risk assessment.
geospatial/county_boundaries/
Wisconsin county boundary shapefiles at 1:24,000 scale. Source: WDNR Open Data Portal
geospatial/water_data/
| File | Source | Description |
|---|---|---|
GCSM_-_Water_Table_Depth.geojson |
WI DNR | Depth to groundwater table (m) across Wisconsin |
impaired_rivers_streams.geojson |
EPA 303(d) / WI DNR | Rivers and streams listed as impaired under the Clean Water Act |
impaired_lakes.geojson |
EPA 303(d) / WI DNR | Lakes listed as impaired under the Clean Water Act |
24k_Hydro_Waterbodies_(Open_Water).geojson |
WI DNR | All open water bodies in Wisconsin (24K hydrography) |
Not Included (Available from Original Sources)
These large datasets are used in the analysis pipeline but are not included here. Download them from the original sources and set paths in config/config.yml per the analysis repo README.
| Dataset | Source | Notes |
|---|---|---|
| Wisconsin land parcels (V8.0.0) | WI SCO Parcel Data | Full statewide parcel polygons; used for ownership matching and parcel count |
| 30m Digital Elevation Model | WI DNR / geodata.wisc.edu | Used to compute mean slope within 1km radius of each facility |
| Wisconsin urban areas (TIGER 2020) | U.S. Census TIGER | Used to filter model predictions to exclude urban areas |
| SNAPMAPs nutrient management layers | DATCP Open Data Portal | Policy-relevant soils, waterways, slope, and regulatory restriction layers used in risk assessment |
| NAIP aerial imagery | Google Cloud (GCP) | Contact authors for access; required only for case-study imagery figures (--skip-imagery flag skips these) |
| Model weights + training/inference code | reglab/cafo-segmentation | Segmentation model for generating barn polygon predictions from NAIP imagery |
Reproducing the Paper
- Clone reglab/wi-cafo-analysis and follow its README to set up the Python environment.
- Download
input_data/from this repository and place it at the paths specified inconfig/config.yml. - Download the "Not Included" datasets above from their original sources.
- Run:
python generate_paper_results.py --skip-imagery # omit --skip-imagery if you have GCP access - All paper figures and tables will be written to
paper_results/.
License
This dataset is released under CC BY 4.0. You are free to share and adapt for any purpose with attribution.
Source data (WDNR permits, EWG AFOs, DATCP milk licenses, WI DNR hydrography) are from public government sources.
Citation
Citation to be added upon publication.
Contact
RegLab, Stanford Law School — reglab.stanford.edu
- Downloads last month
- 69