Sub topic 12
Exporting Coverage Data and Cleaning It for Analysis
Prerequisites and purpose
Assume you understand basic PR measurement, earned media channels, and CSV files. A CSV, or comma-separated values file, stores spreadsheet-like data as plain text. This chapter shows how to turn a Meltwater or Cision export into a consistent dataset for analysis.
An export is not automatically analysis-ready. It may contain duplicate syndicated articles, inconsistent outlet names, missing sentiment labels, and several rows for one story. Decide what one row represents before calculating metrics. For example, one row might represent one article, one broadcast segment, or one social post.
Define the unit of analysis
Choose a unit that matches the question:
| Question | Useful unit |
|---|---|
| How many stories mentioned the brand? | Unique article or segment |
| How widely was the story distributed? | Unique article, with estimated reach |
| How much engagement did posts receive? | Individual social post |
| How often did a spokesperson appear? | Article or segment containing the spokesperson |
Record the rule in the report. If you mix articles and social posts, label the channels separately. Otherwise, a large number of short posts can make coverage volume look larger than it really is.
Clean the export
Use a repeatable process:
- Preserve the original export. Work on a copy and record the export date, platform, search name, and filters.
- Standardize dates, brand names, outlet names, and sentiment values. For example, map
Pos,positive, andPositivetopositive. - Remove exact duplicate rows.
- Identify syndicated duplicates. Compare canonical URL, headline, outlet, and publication date. Keep one record for a unique story, but retain a separate field for estimated syndication count if it matters.
- Check missing values. Do not convert an unknown reach value to zero. Mark it as missing so it is not mistaken for no reach.
- Review automated sentiment and message labels against the original coverage. Keep a correction field rather than overwriting the platform's value.
import csv
import io
raw = """url,brand,sentiment
https://example.com/a,Acme,positive
https://example.com/a,Acme,positive
https://example.com/b,Acme,negative
https://example.com/c,Acme,neutral
https://example.com/d,Acme,positive
"""
seen = set()
unique_rows = []
for row in csv.DictReader(io.StringIO(raw)):
if row["url"] in seen:
continue
seen.add(row["url"])
unique_rows.append(row)
positive = sum(1 for row in unique_rows if row["sentiment"] == "positive")
negative = sum(1 for row in unique_rows if row["sentiment"] == "negative")
net_sentiment = (positive - negative) / len(unique_rows)
print(f"{len(unique_rows)} unique articles, net sentiment {net_sentiment:+.0%}")This example uses the URL as a duplicate key. In a real export, URLs may be missing or different for syndicated copies. Use a documented composite key, such as normalized headline plus outlet and date, and manually inspect uncertain matches.
Calculate defensible metrics
After cleaning, calculate volume and share of voice from the same population. Share of voice is a brand's mentions divided by all included competitor mentions.
Reach and impressions are estimates supplied by the platform or a third party. They are useful for comparison when the same method is used consistently, but they should not be presented as confirmed readership. Sentiment is also a classification, not a fact. Report the sample size and manual review method with the result.
Check the result
Before publishing a report, compare the cleaned totals with the platform dashboard. Investigate large differences. Common causes include different date zones, channel filters, duplicate rules, deleted articles, and searches that changed after the export.
Exercise
An export contains 100 rows, but 12 rows repeat an existing URL and 8 rows are syndicated copies of stories already represented. How many unique stories remain if all 20 rows are duplicates?
Show answer
80 unique stories remain. Confirm that the syndicated rows truly represent the same stories before removing them.