| TRI Google Ads Grant Campaign Performance (90-day export) | ||||||
|---|---|---|---|---|---|---|
| Combines exact metrics with inline bars for quick scanning | ||||||
| Campaign |
Traffic
|
Cost Efficiency
|
Outcome Tracking
|
|||
| Clicks | Impressions | CTR | Cost | Avg. CPC | Conversions1 | |
| TRM Trainings Page - V1 | 471 | 7,766 | 6.1% | $731.16 | $1.55 | 0 |
| Community Resiliency Model (CRM) | 34 | 632 | 5.4% | $45.67 | $1.34 | 0 |
| 1 Conversions appear as 0 in this export, which suggests conversion tracking needs verification in Google Ads and/or GA4. | ||||||
| Source: TRI Google Ads Grant exports (Campaign report + Search terms report). Generated in R using gt and gtExtras. | ||||||
M05-Visualizing Data with Tables for MSDM CEP
1 Prompt 1
1.1 Start a new project and Quarto file (.qmd) as you learned previously. Create a folder for this workshop on your hard drive called “M05” under the course folder. Start a new project in RStudio using that folder as the project directory. Create a new .qmd file named appropriately. Set working directory to the project folder.
2 Response
I created a dedicated folder named M05 inside my course folder and opened it as an RStudio Project (.Rproj). This ensures my working directory is automatically set to the project folder whenever I open the project file. I then created and saved this Quarto file as “Jung, Jae-M05-Table-Viz.qmd” inside the same folder.
Note: Since an Rproj file sets the working directory automatically, I did not need to manually set the working directory via Session > Set Working Directory.
Folder contents I used • Qian, Angela-M05-Table-Viz.qmd • Campaign report.csv • Search terms report.csv • Search keyword report.csv • Output files generated by Quarto: .html and any exported table files
⸻
3 Prompt 2
3.1 When you prepare the Quarto report, implement as many features and effects of the HTML format as you can, including text formatting, headings, lists, blockquote, tabsets, cross-referencing, footnotes, callouts, TOC, toc-depth/toc-expand, section numbering, self-contained, theme options, hiding code, code overflow, and code tools.
4 Response
This report uses the following Quarto and HTML features: • Table of contents (expanded; depth set to 3) • Section numbering • Self-contained HTML (embed-resources enabled) • HTML theme (Cosmo theme) • Callout blocks (Tip/Note/Warning) • Blockquote formatting • Tabsets for clean organization • Footnotes for documentation and citations • Cross-referencing to tables and sections • Code tools and hidden code (echo disabled by default; code tools enabled)
In Quarto, hiding code while showing outputs helps keep the report executive-friendly without losing reproducibility.
⸻
5 Prompt 3
5.1 Write a short essay: 1. Summarize what you learned from the videos 2. What did you like about gt and gtExtra 3. How tables complement charts 4. When you would prefer tables over charts Then:
• Use MSDM CEP data
• Use gt + gtExtra to show descriptive stats and mini charts in one table
• Include titles/subtitles, stub label, relabeled variables, source notes, footnotes, spanners, currency formatting, color emphasis, and other functions
• Explain why the table is worth adding to the MSDM project report/slides
6 Response
6.1 3.1 Essay Reflection
From the videos, I learned that tables can be treated as first-class visualization objects, not just “data dumps.” Tools like gt make it possible to structure a table the same way we structure a chart: strong hierarchy, intentional formatting, and a clear narrative. The videos emphasized that a well-designed table should guide attention using alignment, grouping, labeling, and subtle emphasis rather than relying on dense grids or visual clutter.
What I liked most about gt is that it gives a clean grammar for table design, similar to ggplot2’s grammar for charts. It also encourages professional standards like good labeling, readable number formatting, and structured headers. The gtExtras package stood out because it makes advanced effects fast, especially adding embedded mini charts (like bars) directly inside cells. That “numbers + visuals in one table” format is extremely useful when presenting summary metrics quickly.
Tables complement charts because charts are better at showing trends and shape, while tables are better at delivering exact values, enabling side-by-side comparisons, and supporting quick scanning when the number of categories is small. In my MSDM CEP work, charts communicate the big picture, while tables help stakeholders confirm precise campaign totals and compare performance across campaigns and match types.
I would prefer tables over charts when:
The audience needs exact values (not approximate)
The dataset has few categories and many metrics per category
The goal is comparison across several KPIs at once
The output needs to be pasted into an executive report where space is limited and a compact “dashboard table” is more efficient than multiple charts
⸻
7 3.2 Data Import and Wrangling (Google Ads Export)
Important: Google Ads exports often contain 2 header lines and can be UTF-16LE encoded. This reader handles that format by converting to UTF-8 and skipping the first 2 lines.
8 3.3 Table Visualization (gt + gtExtras)
8.1 Below is my main table (Table ?@tbl-campaign-summary) summarizing Campaign-level performance for TRI’s Google Ads Grant account. This table is designed to be “slide-ready” and “report-ready” because it combines exact values with small embedded bars for quick scanning.
9 3.4 Why This Table Belongs in the MSDM CEP Report or Slides
This table is worth including because it compresses multiple KPIs into a single view without requiring the audience to flip across multiple charts. It supports executive decision-making by showing where traffic is concentrated, where spend is concentrated, and whether outcome tracking is present.
It also directly supports AO decision points for TRI’s Google Ads grant, including:
confirming campaign concentration (traffic and spend)
identifying whether campaign expansion into new markets is necessary
highlighting the conversion tracking gap as a priority next step
10 Appendix: Optional Tabset Example (Extra HTML Feature)
Key Takeaways
Campaign traffic is concentrated in a small number of campaigns
Spend is similarly concentrated, implying limited diversification of grant activity
Conversions appearing as 0 suggests tracking needs verification before optimization can be measured
Next Steps
Verify conversion tracking configuration in Google Ads and/or GA4
Expand into non-brand, discovery keyword themes aligned to TRI services
Add negative keywords to reduce irrelevant search traffic