← All datasets

Immigration by Country

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 2 joinable files last pulled 2026-11-21
Where would you start?
Pick a question, or ask your own and answer it; publish what you find as an insight. The same question can carry many insights from different angles.
  • Which origin countries dominated each immigration era?
  • How do immigration waves line up with US policy changes?
  • Which decades saw the fastest regional shifts in origin?
Annual Totals 203 rows × 2 columns
YearLPRs
By Country and Decade 1,827 rows × 5 columns
EntityEntity_TypeRegionDecadeLPRs

Questions and answers

What is the Immigration by Country dataset?

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.

How big is the Immigration by Country dataset?

2,030 rows across 2 joinable files, with 7 columns in total: Year, LPRs, Entity, Entity_Type, Region, Decade, LPRs.

Where does the data come from?

It is built by programmatically scraping ohss.dhs.gov, last pulled on 2026-11-21. Datasets are versioned; older versions stay downloadable.

Is the dataset free to download?

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.

Can I see the code that built this dataset?

Yes. The exact Python scraper that built it is viewable on the dataset page by any signed-in member, so every number is reproducible.

How do the files join?

Join the files on the decade boundary (Year falls inside Decade); Entity joins the Countries topic for modern names.

Can the data contain errors?

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.

Browse every free dataset on CodeSights