datosAProcesar to the records you want, you can export that working dataset in two ways: a machine-readable CSV file via exportarCSV() or a print-optimised browser view via imprimirPDF().
CSV export
Click Export CSV to downloadestadisticas.csv. The file contains one header row followed by one data row per record in datosAProcesar.
Exported columns
Columns are written in the following fixed order:| # | Column | Source field | Description |
|---|---|---|---|
| 1 | sendDate | acf.sendDate | Original broadcast date in dd/mm/YY format |
| 2 | sendTime | acf.sendTime | Broadcast time |
| 3 | media | acf.media | Media outlet identifier |
| 4 | program | acf.program | Program identifier |
| 5 | iaResume | acf.iaResume | AI-generated summary of the clipping |
| 6 | link | acf.link | URL to the original source or recording |
| 7 | topics | acf.topics | Comma-separated category/topic tags |
Delimiter and encoding
The file uses a semicolon (;) as the field delimiter and UTF-8 character encoding. Open it in Excel by choosing Data → From Text/CSV and setting the delimiter to semicolon, or import it directly into any tool that accepts delimited text.
How it works
exportarCSV()
Build the CSV string
The method joins the header names with
; to form the first row, then maps each record in datosAProcesar to a ;-joined row of field values read from the record’s acf object.Create a Blob
The full CSV string is wrapped in a
Blob with MIME type text/csv;charset=utf-8;, keeping special characters intact.Generate an object URL
URL.createObjectURL(blob) produces a temporary browser-managed URL pointing to the in-memory Blob.The
media and program columns reflect the values as they appear in the WordPress ACF fields. The analytics component resolves abbreviations against the XLS media catalog on load, so if your catalog entries are current, the exported values will already contain full display names.PDF print
Click Print to open the browser’s print dialog.imprimirPDF() calls window.print() directly:
imprimirPDF()
Best practices
- Target your export. Apply date range, category (
/c/:cat), and outlet (/m/:medio) filters before downloading. A well-scoped CSV is easier to share with officials than a full 30-day dump. - Verify the row count. The number of data rows in the CSV equals the number of records in
datosAProcesar. Check the chart totals on screen to confirm the export covers what you expect. - Enrich with catalog names. Because
mediaandprogramexport as raw identifiers, join the CSV against the XLS media catalog in Excel or a reporting tool to get display names in your final deliverable. - Use print for quick briefings. The PDF path is fastest for one-off reports. For recurring analysis or data integration, prefer CSV.
Dashboard
Chart types and data loading overview.
Filtering
Date range, category, and outlet filters in detail.