Skip to content

Latest commit

 

History

History
106 lines (83 loc) · 7.48 KB

data-notes.md

File metadata and controls

106 lines (83 loc) · 7.48 KB

Data notes for analysis

Caveats and gotchas to keep in mind when analyzing Project Sidewalk data — historical conditions in specific releases that affect how certain columns should be interpreted. If you're working with a database dump or the public data API, check whether any of these apply to the time range you're analyzing.

This is an append-only log: when a release changes data semantics or fixes a data bug with lasting analytical impact, add a dated, version-tagged entry here (newest first) so future analysts aren't caught out.

Data caveats by release

Visit-only anonymous accounts were deleted (#5612)

Until v11.8.0, opening any page made an anonymous account. The roughly 5.3 million that never did anything and never opened a tool (Explore, Validate, …) were deleted. Their AnonAutoSignUp rows are gone from webpage_activity and their other rows there have no user_id, so counts of anonymous accounts and sign-ups for earlier periods are far lower than older reports show.

webpage_activity.user_id can be empty (#4643)

A page opened with no session (a crawler, or a first visit before opening Explore) is logged with no user_id. Every older row on the shared anonymous account was moved to no user too, DC's visit-only page views included. For a rough visitor count, count distinct ip_address.

ip_address columns became inet (#5398)

Every ip_address column is now Postgres inet instead of text. What changes for analysis:

  • The same address written two ways (01.02.03.04 vs 1.2.3.4) now counts once, so COUNT(DISTINCT ip_address) can be a little lower than before.
  • ip_address::text gives 1.2.3.4/32. Use host(ip_address) for just the address.
  • Rows whose IP wasn't a real IP were deleted: about 380 webpage_activity rows from bots faking the header (all before v11.8.0), and 43 DC audit_task_environment rows from 2016–17 holding '' or 'unknown'.

Washington, DC re-launch (#4700) — the 2015–2021 pilot data migrated into a normal city schema

DC's original deployment (2015-10-17 → 2021-04-08) ran on a mid-2018 fork of the schema and was frozen. It has been migrated by replaying the evolutions it missed with a curated patch overlay (db/dc-migration/), so it now lives in sidewalk_dc like any city and the hardcoded legacy-DC constants that the aggregate stats used to add on top are gone. Analysts should know:

  • Missions are reconstructed. DC's app had per-region cumulative-distance milestones, not modern missions. Its mission rows were rebuilt from the MissionComplete interaction events, the legacy mission_user rows (timed by replaying distance where no event exists) and, for work before Sept 2016 when nothing logged completions, a replay of the milestone ladders. Work after a user's last milestone in a region is one completed mission. Turker pay per mission is what the legacy app paid for that milestone.
  • The shared anonymous account was split into one anonymous user per IP address that audited; visit-only page views stay on the shared account.
  • Streets keep the 2015 network and belong to one neighborhood each (largest-overlap pick; DC never split streets at boundaries). The original 192-neighborhood set was dropped in favor of the 179 shown since 2016.
  • Label positions were converted after the migration, not by it. The 179.sql coordinate fix never applied on DC (all pano dimensions were NULL). The dimensions were recovered from the scraped store and Google, and the conversion and position recompute ran as tools/one-off/5667-dc-label-positions.sql (#5667); its backup table old_label_point_coords_2 holds the pre-conversion values. Labels on panos nobody can size any more keep the legacy coordinates (negative pano_y), a few hundred whose pano has no recorded position still have no lat/lng, and the ~14,800 tutorial labels were left alone on purpose. 37 labels with an empty pano id were deleted, as 298.sql did elsewhere.
  • Labels placed before 2017-02-15 were clicked on a flat renderer. Until Google retired Maps API 3.25, the client showed the non-perspective html4 Street View and recorded coordinates with a matching linear formula (#429, #518), so projecting their heading/pitch/canvas records with today's perspective formula drew markers up to ~5° off. tools/one-off/5920-dc-linear-projection.sql (#5920) re-aimed those ~61k records at the click and rewrote their pano_x/pano_y; its backup table old_label_point_linear holds the previous values and, per label, how far off the old record rendered. Human votes made while the marker was 30 px or more off are archived in voided_label_validation; the AI's votes and assessments on every label whose pixels moved were deleted for the nightly job to redo, and the crops cut around the old pixels were re-cut. The 13 labels between that cut and the v2.1 deploy (2017-03-21) were left alone. The flat renderer did not level the horizon the way the perspective viewer does, so these labels still sit vertically about half a camera tilt (0.58 of pano_data.camera_pitch, measured against later labels on the same panos) away from where a modern click lands; any rig-tilt correction (#4784) has to treat them as their own population.
  • Naive timestamps (label.time_created, survey submissions) were US/Eastern before 2018-08-25 and UTC after.
  • The public aggregate stats now count DC live: users 823 registered + the split anonymous accounts rather than the old fixed 1,395; distance 2,089 km of network rather than the 5,482 km "explored" (which counted repeat audits).

v7.8.5 — audit_task.task_start corrected

Before v7.8.5, the task_start column in audit_task was incorrectly set to the session start time rather than that individual task's start time. It's correct going forward. Existing rows were back-filled to a close approximation using the timestamp of the TaskStart event in audit_task_interaction — but only ~90% of audit_task rows have a corresponding TaskStart event, so the remaining ~10% are still approximate. The same fix was applied to the DC database (which is no longer collecting new data).

v7.5.0 (May 2022) — gallery interaction tables gained user_id

Before v7.5.0, the gallery_task_interaction and gallery_task_environment tables had no user_id column, so rows from before then can't be tied to a specific user. Added in #2895.

Separately, a small number of labels have a temporary_label_id that doesn't match any such ID in the audit_task_interaction logs — most do match. Background in #2154 (comment).

v2 — anonymous users and audit_task.completed

Up to the v2 release, records for anonymous users weren't marked as complete, so the completed column of audit_task is unreliable for anonymous contributions from that era. Discussion in #403.

Gallery screenshot tips

The expanded card's own "hide label" toggle (#2477) takes the marker off the imagery, and stays off as you page. To nudge the marker instead, it is a positioned element over the pano canvas, so devtools can move it:

const marker = document.querySelector('.gallery-expanded-view .label-detail__marker');
marker.style.left = `${parseFloat(marker.style.left) + 10}px`; // The viewer re-places it on the next pan or zoom.