Every series, where it came from, what it counts and what failed.
Two different questions hide inside "how much law is there," and they need different measurements.
Flow is how much law a body enacts in a year. Stock is how much law is on the books at a moment. They are not convertible, because most laws amend laws that already exist. A statute that rewrites forty sections counts as one enactment. So does one that repeals an entire chapter. Counting enactments therefore tells you about legislative activity and almost nothing about the size of the corpus.
The way out is to stop counting enactments and measure the code itself — the consolidated text, in which every amendment and repeal has already been applied. Compare the code at two dates and amendments net out automatically; you never have to track them. The size of the code at time T minus its size at time T−1 is the net effect of everything that happened in between.
That makes the constraint archival rather than conceptual: did anyone preserve a machine-readable copy of the code as it stood in past years? The answer varies enormously by government.
| Corpus | Snapshots from | Why |
|---|---|---|
| US Code | 1926 | Bound editions, later digitized |
| Code of Federal Regulations | 1950 | Annual page counts published |
| NY Consolidated Laws | Oct 2014 | Senate API retains weekly versions |
| NYC Administrative Code | 2022 | Only via archived copies of a publisher's bulk file |
| NYCRR (state regulations) | never | Licensed to Westlaw, not machine-readable |
The federal government archived its own law. Albany began about a decade ago. New York City effectively did not — the only reason any earlier snapshot exists is that the Internet Archive happened to capture a commercial publisher's ZIP file a handful of times.
Primary source: Jeong et al., "A century of evolution in the complexity of the United States legal code," Scientific Data 13:13 (January 2026), data at figshare 10.6084/m9.figshare.29540039. Unit: words. Coverage: 1926–2023.
The deposited archive is 1.88 GB. Rather than download it, the ZIP central directory was read over HTTP range requests against the signed storage URL and only the single needed member inflated (Data Set1/ContentsOfTitle.csv, 109 KB compressed).
The CSV carries a per-year All titles aggregate row alongside the numbered-title rows. Summing the rows naively double-counts every year. The aggregate row was verified equal to the sum of the numbered titles at a ratio of 1.0000 in all 41 years, and used as the authoritative total.
To check the word series, a second and entirely separate measurement was built from government publication metadata. www.govinfo.gov/metadata/pkg/{package}/mods.xml is keyless and its package-level <extent> matches the authenticated REST API exactly. 1,674 packages were harvested, 1,551 carrying page counts, against the API's reported collection count of 1,552. Coverage 1994–2024.
The carry-forward gotcha, and proof it is real. The Office of Law Revision Counsel does not reissue every title every year. Summing only the titles published in a given year manufactures a fake collapse: in 2004 just 46 titles were reissued, and the naive sum reads 33,269 pages against a correct 39,231 — a 15.2 percent phantom dip that would look exactly like deregulation. Every year therefore uses each title's most recent edition at or before that year. Titles are never back-filled, so a title contributes zero until its first edition (Title 54 from 2014, Title 34 from 2017, Title 53 reserved). The naive series is retained in us-code-pages-govinfo.json under naive_no_carry_forward, labelled not to be plotted, purely as a counterexample.
Agreement between the two methods: over the 30 overlapping years, Pearson r = 0.9945 on levels. Growth 1.640× (words) against 1.785× (pages). Words per page holds near-constant at a mean of 894 with a coefficient of variation of 2.0 percent, which indicates that the two are measuring the same corpus. Indexed to 2000 they finish at 146.1 and 146.3.
One limit: year-over-year increments do not correlate between the two series (r = 0.05). Annual changes are small relative to the lumpiness of page counts and reissue timing. Neither series supports a claim about any single year's change — only the multi-year trend. Pages growing slightly faster than words is consistent with typesetting drift.
The original brief was to measure the growth of law at the city, state and federal level, possibly by pages of code. That is not achievable.
There is no historical page or word count of the New York City Administrative Code, and none of the New York Codes, Rules and Regulations. Both are published commercially. The city's code is distributed by American Legal Publishing as bulk XML, which gives a current section count but no back catalogue; the earliest archived copy of that file is from 2022. The state's regulations are handed to Westlaw and are not machine-readable at all.
The one apparent exception is the Mercatus Center's State RegData, which has two snapshots of the New York regulatory code: 307,636 restrictions and roughly 22.5 million words in 2017, and 300,095 restrictions and 17,899,233 words in 2023. Both restrictions and words fall, the latter by 4.6 million, over a period with no major repeal effort. That is a corpus-construction difference between two versions of their pipeline, not deregulation. It was excluded.
So the project measures annual legal output — laws enacted and regulatory pages published per year — which does exist consistently at all three levels. Where a stock measure exists (the US Code, the Code of Federal Regulations and New York's Consolidated Laws), it is shown separately and labelled as stock.
Source: NYC Open Data, "City Council Legislation: Bills and Local Laws", dataset 6ctv-n46c. Coverage: 1998–2024; the chart shows 2000–2024.
Query:
GET https://data.cityofnewyork.us/resource/6ctv-n46c.json ?$select=law_number,file_num,intro_date &$where=law_number IS NOT NULL AND law_number != 'NA' &$limit=50000
Returned 3,102 rows. The year is taken from the local law number itself, which has the form 2024/001, rather than from a date field — local law numbering restarts each year, which makes the metric self-validating.
The law_number field uses the literal string "NA", not NULL, for bills that were never enacted. Filtering only on IS NOT NULL silently admits them. The contamination is small — three rows — but it moved 2001 from 84 to 82.
For every year, the count of distinct local law numbers was checked against the highest sequence number in that year. No year has a count exceeding its maximum sequence, which is the failure mode that would indicate double-counting. Years where the count falls below the maximum are recorded individually in data/nyc-local-laws.json under missing_sequences: 1998 is missing local laws 1 through 3, almost certainly introduced in the 1997 session before this dataset's coverage begins, and 2018, 2019, 2022 and 2024 are each missing exactly one number.
One row carries a malformed law_number of "98/060", with a 1998 introduction date. It was read as 1998/060 and folded into 1998, which is why that year reads 57 rather than 56.
A figure of roughly 282 local laws for 2017 was carried into this project from earlier research and used as an expected value. The query returned 256. On inspection the 2017 numbering runs 1 to 256 with no gaps at all, so 256 is the complete sequence and the 282 figure is wrong. The data was kept and the expectation discarded.
Why it ends at 2024: the dataset was last refreshed in March 2025. It contains 18 rows dated 2025, which are stragglers rather than a complete year, and they are excluded. The Legistar API that would give live counts now returns 403 Token is required; any guide describing it as keyless is out of date.
Source: the Legislative Bill Drafting Commission's official per-year chapter list. Coverage: 1995–2025; the chart shows 2000–2025.
GET http://public.leginfo.state.ny.us/navigate.cgi ?NVLIO:&hwebpage=CHAPLIST&hlistyr=YYYY&SESSYR=YYYY
New York assigns chapter numbers sequentially within each calendar year, so the highest chapter number of a year is the count of chapter laws enacted. Every year from 1995 to 2025 was fetched directly. No year is estimated, interpolated or carried forward.
Validation: 2024 returns 679, which matches two independent sources — a Senate bill action line reading "signed chap.679", and the New York State Board of Elections publishing the 2025 Election Law as amended through Laws 2024, Chapter 679.
Four years have a chapter number with no bill attached (1997 ch. 10, 1998 ch. 10, 2003 ch. 3, 2010 ch. 60). Each was checked with a direct chapter lookup and returned "No bill information found", so these are gaps in the numbering rather than scrape failures. Every other year is contiguous. Both the maximum and the listed count are stored in the JSON.
2026 is excluded as an incomplete year (169 chapters as of retrieval).
Route that failed: the NY Senate Open Legislation API returns 401 without a key, and no key was available. The Bill Drafting Commission list turned out to reach further back than the API would have (1995 against roughly 2009).
Source: GovInfo PLAW collection sitemaps, one per year. Coverage: 1995–2026; the chart shows 2000–2025. Basis: calendar year, matching the other series.
GET https://www.govinfo.gov/sitemap/PLAW_{YEAR}_sitemap.xml
Counted unique package IDs matching PLAW-{congress}publ{n}; private law packages (pvtl) were excluded. No API key required. GovInfo buckets each law by its enactment date, which is what makes a true calendar-year basis possible.
The Senate's "Résumé of Congressional Activity" only exists from 2009 onward — requests for 1999 through 2008 return HTTP 200 with an HTML soft-404 body, ten byte-identical files that are not PDFs and are easy to mistake for success. The Congress.gov API requires a key that was not available, and the shared DEMO_KEY returns OVER_RATE_LIMIT.
The GovInfo counts were then cross-checked against the Senate résumés for the years where both exist. They agree exactly where sessions align (2009: 125 from both) and diverge exactly where they should. The Senate's 2010 session count of 258 exceeds calendar-year 2010's 221 by 37 — and the calendar-2011 sitemap contains precisely 37 laws from the 111th Congress, signed in early January 2011 after the lame-duck session. The discrepancy reconciles to the day.
Source: Office of the Federal Register publication statistics. Coverage: 1976–2026; the charts show 2000–2025.
The actual page count is used throughout, not the total. The total includes skipped and blank pages — 6,070 of them in 2000 alone. The four category columns (presidential documents, rules, proposed rules, notices) sum to the actual count exactly in recent years: 2024 gives 855 + 45,028 + 19,952 + 40,274 = 106,109, and 2025 gives 2,072 + 16,461 + 12,920 + 29,464 = 60,917. In early years the reconciliation is close but not exact — the four columns sum to 70,820 for 2000 against a stated actual of 71,149, a difference of 329 pages, or about half a percent. The cause was not identified. The stacked chart uses the category columns and therefore reflects the smaller figure for those years.
Scraping note: this page returns an empty body to a default curl user-agent. It must be requested with a browser user-agent. A pipeline that does not check for a zero-length response will silently record nothing.
2025 is complete and the drop is real. Federal Register pages fell from 106,109 in 2024 to 60,917 in 2025. This was verified against the category table independently of the totals table. 2026 is partial (44,706 pages through mid-July) and is excluded from every chart.
Source: GWU Regulatory Studies Center, RegStats, via a CSV linked from that page. Coverage: 1950–2024; the chart shows 2000–2024.
The CSV URL is date-stamped and changes when the file is updated, so it is scraped from the page rather than hardcoded. Anchor values: 2000 = 138,049 pages across 202 volumes; 2024 = 194,395 pages across 245 volumes.
Methodology break: the CSV's own footnote states that the series switches data provider to GovInfo for 2024 and 2025, from Federal Register Statistics for prior years. The break falls at the most recent point in the series. Separately, although the footnote refers to 2025, the CSV contains no 2025 row, so the series ends at 2024.
This is one of the project's stock measures, along with the US Code and New York's Consolidated Laws. It is the accumulated size of the federal regulatory code, not annual output, and the two are labelled distinctly on the page for that reason.
The result below was nearly published, and it would have been wrong.
Source: American Legal Publishing distributes the Administrative Code, Charter and Rules of the City of New York as bulk XML with no authentication, at files.amlegal.com/pdffiles/NewYorkCity/{Admin,Charter,Rules}/XML.zip. (The web front end at codelibrary.amlegal.com returns 403 to non-browser clients; the file host does not.) The Internet Archive holds five dated copies of the Administrative Code file, from June 2022 to March 2026. All 17 archives downloaded and parsed cleanly.
Method: sections counted as LEVEL[@style-name='Section'], deduplicated by child RECORD/@id. Deduplication is required — some chapters ship split across two files, producing 40 duplicates (12,246 raw against 12,206 deduplicated). Section body text lives in descendant LEVELs, not the section's own RECORD; an extractor that misses this finds zero local law citations.
Administrative Code sections: 9,656 (June 2022) rising to 12,206 (July 2026). An increase of 2,550 sections, or 26 percent, in four years.
The first warning was that everything grew at once, at nearly the same rate: sections 1.26×, words 1.23×, chapters 1.24× — and the publisher's own file count 1.25×. A body of law does not expand in lockstep with the number of files a vendor ships. A 26 percent expansion in 48 months is also implausible on its face for a city that enacts roughly 150 local laws a year, most of which amend existing sections rather than create new ones.
The decisive test was the earliest local law year present in "Appendix A: Unconsolidated Local Laws":
The publisher backfilled thirty years of local laws between two captures. Those 1,332 laws were in force in 2022. They appear as new sections purely because the 2022 file set did not contain them.
| Component | Sections | Share | Verdict |
|---|---|---|---|
| Appendix backfill, pre-2022 local laws | 1,332 | 52.2% | Coverage artifact |
| Appendix entries, 2022+ local laws | 154 | 6.0% | Real, but unconsolidated listings, not code sections |
| Net numbered code sections | 625 | 24.5% | Mostly real |
| Unnumbered technical items | 439 | 17.2% | Largely coverage; same step change |
Of the 712 numbered sections present in 2026 but not 2022, 611 cite a local law from 2022 or later and are new; 79 cite nothing later than 2021 and were therefore already on the books; 22 carry no citation. That is an 11 percent coverage-gap rate even within the cleanest subset.
Restricting to numbered code sections and excluding the appendix gives: Administrative Code 7,965 to 8,590 sections (+7.8 percent) and 3.51 to 3.80 million words (+8.4 percent) over four years, about 2 percent a year. The Charter, which has no appendix, is the only fully trustworthy series: 734 to 768 sections (+4.6 percent). The Rules of the City of New York give 6,207 to 6,637 (+6.9 percent).
These are reported here but not charted. Four years of a measure carrying an estimated 11 percent contamination cannot sit beside a century of federal data without implying a comparability it does not have. A reader who saw both lines on one grid would draw a conclusion the data does not support.
An external index built by BetaNYC from this same feed reports 854 Charter, 12,551 Administrative Code and 8,645 RCNY sections. This measurement found 768 / 12,206 / 7,926. The gap is definitional, not an error in either count: BetaNYC counts chapter-level entries alongside section-level ones, since chapters are themselves addressable documents in this feed. Adding chapters gives 854 (an exact match for the Charter: 768 + 86), 12,596 and 8,685 — within 0.4 percent for the other two, with the residual explained by growth between their edition (Local Law 2026/086) and the live feed measured here (2026/116). Note that their 12,551 also includes the backfilled appendix, so it is likewise unusable as a historical baseline.
dg92-zbpx, filtered to section_name='Agency Rules') is clean but begins in August 2013 — verified as a structural limit, since every row before 2013 belongs to a single section, Procurement. The rules.cityofnewyork.us portal only reaches mid-2020. New York state has no time series at all. Neither could span the window, so neither is plotted.Each source is stored as its own JSON file under data/, with a provenance field recording the exact query or URL used and a notes field recording caveats. data/data.json is the combined bundle the page reads; it is derived from the others and adds nothing.
nyc-local-laws.json — New York City, 1998–2024nys-chapter-laws.json — New York state, 1995–2025federal-public-laws.json — Congress, 1995–2026federal-register-pages.json — Federal Register total pages, 1976–2026federal-register-categories.json — Federal Register pages by category, 1976–2026federal-register-documents.json — Federal Register document counts, 2000–2026cfr-pages.json — Code of Federal Regulations pages, 1950–2024The document-count file is collected and stored but not currently charted. The Federal Register API caps a query's reported count at 10,000, so a whole-year query returns exactly 10000, the cap itself. The stored figures are sums of twelve monthly queries, each asserted to fall below the cap.
This project was built with AI assistance (Claude). No human editor has reviewed it. Every number was retrieved by query or scrape and none was typed by hand or estimated. Anchor values were checked against independently verified figures before each series was accepted; the one check that failed is documented above under Series 1, along with what was done about it.