Release 10/11: add uscogdata to the r-packages page #51

Closed
opened 2026-08-08 18:44:54 -04:00 by jared · 1 comment
Owner

Depends on #47.

Add an entry to data/r-packages.yaml in the jaredknowles.com repo, which drives the cards on /r-packages.

- name: "uscogdata"
  status: "github"
  version: "0.3.0"
  updated: "2026-08-08"
  lifecycle: "experimental"
  description: >-
    A curated R reader for the Civilytics US Census of Governments finance
    corpus: every dollar US state, county, municipal and township
    governments reported raising and spending, FY1967-FY2024. Handles the
    item-code and identifier changes across vintages, and attaches
    provenance to every result describing what was converted, what was
    aggregated, and which known series breaks intersect the query.
  github: "https://github.com/civilytics/uscogdata"
  docs: "https://civilytics.r-universe.dev/uscogdata"

Two things to decide

status accepts cran / github / archived. There is no r-universe value, so the card cannot show the actual install path (install.packages(repos = "https://civilytics.r-universe.dev")). Options: use github and accept it, or add an r-universe status to the template. With more packages heading to r-universe rather than CRAN, the template change probably pays for itself.

lifecycle — proposed experimental rather than stable. At 0.3.0, with government types 4 and 5 out of scope pending validation, stable overclaims. Easy to raise later; awkward to lower.

Done when

  • Entry added and the card renders
  • status question decided
Depends on #47. Add an entry to `data/r-packages.yaml` in the jaredknowles.com repo, which drives the cards on `/r-packages`. ```yaml - name: "uscogdata" status: "github" version: "0.3.0" updated: "2026-08-08" lifecycle: "experimental" description: >- A curated R reader for the Civilytics US Census of Governments finance corpus: every dollar US state, county, municipal and township governments reported raising and spending, FY1967-FY2024. Handles the item-code and identifier changes across vintages, and attaches provenance to every result describing what was converted, what was aggregated, and which known series breaks intersect the query. github: "https://github.com/civilytics/uscogdata" docs: "https://civilytics.r-universe.dev/uscogdata" ``` ## Two things to decide **`status`** accepts `cran` / `github` / `archived`. There is no r-universe value, so the card cannot show the actual install path (`install.packages(repos = "https://civilytics.r-universe.dev")`). Options: use `github` and accept it, or add an `r-universe` status to the template. With more packages heading to r-universe rather than CRAN, the template change probably pays for itself. **`lifecycle`** — proposed `experimental` rather than `stable`. At 0.3.0, with government types 4 and 5 out of scope pending validation, `stable` overclaims. Easy to raise later; awkward to lower. ## Done when - [x] Entry added and the card renders - [x] `status` question decided
Author
Owner

Both questions decided; entry is on branch feat/uscogdata-r-package-card in the site repo

status: added an r-universe value, as this issue suspected would pay for itself. It
cost two edits:

  • layouts/r-packages/single.html — while adding the case I replaced the nested cond
    chain building the ribbon label with a dict lookup. Each new status was costing another
    level of nesting and the fourth made the line genuinely unreadable. The humanize
    fallback for unlisted statuses is preserved.
  • assets/css/pages.css — one ribbon colour (Riso blue, label in --paper since it is a
    dark ground, like the archived ribbon rather than cran/github).

The card now reads R-universe v0.4.0, which points at the actual install path instead
of implying a GitHub clone.

Verified the refactor is behaviour-preserving by temporarily flipping the fixture: true
entries visible and confirming all four labels still render: CRAN, R-universe,
GitHub, Archived. Restored afterwards.

lifecycle: experimental, as proposed. Government types 4 and 5 are out of scope
pending validation, so stable would overclaim. Easy to raise, awkward to lower.

Two corrections to the entry drafted in this issue

  • version: "0.4.0", updated: "2026-08-10" — the draft said 0.3.0 / 2026-08-08.
    main moved past 0.3.0 with the cohort-predicate merge and 0.4.0 is now tagged.
  • The description now names why the corpus is hard (item codes across vintages, the 2017
    renumbering, absence meaning two different things), rather than only what the package
    does. That is the part that makes someone stop on the card.

Placed after the CRAN entries and before the GitHub ones, following the file's existing
installability ordering. Site builds clean and the card renders.

Not merged — the branch also carries the #50 post draft, so review them together.

## Both questions decided; entry is on branch `feat/uscogdata-r-package-card` in the site repo **`status`: added an `r-universe` value**, as this issue suspected would pay for itself. It cost two edits: - `layouts/r-packages/single.html` — while adding the case I replaced the nested `cond` chain building the ribbon label with a `dict` lookup. Each new status was costing another level of nesting and the fourth made the line genuinely unreadable. The `humanize` fallback for unlisted statuses is preserved. - `assets/css/pages.css` — one ribbon colour (Riso blue, label in `--paper` since it is a dark ground, like the archived ribbon rather than cran/github). The card now reads **`R-universe v0.4.0`**, which points at the actual install path instead of implying a GitHub clone. Verified the refactor is behaviour-preserving by temporarily flipping the `fixture: true` entries visible and confirming all four labels still render: `CRAN`, `R-universe`, `GitHub`, `Archived`. Restored afterwards. **`lifecycle`: `experimental`**, as proposed. Government types 4 and 5 are out of scope pending validation, so `stable` would overclaim. Easy to raise, awkward to lower. ## Two corrections to the entry drafted in this issue - **`version: "0.4.0"`, `updated: "2026-08-10"`** — the draft said 0.3.0 / 2026-08-08. `main` moved past 0.3.0 with the cohort-predicate merge and 0.4.0 is now tagged. - The description now names *why* the corpus is hard (item codes across vintages, the 2017 renumbering, absence meaning two different things), rather than only what the package does. That is the part that makes someone stop on the card. Placed after the CRAN entries and before the GitHub ones, following the file's existing installability ordering. Site builds clean and the card renders. **Not merged** — the branch also carries the #50 post draft, so review them together.
jared closed this issue 2026-08-11 09:45:22 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Civilytics/uscogdata#51