Guide

Datasets user guide

Publish downloadable datasets and control ATP-gated access from the editor.

Create or edit a dataset

  1. Open a Dataset post (linked to a datasets taxonomy term via term-data-store).
  2. In Dataset Options, upload or replace the download file with the media drop zone.
  3. When replacing data mid-month, confirm the new data uploaded prompt so the stats panel can split before/after counts.
  4. Toggle ATP when the American Trends Panel terms of service must be accepted before download.
  5. Publish. Related posts, features, and charts can be tagged with the dataset term when they declare prc-datasets support.

Staff with manage_options also see a Survey questions list in Dataset Options when Roper is active. Each row links to the catalog edit screen. If more than 50 questions match, View all in wp-admin opens the classic survey-question list filtered by this dataset term.

Download stats in the editor

The Dataset Options sidebar includes a download heatmap with year/month selectors and day drill-down. Stats come from GET /prc-api/v3/datasets/download-stats (editors only).

Downloader audience

In Dataset Options, generate or rebuild a Mandrill list of users who downloaded the file. The scan can take several minutes. You can leave the editor; the list is saved when the job finishes. Create a transactional email from Emails → Transactional, or with wp prc datasets build-audience.

Blocks

Dataset Download (prc-platform/dataset-download)

Place on dataset templates or pages that should offer the file. The Interactivity API client calls Firebase-authenticated download endpoints and surfaces the ATP form when required.

Not insertable from the inserter. The download block injects it when the dataset is ATP-restricted and the user has not accepted.

Dataset Description (prc-platform/dataset-description)

Editor-only helper that binds related dataset post_content into a paragraph via the prc-platform/dataset-description block bindings source.

Front-end download flow

  1. Sign in

    The visitor must have a Firebase identity so download requests can send X-PRC-User-Id and X-PRC-User-Token.

  2. ATP check

    ATP datasets call check-atp / accept-atp before a URL is returned.

  3. Download

    get-download resolves the file URL, rate-limits by IP, increments counters, and logs against the user record.

Was this helpful?