Skip to content

Block 220 of 297

Public Health Data

Three or four health indicators with county-vs-state bars, comparison and trend notes, and a source line.

Puck key
PublicHealthDataBlock
Export
publicHealthDataBlock
React component
<PublicHealthData />
Path
components/puck/public-health-data-block.tsx
Dependencies
None
License
MIT

About this block

When to use it, how to write for it, and what to change in the code.

What it's for

A snapshot of up to four community health indicators in a ruled grid. Each shows the local value in large type, a pair of bars comparing your area with the state, a plain-words comparison line and a trend note, with a source line and data portal link below. Columns match the number of indicators, and all stack on phones.

  • A health department "Data and reports" landing page
  • A community health assessment summary
  • A grant or annual report page showing progress on key measures
Writing the content
  • Indicators takes one to four. Enter values as plain numbers, such as 71.4, with the symbol in Unit; values can also be data-source tokens.
  • Set Bar scale maximum to the value that fills a bar. Use 100 for percentages, or a smaller number like 20 so low rates are still visible.
  • Write Comparison text in plain words, like "3 points higher than the state". The block does not calculate it for you.
  • Source line is labeled "Source:" automatically; name each dataset and year. The sample figures are placeholders, not real data.
Accessibility
  • Bars and the large repeated value are hidden from screen readers; each value is read once as text next to its area label (WCAG 1.1.1).
  • Your area label and Comparison label appear beside every bar as text, so the two series don't depend on color (WCAG 1.4.1).
  • Each indicator is an article labeled by its heading, which sits one level below the Heading level setting (WCAG 1.3.1).
Customizing the code
  • Number formatting uses toLocaleString("en-US") in fmt; column rules live in the cols constant in render.

Editor fields

What content editors see in the P1 sidebar when they select this block.

  • Headingtext
  • Heading levelselect
  • Introtextarea
  • Your area labeltext
  • Comparison labeltext
  • Indicatorsarray
  • Source linetextarea
  • Data portal link texttext
  • Data portal linktext