How to Spot Data Quality Issues in Badge Imports

How to Spot Data Quality Issues in Badge Imports

How to spot data quality issues in badge imports: run a short, repeatable checklist of file and record-level checks, normalising timestamps and identifiers, and apply local deduplication before combining exports.

How to spot data quality issues in badge imports?

Run a compact set of file and record-level checks that reveal the most common problems, then apply local fixes where possible and escalate when identifiers or coverage cannot be reliably recovered. The checklist below groups the checks into quick diagnostics, local fixes, deduplication rules and escalation criteria you can apply to any CSV or XLSX export.

What quick diagnostic checks should I run on incoming CSV or XLSX files?

Open the file, scan headers and a few rows, then run six quick checks that expose the usual problems: file shape, required fields, timestamp parsing, duplicate event patterns, reader coverage and event volumes by date. These checks take only a few minutes and let you decide whether a local clean is sufficient or you should ask for a new export.

Checks to run

  • File shape: Confirm a single sheet or a clearly named sheet, no merged header rows, and one header line. If the file has multiple header rows or notes, strip them before importing.

  • Required fields: Verify there is a person identifier (badge ID or employee number), a reader identifier (reader name or ID), and an event timestamp or date. If any are missing, the file is unsuitable for attendance analysis.

  • Timestamp consistency: Inspect several timestamp cells. Look for mixed formats (ISO, Excel serials, different timezones), blank time components, or dates that convert to years like 1900 when Excel mis-parses text. Try parsing one column in your spreadsheet app: if values change unexpectedly, there is a format problem.

  • Identifier formats: Check badge IDs for mixed types, such as numeric-only in some rows and alphanumeric in others, or leading zeros lost by the spreadsheet app. Preserve badge IDs as text when needed.

  • Duplicate patterns: Sort by person and timestamp for a sample date. Look for repeated swipes within seconds or identical reader+timestamp duplicates. Many systems log every door open, so two quick swipes at the same turnstile are likely duplicates.

  • Reader and site coverage: Create a distinct count of reader IDs and inspect whether readers map sensibly to sites or floors. A missing reader set, for example no lobby readers for one building, means undercounting arrivals for that site.

  • Volume by date: Plot a simple date count. Spikes, flatlines or gaps often reveal export problems: missing historical days, daylight-saving duplicates, or system downtime.

Local quick fixes

Convert badge IDs to text, standardise timestamps to a consistent timezone or local calendar dates, and remove obvious header/footer rows before importing. These edits preserve identifiers and make parsing deterministic.

How do I identify and correct duplicated swipes and repeated events?

Identify duplicates by person, date and site, then deduplicate using a sensible time window and clear business rules; keep the first valid event per defined visit and discard near-duplicate events. That approach reduces inflated arrival counts while preserving likely distinct visits.

How to decide the window

For arrival counts, a 5- to 15-minute window around a timestamp often collapses repeated swipes at the same reader into a single entry. Choose a narrower window if readers are close together or if your policies require finer separation. Avoid a window so wide it merges distinct visits.

Practical steps

  1. Group by person identifier and calendar date to avoid mixing visits across midnight. If your timestamps are local, reduce them to calendar dates before grouping.
  2. Sort by timestamp and mark events where the same person used the same reader within the chosen window. Flag those as duplicates.
  3. Keep rule: Retain the earliest event in the window for arrival-based attendance metrics, or retain the first and last events if you are approximating dwell time, with caution.

Common mistakes

Using too wide a window that merges distinct visits, or deduplicating across different readers without a mapping that they are co-located.

Illustrative example

A person swipes at 08:02 and 08:03 at the lobby reader, then at 08:20 at an internal door. With a 10-minute deduplication window applied by reader, you would keep 08:02 and 08:20, preserving a likely movement within the workplace.

How do I handle inconsistent timestamps and timezones?

Normalise timestamps to local calendar dates before aggregation and keep a record of the source timezone for each file or site; treat missing or ambiguous times as date-only events. Consistent date handling prevents weekday shifts and misleading summaries when combining multiple sites.

Why normalisation matters

Badge data often uses device local time, central server time or UTC. If two buildings report in different zones or with different daylight-saving behaviour, daily attendance patterns and weekday summaries will shift.

Practical approach

  • Identify timezone metadata: Look for a timezone column or ask the export owner. If none exists, infer from reader IDs or site metadata.
  • Convert to local time, then to calendar date: For attendance counts you rarely need the exact hour; reduce timestamps to local calendar dates and apply consistent rules for late-night entries, for example treat 23:50 as same-day entry.
  • Flag ambiguous rows: If a timestamp fails to parse, set it aside and request clarification rather than guessing.

When should I request cleaner exports from security or the access-control vendor?

Request vendor-produced exports when local fixes become complex, identifiers cannot be reliably mapped, reader coverage is incomplete, or you need cross-system identity mapping for deduplication across sites. Escalate early when the cost of guessing exceeds the cost of re-exporting.

Reasons to escalate

  • Missing badge IDs or scrambled identifiers that local conversion cannot fix.
  • System-level duplicates caused by server-side retries or sync problems producing thousands of identical rows.
  • No consistent reader-to-site mapping, making it impossible to count attendance per building.
  • Requirement to deduplicate across systems but no common identifier or mapping file is available.

What to request

Ask the vendor for an export with a single header row, standardized timestamps in ISO 8601, explicit timezone, stable person identifier as text, and a reader-to-site mapping file.

What common mistakes should I avoid when interpreting cleaned badge data?

Do not treat badge arrivals as complete occupancy, avoid over-interpreting small weekday differences, and do not ignore coverage gaps or privacy-related aggregation thresholds. Keep the limits of the data front of mind when turning counts into operational decisions.

Key cautions

  • Attendance vs occupancy: Badge data shows access events, it does not prove someone stayed all day or used a particular desk.
  • Small samples: Single-week patterns are noisy. Compare multiple weeks before operational changes.
  • Privacy thresholds: When grouping by department or small cohorts, ensure protected thresholds are respected before publishing counts.

Final practical note

Keep a short audit trail with the checks you ran and the rules you applied. That makes results reproducible and defensible when colleagues ask why two adjacent weeks show different attendance.

Useful next step: Run the six quick diagnostics on one recent export now, note any gaps, and apply a conservative deduplication window. That will usually resolve most misleading attendance spikes and give you a clearer weekday pattern to plan services against.

If you use a privacy-first tool to combine exports, it will often repeat these checks automatically and report on reader coverage, timestamp parsing success and deduplication rules; that visibility helps you decide whether to accept, correct or re-request source exports. BadgeIQ processes identifiable source records locally and creates protected aggregates, which can simplify pre-check and mapping steps without sending raw badge events offsite.

Fiona Fernandes

Fiona Fernandes

Workplace Insights Lead

Fiona is Workplace Insights Lead at BadgeIQ, where she writes about workplace attendance, hybrid working patterns, occupancy and the data behind better workplace decisions. Her focus is on making workplace analytics practical and understandable - helping teams distinguish what the data really shows from what it’s tempting to assume.