Urban Life

Show Only ...
Maps - Photos - Videos

Model Year of Registered Motor Vehicles in New York, December 2025

There are fewer and fewer motor vehicles from 2011 and earlier left on the roads at this point..

It's good one for one's brain to practice window functions in SQL, lest I get rusty at such things. And yes, the first thing I did with all big data I get is put into a parquet and query it with duckdb. This turns the 12.5 million records into a much smaller table and calculates the percents using a SQL window function:

SELECT County, "Model Year", count(*) as Count,
             count(*)/sum(count(*)) OVER (PARTITION BY County) AS Percent
             FROM '~/Downloads/vehregdec25.parquet'
             WHERE "Record Type"='VEH' AND County != 'OUT-OF-STATE'
             GROUP BY County, "Model Year";

And here is the R script to making the graph in ggplot: Model Year of Registered Vehicles.R

Model Year of Registered Motor Vehicles in New York, December 2025 [Expires December 1 2026]