Viewing a saved revision (read-only)
ovl5NCybmkI6XM2YHlsuv
Interactive reference-based scatter plot adapted from the Interactive Scatter Plot reference, plus a detailed README documenting the Drive History dataset.
Drive History Scatter Plot
An interactive scatter plot of the Drive History - Master dataset, adapted from the reference "Interactive Scatter Plot" implementation. Points represent individual trips. X and Y axis encodings, plus the point color encoding, are selectable from the actual dataset fields.
Files
index.html— page shell and import map (React + D3 from a CDN).index.jsx— mounts<App />.App.jsx— loads the dataset, wires up encoding menus, legend, and plot.viz.js— D3 render entry point for the scatter plot, axes, points, and Voronoi hover overlay.schema.js— column metadata (labels, types, accessors) for the dataset.parseData.js— robust CSV parser for the multi-line, quoted header file.useScatterData.js— hook that loads the CSV and parses it.useContainerDimensions.js— responsive sizing viaResizeObserver.ColorLegend.jsx,Tooltip.jsx— legend and hover tooltip UI.styles.css— page styles.
Dataset Overview
- Filename:
Drive History - Master - Drive History - Master.csv - Location:
/data/Drive History - Master - Drive History - Master.csv - Delimiter:
,between data fields. The header text is spread across multiple physical lines and contains|characters inside quoted names, so this implementation parses data rows by physical position rather than by header text. - Row count (as observed in preview): 222 data rows.
- Column count: 17.
Subject matter. A personal log of car trips ("drives") around Vancouver using two car-sharing / rental services (Evo and Enterprise). Each row records a single trip, including the date, which vehicle was used, how far the trip was, how many people were in the car, the trip's stated purpose, destination, and whether the trip was related to going home.
Column Descriptions
Types use Tamara Munzner's framework: Nominal, Ordinal, Quantitative, Temporal, Geographic coordinates, Geographic identifiers.
- Trip_Id — Sequential identifier assigned to each trip. Type: Quantitative (ID-like). Notes: no missing values observed.
- Month — Month name of the trip (e.g., "November"). Type: Nominal. Notes: redundant with Month_Number / Full Date.
- Year — Calendar year of the trip (e.g., 2022). Type: Temporal (year granularity). Notes: stored as integer.
- Month_Number — Numeric month 1–12. Type: Ordinal / Quantitative. Notes: redundant with Month.
- Date — Day of month (1–31). Type: Quantitative. Notes: redundant with Full Date.
- Full Date — ISO-formatted date string (e.g.,
2022-11-18). Type: Temporal. Notes: primary temporal field. - Evo/Enterprise (The 2 car rentals I use in Vancouver) — Which service the vehicle belongs to. Type: Nominal. Notes: values observed are Evo and Enterprise.
- Total Distance Travelled in km (color coded by distance) — Length of the trip in kilometres. Type: Quantitative. Notes: header contains a parenthetical note that the original spreadsheet color-coded the cell by distance; that note is not a data value.
- Vehicle Make — Manufacturer of the vehicle (e.g., Toyota). Type: Nominal.
- Vehicle Model — Model of the vehicle (e.g., Prius, Prius C). Type: Nominal.
- vehicle_id — Identifier of the specific vehicle. Type: Quantitative. Notes: ID-like, not an ordered measurement.
- Destination — Named place the trip ended at. Type: Geographic identifier (place name). Notes: not coordinates.
- Mainland Vancouver (Within/Outside) [Color] — Whether the trip was
within or outside Mainland Vancouver.
Type: Nominal. Notes: values observed are
I(within) andO(outside). - Purpose of the trip (W-work/L-leisure/M-meeting) — Purpose of the trip using single-letter codes. Type: Nominal. Notes: W = work, L = leisure, M = meeting.
- No. of people in the car — Count of people in the vehicle. Type: Quantitative.
- Home (To/From/Both/Neither) — Relationship of the trip to home.
Type: Nominal. Notes: values observed are
T(to),F(from),B(both),N(neither). - Notes — Free-text notes on the trip. Type: Nominal (free text). Notes: frequently empty.
Missing / unusual values: empty strings and NA are treated as missing.
Rows where the X or Y accessor returns a non-finite value are excluded from
the plot at render time. Values shown in the README above are based on the
observed preview schema and may differ slightly from the full file.
Visualization Mappings
- X axis (default):
Total Distance Travelled (km)— a genuine quantitative field with a useful spread for horizontal comparison. - Y axis (default):
No. of People in Car— a quantitative count with a small number of discrete values (mostly 1–4), producing readable horizontal bands of points. - Color (default):
Purpose of Trip— a meaningful nominal field (W/L/M) suitable for categorical color encoding.
Axis and color encodings are selectable through the menus at the top of the page. Numeric fields available for the axes are Trip ID, Year, Month Number, Day of Month, Vehicle ID, Distance, and No. of People. Categorical fields available for color are Purpose, Evo/Enterprise, Vehicle Make, Vehicle Model, Mainland Vancouver, Home, and Destination.
Inspiration
Inspired by:
References
Getting started
Open index.html in the preview; the dataset loads automatically from
/data/Drive History - Master - Drive History - Master.csv.