Block 166 of 297
Open Data Catalog
A table of public datasets with department, update frequency, last updated date and download formats.
- Puck key
- OpenDataCatalogBlock
- Export
- openDataCatalogBlock
- React component
- <OpenDataCatalog />
- Path
- components/puck/open-data-catalog-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 data table of public datasets with columns for dataset, department, update frequency, last updated date and formats. Formats appear as small text badges, with API filled in so developers spot it. Narrow screens scroll the table sideways inside its own box, so the page itself does not scroll. Use it to feature the most requested datasets and link to the full portal.
- A city transparency or open data landing page
- A GIS department page listing map layers and downloads
- A performance dashboard page that cites its underlying data
Writing the content
- Enter Formats separated by commas, like "CSV, JSON, API". GeoJSON, SHP, KML and Map get a tinted badge.
- Fill in Table caption, such as "Featured datasets"; it shows above the table with an automatic dataset count.
- Keep each Description to one short sentence so rows stay readable. Up to 40 datasets fit.
- State the reuse terms in License note, and use Request link text to point people to a dataset request form.
Accessibility
- It is a real table with a caption, column headers and the dataset name as each row's header, so screen readers announce context for every cell (WCAG 1.3.1).
- The table sits in a focusable region named by the caption, so keyboard users can scroll it sideways (WCAG 2.1.1).
- Formats are text, not icons, and each row's format badges are a list labelled "Formats".
Customizing the code
- Badge colors come from the formatStyle function; add patterns there to style other formats.
- The table's minimum width is min-w-3xl. Lower it if you remove columns, and column header text is set directly in the thead.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Eyebrowtext
- Headingtext
- Heading levelselect
- Introtextarea
- Table captiontext
- Datasetsarray
- Portal link texttext
- Portal linktext
- Request link texttext
- Request linktext
- License notetextarea