Understanding PDK Data
With REX sending data to your local PDK server, you can now log in to the admin interface, review what has been collected, and export it for analysis. This guide walks through those steps.
The PDK admin interface
Section titled “The PDK admin interface”Open http://localhost:8000/ in your browser and log in with the credentials configured for your local PDK instance (check the rex-dev-infrastructure documentation or your .env file for the default admin username and password).
Once logged in, the main areas you will use are:
Participants: a list of every identifier that has submitted data. Each entry shows when that participant was first seen and when they last submitted a record. This is your at-a-glance view of who is actively participating.
Data sources: the types of data that have been collected (page events, browsing history, search results, etc.). Each source type corresponds to a REX module. You can browse records by source to confirm the right data is coming in before running a full export.
Export: where you generate downloadable archives of the collected data. You select which participants and which data types to include, then download a zip file.
Exporting data
Section titled “Exporting data”- Log in to the PDK admin interface at
http://localhost:8000/ - Navigate to the export section (the exact menu label may say “Export” or “Data Export” depending on your PDK version)
- Select the participant(s) you want to include (you can select all or filter to specific identifiers)
- Select the data types (sources) you want to export, or leave all selected to get everything
- Click the export or download button
- Save the zip file to your computer
The zip will contain one or more JSON files with all matching records.
Exploring the export with rex-data-explorer
Section titled “Exploring the export with rex-data-explorer”BRIC provides a set of Jupyter notebooks for working with PDK export files. Clone the repository:
git clone https://github.com/bric-digital/rex-data-explorerDrop your exported zip file into the rex-data-explorer folder. Then open the relevant notebook for the data type you want to analyze: for example, explore_history_data.ipynb for browsing history records.
Near the top of the notebook, find the ZIP_FILE variable and update it to match your filename:
ZIP_FILE = "your-export-filename.zip"Run all cells. The notebook will unpack the zip, parse the records, and produce summary tables and visualizations.
If you are new to Jupyter notebooks, JupyterLab Desktop is the easiest way to open and run them without any command-line setup.
A note on the export file format
Section titled “A note on the export file format”PDK export zips contain JSON files named using this pattern:
{participant}__{data_type}__{date}.jsonFor example: test-001__rex-page-events__2024-03-15.json
Each file contains an array of records. One thing to be aware of: PDK can sometimes include duplicate records in an export, particularly when records were submitted close together or when a participant appears in multiple export batches. The rex-data-explorer notebooks handle deduplication automatically, so you do not need to clean the data manually before running the notebooks.
Next step
Section titled “Next step”You have now seen the complete local pipeline: extension collecting data, PDK receiving it, and notebooks for analysis. The next stage covers building your own custom extension from the starter template.