Skip to content

Statute table data elements

Britta edited this page Jul 21, 2024 · 21 revisions

Background info for team members: see the statute table element description ticket.

Example statute table

This is our goal. This table addresses several user needs - see statute research findings.

Screenshot 2024-07-21 at 11 48 28 AM

Example links for reference

See also: up-to-date Social Security Act.

Social Security Act United States Code GovInfo details
Section 1900 42 U.S.C. 1396. Medicaid and CHIP Payment and Access Commission GovInfo Aug. 14, 1935, ch. 531, title XIX, §1900
Section 1901 42 U.S.C. 1396-1. Appropriations GovInfo Aug. 14, 1935, ch. 531, title XIX, §1901
Section 1902 42 U.S.C. 1396a. State plans for medical assistance GovInfo Aug. 14, 1935, ch. 531, title XIX, §1902
Section 1903 42 U.S.C. 1396b. Payments to States GovInfo Aug. 14, 1935, ch. 531, title XIX, §1903

Data elements

This section describes the data elements we need to gather for the statute table.

Text values

The values in this section exist for each cell in the table. Each individual value is not necessarily unique (Title XIX is used repeatedly, for example) but the combination of cells in each row is always unique. There's no need to validate the uniqueness; this is just to describe how the table works.

  • SSA section number (ex SSA Section 1900, SSA Section 1901, SSA Section 1902) - this is
  • US Code section number (ex 42 U.S.C. 1396, 42 U.S.C. 1396-1, 42 U.S.C. 1396a, 42 U.S.C. 1396b)
  • Name of the section (ex Medicaid and CHIP Payment and Access Commission, Appropriations, State plans for medical assistance, Payments to States)
  • Name of the Title as it is used in the Statute Compilation (ex Title XIX or Title 19)

URLs

Values in this section exist as the hyperlink for each cell in the table. The same rules apply as above. Additionally, we'll need rules to generate the URLs.

URL examples are all for SSA Section 1900. View section data in admin panel: /admin/regulations/statutelinkconverter/1038/change/

  • House.gov web URL There's no evidence that any of these links will break and we think the parser is robust enough.
    • URL example: https://uscode.house.gov/view.xhtml?hl=false&edition=prelim&req=granuleid%3AUSC-prelim-title42-section1396
    • Pieces to replace: 42 (USC Title) and 1396 (USC Section)
  • Statute compilation PDF URL This is a GovInfo.gov destination; the link service seems reliable enough.
    • URL example: https://www.govinfo.gov/content/pkg/COMPS-8765/pdf/COMPS-8765.pdf
    • Pieces to replace: two instances of 8765. This is the same number that appears in the Source URL: https://www.govinfo.gov/content/pkg/COMPS-8765/uslm/COMPS-8765.xml
  • US Code Annual PDF URL This is a GovInfo.gov destination; the link service seems reliable enough.
    • URL example: https://www.govinfo.gov/link/uscode/42/1396
    • Pieces to replace: 42 (USC Title) and 1396 (USC Section)
  • SSA.gov web URL The URLs are mostly predictable.
    • URL example: https://www.ssa.gov/OP_Home/ssact/title19/1900.htm
    • Pieces to replace: 19 (Statute Title) and 1900 (Act Section)
    • Special case for Title 16: need to put 16b into the URL instead of 16, like this: https://www.ssa.gov/OP_Home/ssact/title16b/1631.htm

Table headings

Values in this section will only exist once in the table, in the top row, and it's probably okay if they are hardcoded.

  • Statute Citation
  • House.gov
  • Statute Compilation
  • US Code Annual
  • SSA.gov

Meta elements

Values in this section will only exist once in the table, in the top row. It's probably okay for most of them to be hardcoded, although the date column should be a singleton that gets configured in the Django admin panel.

  • Content type of each column's destination (Web page or PDF, currently)
  • Date for each data column
  • External link icon for web links
  • PDF icon for PDF links

Notes about dates

The US Code site and GovInfo annual editions provide "laws in effect as of" dates, while the GovInfo compilations and SSA site provide "amended through" dates.

We could theoretically automate the dates for the two GovInfo sources, because GovInfo has a robust API with structured ways to retrieve that info (looks like maybe the "packages" endpoint described in their API docs). Examples:

We don't know of a structured way to retrieve date info from the US Code site (other than scraping their HTML, since the date is stated at the top of each page). As of June 28, 2023, they say "Text contains those laws in effect on June 27, 2023" (Effective Jun 2023). They have downloadable bulk data but not an API.

The SSA site only provides "last updated" information in an obscure way - we have to use the Laws Amending the Social Security Act appendix and check the last item in the list. As of June 28, 2023, the last item is from 12–20–19 (Amended Dec 2019).

Data sources

The XML files we're parsing for this would be the same ones we're parsing for the statute link converters – for example:

  • ACA
  • SSA 11
  • SSA 16
  • SSA 18
  • SSA 19
  • SSA 21

We can have a 1:1 relationship between XML files in the Statute Link Conversion feature and XML files used for the table view.

Overview

Data

Features

Decisions

User research

Usability studies

Design

Development

Clone this wiki locally