@meterapp/vehicle-db 2.13.1 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,11 +4,11 @@
4
4
  ![license](https://img.shields.io/npm/l/@meterapp/vehicle-db)
5
5
  [![playground](https://img.shields.io/badge/playground-carimage.dev-black)](https://carimage.dev/playground?ref=catalog)
6
6
 
7
- An offline, international vehicle make/model catalog for Node.js and TypeScript. The package combines U.S. model-year data, the UK registered fleet, the European Union's new car and van registration register, the daily-updated Dutch vehicle register, Asian-origin vehicles registered in New Zealand, Malaysian registration transactions, an Indian manufacturer catalog, the Brazil-exclusive Hyundai HB20 family, recent U.S. model configurations from FuelEconomy.gov, and reviewed manufacturer body derivatives and Saudi model-year evidence into one small, zero-dependency API. It never makes runtime network requests.
7
+ An offline, international vehicle make/model catalog for Node.js and TypeScript. The package combines U.S. model-year data, the UK registered fleet, the European Union's new car and van registration register, the daily-updated Dutch vehicle register, Asian-origin vehicles registered in New Zealand, Malaysian registration transactions, Brazil's national vehicle register, an Indian manufacturer catalog, the Brazil-exclusive Hyundai HB20 family, recent U.S. model configurations from FuelEconomy.gov, and reviewed manufacturer body derivatives and Saudi model-year evidence into one small, zero-dependency API. It never makes runtime network requests.
8
8
 
9
- The current snapshot spans **1990–2027** and includes **1,595 makes** and **41,838 models** in **194,288 model years**, from **11 data sources**. Those are distinct vehicles by name, with case, accents and punctuation ignored, which is how the [Car Image API](https://carimage.dev/cars?ref=catalog) counts and lists them. The package's own records number more (1,607 makes from `getMakes()`), because sources spell some makes and models more than one way (`MOTO GUZZI` and `MOTO-GUZZI`) and a few makes have no model in these years; see [Snapshot stats](#snapshot-stats).
9
+ The current snapshot spans **1990–2027** and includes **1,601 makes** and **42,002 models** in **196,364 model years**, from **13 data sources**. Those are distinct vehicles by name, with case, accents and punctuation normalized while preserving the distinct 03+ badge, which is how the [Car Image API](https://carimage.dev/cars?ref=catalog) counts and lists them. The package's own records number more (1,613 makes from `getMakes()`), because sources spell some makes and models more than one way (`MOTO GUZZI` and `MOTO-GUZZI`) and a few makes have no model in these years; see [Snapshot stats](#snapshot-stats).
10
10
 
11
- The catalog covers seven vehicle types: **Motorcycle**, **Passenger Car**, **Truck**, **Bus**, **Multipurpose Passenger Vehicle (MPV)**, **Auto Rickshaw**, and **Other Vehicle**. The European source adds continental models from Dacia, Cupra, DS, Lynk & Co, Alpine, and the Chinese brands entering Europe such as BYD, MG, Omoda, Xpeng, and Nio, as sold in the EU rather than the UK or U.S. The Dutch register keeps that coverage current: vehicles first registered this year appear within days, so 2026 models such as the BYD Atto 2 and Renault 5 E-Tech are already listed. The Asia-Pacific sources add Japanese domestic and kei models, Chinese EVs, Indian and Korean vehicles, Southeast Asian makes such as Perodua and Proton, and additional motorcycles and commercial vehicles.
11
+ The catalog covers seven vehicle types: **Motorcycle**, **Passenger Car**, **Truck**, **Bus**, **Multipurpose Passenger Vehicle (MPV)**, **Auto Rickshaw**, and **Other Vehicle**. The European source adds continental models from Dacia, Cupra, DS, Lynk & Co, Alpine, and the Chinese brands entering Europe such as BYD, MG, Omoda, Xpeng, and Nio, as sold in the EU rather than the UK or U.S. The Dutch register keeps that coverage current: vehicles first registered this year appear within days, so 2026 models such as the BYD Atto 2 and Renault 5 E-Tech are already listed. The Asia-Pacific sources add Japanese domestic and kei models, Chinese EVs, Indian and Korean vehicles, Southeast Asian makes such as Perodua and Proton, and additional motorcycles and commercial vehicles. The Brazilian register adds the cars and motorcycles that fill Brazil's roads but are rarely sold elsewhere, such as the Fiat Argo, Mobi and Toro, the Volkswagen Gol and Saveiro, the Renault Kwid, and the Honda Biz and Pop.
12
12
 
13
13
  ## Demo and playground
14
14
 
@@ -103,6 +103,16 @@ const bydNlModels = getModels({
103
103
  sourceId: "rdw-nl-vehicle-register",
104
104
  });
105
105
 
106
+ // Models in Brazil's national vehicle register, e.g. Fiat Argo, Mobi, and Toro.
107
+ const fiatBr = getMakes({ year: 2024, sourceId: "senatran-br-renavam" }).find(
108
+ (make) => make.makeName === "FIAT",
109
+ );
110
+ const fiatBrModels = getModels({
111
+ makeId: fiatBr!.makeId,
112
+ year: 2024,
113
+ sourceId: "senatran-br-renavam",
114
+ });
115
+
106
116
  // Existing queries remain valid.
107
117
  const toyota = getMakes({ year: 2024 }).find((make) => make.makeName === "TOYOTA");
108
118
  const toyotaModels = getModels({ makeId: toyota!.makeId, year: 2024 });
@@ -282,10 +292,12 @@ Model results contain `years` and a year-specific `variants` array. Make results
282
292
  | [Malaysia JPJ registration transactions](https://data.gov.my/data-catalogue/registration_transactions_car) | 6,678 passenger car, MPV, jeep, pickup, and window-van model/registration-year records; 2015–2026 | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |
283
293
  | [EEA CO2 monitoring of new passenger cars and vans](https://www.eea.europa.eu/en/datahub/datahubitem-view/fa8b1229-3db6-495d-b18e-9c9b3267c02b) | 29,939 passenger car (M1) and van (N1) model/registration-year records from 235 makes reported by EU member states, Iceland, and Norway; 2010–2025 | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |
284
294
  | [Netherlands RDW vehicle register](https://opendata.rdw.nl/Voertuigen/Open-Data-RDW-Gekentekende_voertuigen/m9d7-ebf2) | 73,299 passenger car, commercial vehicle, bus, and motorcycle model/first-admission-year records from 627 makes licensed in the Netherlands; 1990–2026 | [Public domain (RDW Open Data)](https://opendata.rdw.nl/) |
295
+ | [Brazil SENATRAN national vehicle register (RENAVAM)](https://dados.transportes.gov.br/dataset/registro-nacional-de-veiculos-automotores-renavam) | 5,533 car, pickup, van, SUV, minibus, and motorcycle model/manufacture-year records from 45 makes, mapped from Brazil's registered fleet; 1990–2026 | [Public domain (dados.transportes.gov.br)](https://dados.transportes.gov.br/dataset/registro-nacional-de-veiculos-automotores-renavam) |
285
296
  | [Hyundai Motor Brasil line-up](https://www.hyundai.com.br/) | The Brazil-exclusive HB20 family (HB20 hatchback, HB20S sedan, HB20X crossover), 40 model-year records; Brazilian model years 2013–2027 | Source attribution; factual product names only |
286
297
  | [FuelEconomy.gov](https://www.fueleconomy.gov/) (U.S. DOE/EPA) | U.S. models the fuel-economy catalog lists as distinct models but vPIC does not list under any model year: the 2026 Maserati GT2 Stradale and MCPURA Spyder, 2 model-year records | U.S. government public data |
298
+ | [Reviewed dated manufacturer market catalogs](https://lynkco.com.vn/en) | Individually documented marketed years in Vietnam and India; includes regional MPVs, Lynk & Co models, Indian passenger cars and TVS King EV Max | Source attribution; factual product names only |
287
299
 
288
- Year means the source’s model year for NHTSA, year of manufacture for DfT/DVLA (falling back to year of first use when manufacture year is unavailable), catalog year for Atul Auto, vehicle year for NZTA, registration year for Malaysia JPJ, the reporting (registration) year for the EEA register, the year of first admission (first registration anywhere, so imported used vehicles keep their original year) for the Dutch RDW register, the Brazilian model year (ano/modelo) for the Hyundai Motor Brasil line-up, and the U.S. model year for FuelEconomy.gov. From 2007 onward, NZTA vehicle year means the year of first registration in New Zealand or overseas. Registration sources are evidence that a make/model was present in that market and do not guarantee a factory model-year designation. Source filters let applications choose the semantics appropriate for their workflow.
300
+ Year means the source’s model year for NHTSA, year of manufacture for DfT/DVLA (falling back to year of first use when manufacture year is unavailable), catalog year for Atul Auto, vehicle year for NZTA, registration year for Malaysia JPJ, the reporting (registration) year for the EEA register, the year of first admission (first registration anywhere, so imported used vehicles keep their original year) for the Dutch RDW register, the year of manufacture on the registration certificate (ano de fabricação) for the Brazilian SENATRAN register, the Brazilian model year (ano/modelo) for the Hyundai Motor Brasil line-up, and the U.S. model year for FuelEconomy.gov. From 2007 onward, NZTA vehicle year means the year of first registration in New Zealand or overseas. Registration sources are evidence that a make/model was present in that market and do not guarantee a factory model-year designation. Source filters let applications choose the semantics appropriate for their workflow.
289
301
 
290
302
  UK source attribution: Contains public sector information licensed under the Open Government Licence v3.0. Source: Department for Transport and Driver and Vehicle Licensing Agency.
291
303
 
@@ -293,10 +305,12 @@ NZTA and Malaysia source attribution: Licensed under Creative Commons Attributio
293
305
 
294
306
  EEA source attribution: Licensed under Creative Commons Attribution 4.0 International. Source: European Environment Agency, *Monitoring of CO2 emissions from passenger cars* and *Monitoring of CO2 emissions from vans*, Regulation (EU) 2019/631. Member states report the make and commercial name inconsistently (multi-brand strings, legal entities, and trim-level names), so the importer merges brand spellings, drops engine and gearbox suffixes, keeps a make/model/year only when at least two countries report it or one country reports it more than 1,000 times, and uses the most reported spelling of each model name. The latest year is provisional data. EU vehicle categories map to the catalog as M1/M1G → Passenger Car and N1/N1G/N2 → Truck.
295
307
 
296
- Hyundai Motor Brasil attribution: HB20, HB20S and HB20X are factual product names from Hyundai Motor Brasil's published line-up; launch (September 2012, January and April 2013) and discontinuation (HB20X, January 2022) dates come from Hyundai's announcements. No registration source in this catalog covers Brazil.
308
+ Hyundai Motor Brasil attribution: HB20, HB20S and HB20X are factual product names from Hyundai Motor Brasil's published line-up; launch (September 2012, January and April 2013) and discontinuation (HB20X, January 2022) dates come from Hyundai's announcements.
297
309
 
298
310
  FuelEconomy.gov attribution: GT2 Stradale and MCPURA Spyder are factual 2026 model names from the U.S. Department of Energy and EPA fuel-economy catalog (vehicle records [50273](https://www.fueleconomy.gov/feg/noframes/50273.shtml) and [50274](https://www.fueleconomy.gov/feg/noframes/50274.shtml)), which lists them as distinct models while vPIC files neither name for any model year. The 2026 MCPura itself comes from vPIC. Contributed in [#20](https://github.com/MeterApp/vehicle-db/pull/20).
299
311
 
312
+ SENATRAN source attribution: Registro Nacional de Veículos Automotores (RENAVAM), Secretaria Nacional de Trânsito (SENATRAN), Ministério dos Transportes, published as public domain open data. The monthly fleet file counts the vehicles registered in each municipality by make/model and year of manufacture. RENAVAM records make and model as one abbreviated, often trim-level string (`CHEV/ONIX 10MT LT2`, `I/TOYOTA HILUX CDSRXA4FD`) and no vehicle type, so the importer adds the counts up nationally and maps the strings to model families and vehicle types with the reviewed table in `scripts/senatran-br-models.ts`, which covers about 91% of the vehicles manufactured since 1990. Unmapped strings are dropped rather than guessed, including heavy trucks, bus bodies, and trailers; the importer logs the largest unmapped families so the table can grow. A make/model/year needs at least ten registered vehicles.
313
+
300
314
  RDW source attribution: Open Data RDW (Dienst Wegverkeer), public domain. The register only contains vehicles currently licensed in the Netherlands, is republished daily, and is the freshest European source in the catalog. The same brand and model-name normalization as the EEA source is applied, plus a minimum of three vehicles per make/model/year to drop typos; RDW vehicle kinds map as Personenauto → Passenger Car, Bedrijfsauto → Truck, Bus → Bus, and Motorfiets → Motorcycle.
301
315
 
302
316
  New sources in 2.13.0:
@@ -304,6 +318,12 @@ New sources in 2.13.0:
304
318
  - [FuelEconomy.gov bulk feed](https://www.fueleconomy.gov/feg/ws/): 2022–2027 model-year configurations; U.S. government public data. The legacy Maserati source remains independently addressable. Configuration suffixes are preserved, with a reviewed separator-only normalization for Mercedes-Benz AMG G63.
305
319
  - Reviewed manufacturer evidence: eight model-year records for Saudi Kia Pegas and U.S. BMW body derivatives / Lamborghini STO. Factual names only, with per-record URLs and market/year rationale in `data/evidence/manufacturer-reviewed.json`. GSO/SASO bulk data is not bundled; access/permission dependencies are documented in the source investigation.
306
320
 
321
+ ## Dated manufacturer catalogs
322
+
323
+ The reviewed manufacturer sources now include focused US, Indian and Vietnamese additions. `manufacturer-reviewed` carries explicit model-year evidence; `manufacturer-reviewed-catalog` uses **catalog years**: a model was marketed during a specific year documented by a dated sales offer, sales bulletin or manufacturer catalog. These calendar years are not model years or years of manufacture. `getDataSources().yearBasis` identifies these reviewed sources; the per-row market and rationale remain in `data/evidence/manufacturer-reviewed.json`.
324
+
325
+ For scoped resolution of a dated catalog record, pass `yearBasis: "catalog-year"` and its evidenced market. Catalog presence does not establish a generation, facelift, derivative or render; requesting visual depth remains unresolved without reviewed appearance evidence. Lynk & Co 03 and 03+ stay distinct, as do Defender OCTA, Range Rover Sport SV and Cayenne Electric from their base models. The regional additions cover only individually evidenced years; 07, generic Song and unverified editions remain pending in [the source plan](docs/mail-coverage-source-plan.md).
326
+
307
327
  ## Factory colors
308
328
 
309
329
  Factory paint availability is not included. The NZTA and Malaysia records contain the observed basic color of each registered vehicle, not the manufacturer’s stock colors for a make/model/year. Treating those fields as factory availability would produce false positives from repaints, imports, and broad color categories, so the importers intentionally omit them. A future color API should require manufacturer-backed paint options with explicit market and model-year provenance.
@@ -313,15 +333,15 @@ Factory paint availability is not included. The NZTA and Malaysia records contai
313
333
  | | |
314
334
  |---|---:|
315
335
  | Years | 1990–2027 |
316
- | Sources | 11 |
336
+ | Sources | 13 |
317
337
  | Vehicle types | 7 |
318
- | Makes | 1,595 |
319
- | Models | 41,838 |
320
- | Model years | 194,288 |
321
- | Make records (`getMakes()`) | 1,607 |
322
- | Model records (distinct `modelId`) | 46,120 |
323
- | Model-year records (`getModels()`) | 215,446 |
324
- | Bundled TypeScript data | 7.46 MB |
338
+ | Makes | 1,601 |
339
+ | Models | 42,002 |
340
+ | Model years | 196,364 |
341
+ | Make records (`getMakes()`) | 1,613 |
342
+ | Model records (distinct `modelId`) | 46,435 |
343
+ | Model-year records (`getModels()`) | 217,858 |
344
+ | Bundled TypeScript data | 7.55 MB |
325
345
 
326
346
  ## Refreshing and rebuilding
327
347
 
@@ -343,6 +363,7 @@ npm run refresh:nzta-asia-pacific -- --start-year 1990 --end-year 2027
343
363
  npm run refresh:malaysia-jpj -- --start-year 2015 --end-year 2026
344
364
  npm run refresh:eea-co2 -- --start-year 2010 --end-year 2026
345
365
  npm run refresh:rdw-nl -- --start-year 1990 --end-year 2026
366
+ npm run refresh:senatran-br
346
367
  npm run refresh:fueleconomy-us -- --start-year 2022 --end-year 2027
347
368
  npm run refresh:reviewed
348
369
  npm run build:data
@@ -350,7 +371,7 @@ npm run build:data
350
371
 
351
372
  **A refresh only adds.** Registers drop scrapped vehicles, count thresholds move between releases, and manufacturers re-file model years in vPIC (the 2026 Maserati MC20 became the MCPura in September 2026), but an application may already store a year/make/model this package published. Every importer therefore keeps the entries its previous snapshot published and the source no longer reports, and logs how many it kept; pass `--prune` to drop them deliberately, for example to remove a source error. Model-year sources run a year ahead of the calendar, so the NHTSA and NZTA importers default to ending next year; registration sources end with the current year.
352
373
 
353
- The NHTSA API rate-limits aggressively: past a few requests a second its CDN answers HTTP 403 to every request from the address for an hour or more. The importer spaces requests (`--concurrency 2`, `--interval-ms 500` by default), stops at the first sustained 403 instead of retrying into the block, and with `--cache-dir` keeps every answer it already received, so rerunning the same command later resumes where it stopped. A full NHTSA refresh can take hours; to refresh recent model years, fetch only those years and merge them into the existing snapshot with `--merge`, as above. The UK importer downloads the two official VEH0124 CSV files. The NZTA importer discovers the current official ArcGIS service and requests distinct records for supported vehicle types and Asian countries of origin. The Malaysia importer downloads annual JPJ CSVs and aggregates individual transactions into unique model/registration-year records. The EEA importer discovers the current final and provisional register tables from the EEA DiscoData catalogue and asks its public SQL endpoint for make/commercial-name counts grouped by reporting country and year, so it never downloads the individual registration records; `--min-countries` and `--min-count` tune the noise filter. The RDW importer asks the Socrata API for make/commercial-name counts per year of first admission, one request per year, so a refresh takes about ten minutes and can be run any day to pick up the latest registrations. Importers assign deterministic numeric IDs, write normalized snapshots, and discard temporary raw downloads.
374
+ The NHTSA API rate-limits aggressively: past a few requests a second its CDN answers HTTP 403 to every request from the address for an hour or more. The importer spaces requests (`--concurrency 2`, `--interval-ms 500` by default), stops at the first sustained 403 instead of retrying into the block, and with `--cache-dir` keeps every answer it already received, so rerunning the same command later resumes where it stopped. A full NHTSA refresh can take hours; to refresh recent model years, fetch only those years and merge them into the existing snapshot with `--merge`, as above. The UK importer downloads the two official VEH0124 CSV files. The NZTA importer discovers the current official ArcGIS service and requests distinct records for supported vehicle types and Asian countries of origin. The Malaysia importer downloads annual JPJ CSVs and aggregates individual transactions into unique model/registration-year records. The EEA importer discovers the current final and provisional register tables from the EEA DiscoData catalogue and asks its public SQL endpoint for make/commercial-name counts grouped by reporting country and year, so it never downloads the individual registration records; `--min-countries` and `--min-count` tune the noise filter. The RDW importer asks the Socrata API for make/commercial-name counts per year of first admission, one request per year, so a refresh takes about ten minutes and can be run any day to pick up the latest registrations. The SENATRAN importer finds the newest monthly fleet archive (about 140 MB) on the Ministry of Transport's open data portal, resumes the download whenever the server drops the connection, and reads the archive without extracting it; `--input` rebuilds from an archive or extracted file already on disk. Importers assign deterministic numeric IDs, write normalized snapshots, and discard temporary raw downloads.
354
375
 
355
376
  ## Evidence and regression checks
356
377
 
package/dist/data.d.ts CHANGED
@@ -8,6 +8,7 @@ interface CompactData {
8
8
  region: string;
9
9
  description: string;
10
10
  retrieved_at: string;
11
+ year_basis?: "model-year" | "catalog-year";
11
12
  vehicle_type_ids: number[];
12
13
  year_from: number;
13
14
  year_to: number;