Immigration statistics in one free CSV download: two centuries of lawful permanent residents from the DHS Yearbook of Immigration Statistics (public domain). The annual file is every year 1820 through 2023, from 8,390 arrivals in the first federal record to the 1907 Ellis Island peak above 1.2 million, the Depression floor under 30,000, and the 1991 IRCA spike past 1.8 million. The country file is the classic Table 2: persons obtaining LPR status by region and country of last residence per decade, 1820 through fiscal 2020, 1,827 entity-decade rows with regions, the America sub-region rollups, and 80-plus countries tagged by type. Ireland's famine exodus (656,000 in the 1840s, over a million in the 1850s), Europe's seven-million-strong 1900s, Mexico's two-million 1990s, and Asia overtaking Europe decades ago are all in the cells, and the gate asserts each one. DHS file downloads sit behind Akamai, so the workbook came via the Internet Archive and the decade table from the yearbook's own HTML pages; withheld cells ship as NA, and the pre-1892 record counts arrivals rather than admissions, as the yearbook itself notes. Joins the countries topic on name. Eight acceptance tests, one enforcing the 25 percent fill rule.
2,030 rows across 2 joinable files, with 7 columns in total: Year, LPRs, Entity, Entity_Type, Region, Decade, LPRs.
It is built by programmatically scraping ohss.dhs.gov, last pulled on 2026-11-21. Datasets are versioned; older versions stay downloadable.
Yes. Every CodeSights dataset is completely free as a CSV download; a free account is all it takes. Anyone can preview the data without signing in.
Yes. The exact Python scraper that built it is viewable on the dataset page by any signed-in member, so every number is reproducible.
Join the files on the decade boundary (Year falls inside Decade); Entity joins the Countries topic for modern names.
Automated scraping leaves room for error and the underlying sources change over time, so no version is guaranteed accurate or complete. If a number matters, verify it against the original source.