Datasets:
Publish reviewed dataset guide, preserving later R examples
Browse files
README.md
CHANGED
|
@@ -21,17 +21,94 @@ size_categories:
|
|
| 21 |
|
| 22 |
# ICE Enforcement Database
|
| 23 |
|
| 24 |
-
|
| 25 |
|
| 26 |
-
|
| 27 |
|
| 28 |
-
|
| 29 |
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
-
|
| 33 |
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
```sql
|
| 37 |
INSTALL httpfs;
|
|
@@ -45,24 +122,11 @@ WHERE apprehension_date IS NOT NULL
|
|
| 45 |
GROUP BY 1 ORDER BY 1 DESC LIMIT 12;
|
| 46 |
```
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
Install the dependencies once with `install.packages(c("DBI", "duckdb"))`.
|
| 51 |
-
|
| 52 |
-
```r
|
| 53 |
-
library(DBI)
|
| 54 |
-
con <- dbConnect(duckdb::duckdb())
|
| 55 |
-
dbExecute(con, "INSTALL httpfs")
|
| 56 |
-
dbExecute(con, "LOAD httpfs")
|
| 57 |
-
dbExecute(con, "ATTACH 'https://huggingface.co/datasets/Nason/ice-database/resolve/main/ice.duckdb' AS ice (READ_ONLY)")
|
| 58 |
-
dbGetQuery(con, "SELECT apprehension_date FROM ice.arrests LIMIT 5")
|
| 59 |
-
dbDisconnect(con, shutdown = TRUE)
|
| 60 |
-
```
|
| 61 |
-
|
| 62 |
-
DuckDB uses HTTP range requests; queries run on your machine and may need substantial memory or download data. A `LIMIT` does not guarantee a small scan.
|
| 63 |
|
|
|
|
| 64 |
|
| 65 |
-
### Python
|
| 66 |
|
| 67 |
```python
|
| 68 |
import duckdb
|
|
@@ -77,46 +141,36 @@ con.sql("SELECT * FROM ice._metadata").show()
|
|
| 77 |
|
| 78 |
DuckDB uses HTTP range requests, so only the pages needed for your query are downloaded.
|
| 79 |
|
| 80 |
-
##
|
| 81 |
|
| 82 |
-
|
| 83 |
-
|-------|-------------|------|------|---------|------------|
|
| 84 |
-
| `detentions` | Detention stays (book-in to book-out) | 9,834,781 | 41 | release_2023, release_2026_08 | 1995-08-31 to 2026-08-06 |
|
| 85 |
-
| `removals` | Deportation/removal records | 3,868,035 | 43 | release_2023, release_2026_08 | 0001-09-10 to 2026-08-05 |
|
| 86 |
-
| `rca_decisions` | Release/custody assessment decision history | 3,543,467 | 42 | release_2023 | |
|
| 87 |
-
| `encounters` | ICE encounters with individuals | 3,065,104 | 23 | release_2026_08 | |
|
| 88 |
-
| `arrests` | ICE administrative arrests | 2,516,550 | 25 | release_2023, release_2026_08 | 2011-10-01 to 2026-08-06 |
|
| 89 |
-
| `detainers` | Detainer requests issued to jails/prisons | 740,601 | 45 | release_2026_08 | 0002-06-14 to 2026-08-05 |
|
| 90 |
|
| 91 |
-
|
| 92 |
|
| 93 |
-
###
|
| 94 |
-
Tables share a `unique_id` field for tracing individuals across the enforcement pipeline: arrests -> detainers -> detentions -> removals.
|
| 95 |
|
| 96 |
-
|
| 97 |
-
- `v_arrest_to_detention` - Arrests joined to detention stays
|
| 98 |
-
- `v_enforcement_pipeline` - Full pipeline: arrest -> detention -> removal
|
| 99 |
-
- `v_daily_arrests` - Daily arrest counts by data source
|
| 100 |
|
| 101 |
-
###
|
| 102 |
-
Where both releases cover the same period, records are deduplicated on key fields (unique_id + date + facility) with the richer 2025 release preferred.
|
| 103 |
|
| 104 |
-
|
| 105 |
|
| 106 |
-
|
|
|
|
|
|
|
| 107 |
|
| 108 |
-
## License
|
| 109 |
|
| 110 |
Database build code: MIT. Underlying data: public domain (U.S. government records released via FOIA).
|
| 111 |
|
| 112 |
-
## GitHub
|
| 113 |
|
| 114 |
Full source code, build instructions, and example queries: [github.com/ian-nason/ice-database](https://github.com/ian-nason/ice-database)
|
| 115 |
|
| 116 |
|
| 117 |
-
# Changelog
|
| 118 |
|
| 119 |
-
## 2026-09-14 — Data refresh (Deportation Data Project release of 2026-08-21)
|
| 120 |
|
| 121 |
- Rebuilt from the DDP's August 2026 ICE release (activity 2022-10-01 through
|
| 122 |
2026-08-06), which is cumulative and fully supersedes the March 2026 and
|
|
@@ -143,7 +197,7 @@ Full source code, build instructions, and example queries: [github.com/ian-nason
|
|
| 143 |
facility-segment level; DDP continues to flag the removals data as less
|
| 144 |
reliable than the July 2025 release.
|
| 145 |
|
| 146 |
-
## 2026-07-06 — Full refresh + data-quality audit
|
| 147 |
|
| 148 |
Rebuilt from the Deportation Data Project's 2026 FOIA release (data through
|
| 149 |
2026-03-10) and repaired after an independent SQL-verified audit.
|
|
@@ -172,3 +226,20 @@ Rebuilt from the Deportation Data Project's 2026 FOIA release (data through
|
|
| 172 |
Sep 2023.
|
| 173 |
- `arrests` demographics (citizenship, gender, birth year) exist only in
|
| 174 |
release_2026 rows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
# ICE Enforcement Database
|
| 23 |
|
| 24 |
+
Explore U.S. Immigration and Customs Enforcement (ICE) arrests, detainers, detention-facility records, removals, encounters and custody decisions released through the Deportation Data Project. The published database contains 23,568,538 rows across six tables, with table-specific coverage from fiscal year (FY) 2012 through August 6, 2026.
|
| 25 |
|
| 26 |
+
Rows represent events or decisions, not distinct people. In particular, detentions contains facility segments: use v_detention_stays when counting stays or measuring their duration. Detainers and encounters begin in October 2022, while custody-assessment decisions end in September 2023.
|
| 27 |
|
| 28 |
+
The current data combines the 2023 and August 2026 Freedom of Information Act (FOIA) releases. Person identifiers support linkage only within a release; they cannot trace a person across the release boundary. Older overlapping records are superseded rather than matched by person ID. The Deportation Data Project flags the removals data as less reliable than the July 2025 release. Use the Python or R examples below and review table-specific coverage before interpreting trends.
|
| 29 |
|
| 30 |
+
<a id="quick-start"></a>
|
| 31 |
+
|
| 32 |
+
## Start querying
|
| 33 |
+
|
| 34 |
+
Show five arrest records dated from August 1, 2026 onward, with the date, state and recorded arrest method. This previews the published snapshot, whose latest arrest date is August 6, 2026.
|
| 35 |
+
|
| 36 |
+
Choose R or Python. Install datapond once: use `install.packages("datapond")` in R, or run `python -m pip install datapond` in a terminal.
|
| 37 |
+
|
| 38 |
+
### R
|
| 39 |
+
|
| 40 |
+
```r
|
| 41 |
+
library(datapond)
|
| 42 |
+
con <- dp_connect("ice")
|
| 43 |
+
tryCatch({
|
| 44 |
+
DBI::dbExecute(con, "SET threads=1")
|
| 45 |
+
DBI::dbExecute(con, "SET memory_limit='128MiB'")
|
| 46 |
+
DBI::dbExecute(con, "SET max_temp_directory_size='0B'")
|
| 47 |
+
print(DBI::dbGetQuery(con, "SELECT apprehension_date,state,apprehension_method FROM arrests WHERE apprehension_date >= TIMESTAMP '2026-08-01' LIMIT 5"))
|
| 48 |
+
}, finally = dp_disconnect(con))
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
### Python
|
| 52 |
+
|
| 53 |
+
```python
|
| 54 |
+
import datapond
|
| 55 |
+
con = datapond.connect('ice')
|
| 56 |
+
try:
|
| 57 |
+
con.execute("SET threads=1")
|
| 58 |
+
con.execute("SET memory_limit='128MiB'")
|
| 59 |
+
con.execute("SET max_temp_directory_size='0B'")
|
| 60 |
+
print(con.execute("""SELECT apprehension_date,state,apprehension_method FROM arrests WHERE apprehension_date >= TIMESTAMP '2026-08-01' LIMIT 5""").fetchall())
|
| 61 |
+
finally:
|
| 62 |
+
con.close()
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
Queries run on your computer and read the byte ranges they need. A small result can still require a large scan. These examples limit DuckDB to one thread and a 128 MiB buffer pool with disk spill disabled; that is not a limit on the entire R or Python process. Larger analyses may need more memory or a local download with enough disk space.
|
| 66 |
+
|
| 67 |
+
<a id="additional-dataset-notes"></a>
|
| 68 |
+
|
| 69 |
+
<a id="tables"></a>
|
| 70 |
+
|
| 71 |
+
## Tables and coverage
|
| 72 |
+
|
| 73 |
+
| Table | Description | Rows | Cols | Sources | Documented coverage |
|
| 74 |
+
|-------|-------------|------|------|---------|------------|
|
| 75 |
+
| `arrests` | ICE administrative arrests | 2,516,550 | 25 | release_2023, release_2026_08 | 2011-10-01 to 2026-08-06 |
|
| 76 |
+
| `detentions` | Detention facility segments; several segments can belong to one stay | 9,834,781 | 41 | release_2023, release_2026_08 | FY2012–Aug 6, 2026 release coverage; some stays began earlier |
|
| 77 |
+
| `removals` | Deportation/removal records | 3,868,035 | 43 | release_2023, release_2026_08 | FY2012–Aug 6, 2026 release coverage |
|
| 78 |
+
| `rca_decisions` | Release/custody assessment decision history | 3,543,467 | 42 | release_2023 | Through Sep 30, 2023 |
|
| 79 |
+
| `encounters` | ICE encounters with individuals | 3,065,104 | 23 | release_2026_08 | Oct 2022–Aug 6, 2026 |
|
| 80 |
+
| `detainers` | Detainer requests issued to jails/prisons | 740,601 | 45 | release_2026_08 | Oct 2022–Aug 6, 2026 release coverage |
|
| 81 |
|
| 82 |
+
Raw date extrema are not coverage: detentions contain dates from 1995-08-31 to 2026-08-06; removals from 0001-09-10 to 2026-08-05; detainers from 0002-06-14 to 2026-08-05. Years 0001 and 0002 are invalid. Check dates before computing intervals.
|
| 83 |
|
| 84 |
+
Every row retains `data_source` (`release_2023` or `release_2026_08`).
|
| 85 |
+
|
| 86 |
+
<a id="coverage-fields-and-sources"></a>
|
| 87 |
+
|
| 88 |
+
See the [data dictionary](https://github.com/ian-nason/ice-database/blob/main/DICTIONARY.md) for column definitions.
|
| 89 |
+
|
| 90 |
+
<a id="key-features"></a>
|
| 91 |
+
|
| 92 |
+
## Joining records and useful views
|
| 93 |
+
|
| 94 |
+
### Linked Records
|
| 95 |
+
Within one source release, tables share `unique_id` for linking available arrest, detainer, detention and removal records. Keep `data_source` with the identifier. IDs are re-anonymized between releases and cannot trace a person across the release boundary.
|
| 96 |
+
|
| 97 |
+
### Pre-built Views
|
| 98 |
+
- `v_detention_stays` - One row per detention stay, combining facility segments for stay counts and durations
|
| 99 |
+
- `v_arrest_to_detention` - Arrests joined to detention stays
|
| 100 |
+
- `v_enforcement_pipeline` - Full pipeline: arrest -> detention -> removal
|
| 101 |
+
- `v_daily_arrests` - Daily arrest counts by data source
|
| 102 |
+
|
| 103 |
+
## Interpretation limits
|
| 104 |
+
|
| 105 |
+
Arrest demographics (citizenship, gender and birth year) are available only in the newer release, so they do not support trends before October 2022. The current release adds `arrests.city` and `county` for that window (31% populated), but does not include `apprehension_type`. Detention rows are facility segments; count stays using `v_detention_stays`. The Deportation Data Project continues to flag removals as less reliable than the July 2025 release.
|
| 106 |
+
|
| 107 |
+
<a id="duckdb-cli"></a>
|
| 108 |
+
|
| 109 |
+
## More example queries
|
| 110 |
+
|
| 111 |
+
Count recorded arrests by month. Coverage and release boundaries above still apply.
|
| 112 |
|
| 113 |
```sql
|
| 114 |
INSTALL httpfs;
|
|
|
|
| 122 |
GROUP BY 1 ORDER BY 1 DESC LIMIT 12;
|
| 123 |
```
|
| 124 |
|
| 125 |
+
<a id="advanced-access-quick-start"></a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
|
| 127 |
+
## Other ways to connect
|
| 128 |
|
| 129 |
+
### Python metadata inspection
|
| 130 |
|
| 131 |
```python
|
| 132 |
import duckdb
|
|
|
|
| 141 |
|
| 142 |
DuckDB uses HTTP range requests, so only the pages needed for your query are downloaded.
|
| 143 |
|
| 144 |
+
## Sources and maintenance
|
| 145 |
|
| 146 |
+
### Source and license reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
|
| 148 |
+
See the [data dictionary](https://github.com/ian-nason/ice-database/blob/main/DICTIONARY.md) for column definitions and the [Deportation Data Project (FOIA litigation)](https://deportationdata.org) for the source. License: CC-0.
|
| 149 |
|
| 150 |
+
### Data Source
|
|
|
|
| 151 |
|
| 152 |
+
[Deportation Data Project](https://law.ucla.edu/academics/centers/center-immigration-law-and-policy/deportation-data-project) (Berkeley Law / UCLA). Data obtained through FOIA litigation against ICE.
|
|
|
|
|
|
|
|
|
|
| 153 |
|
| 154 |
+
### How releases are combined
|
|
|
|
| 155 |
|
| 156 |
+
The August 2026 release is cumulative from October 1, 2022. Older event records in its overlapping coverage are superseded by date or stay coverage; they are not matched across releases by person identifier. The earlier 2025 settlement release is superseded entirely. Custody-assessment decisions remain from release_2023 through September 2023.
|
| 157 |
|
| 158 |
+
### Build source
|
| 159 |
+
|
| 160 |
+
Built with [ice-database](https://github.com/ian-nason/ice-database).
|
| 161 |
|
| 162 |
+
### License
|
| 163 |
|
| 164 |
Database build code: MIT. Underlying data: public domain (U.S. government records released via FOIA).
|
| 165 |
|
| 166 |
+
### GitHub
|
| 167 |
|
| 168 |
Full source code, build instructions, and example queries: [github.com/ian-nason/ice-database](https://github.com/ian-nason/ice-database)
|
| 169 |
|
| 170 |
|
| 171 |
+
### Changelog
|
| 172 |
|
| 173 |
+
#### 2026-09-14 — Data refresh (Deportation Data Project release of 2026-08-21)
|
| 174 |
|
| 175 |
- Rebuilt from the DDP's August 2026 ICE release (activity 2022-10-01 through
|
| 176 |
2026-08-06), which is cumulative and fully supersedes the March 2026 and
|
|
|
|
| 197 |
facility-segment level; DDP continues to flag the removals data as less
|
| 198 |
reliable than the July 2025 release.
|
| 199 |
|
| 200 |
+
#### 2026-07-06 — Full refresh + data-quality audit
|
| 201 |
|
| 202 |
Rebuilt from the Deportation Data Project's 2026 FOIA release (data through
|
| 203 |
2026-03-10) and repaired after an independent SQL-verified audit.
|
|
|
|
| 226 |
Sep 2023.
|
| 227 |
- `arrests` demographics (citizenship, gender, birth year) exist only in
|
| 228 |
release_2026 rows.
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
### R with DBI and duckdb
|
| 232 |
+
|
| 233 |
+
Install the dependencies once with `install.packages(c("DBI", "duckdb"))`.
|
| 234 |
+
|
| 235 |
+
```r
|
| 236 |
+
library(DBI)
|
| 237 |
+
con <- dbConnect(duckdb::duckdb())
|
| 238 |
+
dbExecute(con, "INSTALL httpfs")
|
| 239 |
+
dbExecute(con, "LOAD httpfs")
|
| 240 |
+
dbExecute(con, "ATTACH 'https://huggingface.co/datasets/Nason/ice-database/resolve/main/ice.duckdb' AS ice (READ_ONLY)")
|
| 241 |
+
dbGetQuery(con, "SELECT apprehension_date FROM ice.arrests LIMIT 5")
|
| 242 |
+
dbDisconnect(con, shutdown = TRUE)
|
| 243 |
+
```
|
| 244 |
+
|
| 245 |
+
DuckDB uses HTTP range requests; queries run on your machine and may need substantial memory or download data. A `LIMIT` does not guarantee a small scan.
|