@meterapp/vehicle-db 2.4.0 → 2.5.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 +37 -9
- package/dist/data.js +1 -1
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @meterapp/vehicle-db
|
|
2
2
|
|
|
3
|
-
An offline, international vehicle make/model catalog for Node.js and TypeScript. The package combines U.S. model-year data, the UK registered fleet, and
|
|
3
|
+
An offline, international vehicle make/model catalog for Node.js and TypeScript. The package combines U.S. model-year data, the UK registered fleet, Asian-origin vehicles registered in New Zealand, Malaysian registration transactions, and an Indian manufacturer catalog into one small, zero-dependency API. It never makes runtime network requests.
|
|
4
4
|
|
|
5
|
-
The catalog covers seven vehicle types: **Motorcycle**, **Passenger Car**, **Truck**, **Bus**, **Multipurpose Passenger Vehicle (MPV)**, **Auto Rickshaw**, and **Other Vehicle**. The
|
|
5
|
+
The catalog covers seven vehicle types: **Motorcycle**, **Passenger Car**, **Truck**, **Bus**, **Multipurpose Passenger Vehicle (MPV)**, **Auto Rickshaw**, and **Other Vehicle**. 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.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -54,6 +54,24 @@ const buses = getModels({
|
|
|
54
54
|
vehicleTypeId: 5,
|
|
55
55
|
});
|
|
56
56
|
|
|
57
|
+
// Japanese domestic and kei models from the Asian-origin NZTA slice.
|
|
58
|
+
const nztaAsiaMakes = getMakes({
|
|
59
|
+
year: 2022,
|
|
60
|
+
sourceId: "nzta-asia-pacific-mvr",
|
|
61
|
+
});
|
|
62
|
+
const hondaAsia = nztaAsiaMakes.find((make) => make.makeName === "HONDA");
|
|
63
|
+
const hondaAsiaModels = getModels({
|
|
64
|
+
makeId: hondaAsia!.makeId,
|
|
65
|
+
year: 2022,
|
|
66
|
+
sourceId: "nzta-asia-pacific-mvr",
|
|
67
|
+
}); // Includes N-BOX.
|
|
68
|
+
|
|
69
|
+
// Southeast Asian market models such as Perodua Myvi and Proton S70.
|
|
70
|
+
const malaysiaMakes = getMakes({
|
|
71
|
+
year: 2026,
|
|
72
|
+
sourceId: "malaysia-jpj-registrations",
|
|
73
|
+
});
|
|
74
|
+
|
|
57
75
|
// Existing queries remain valid.
|
|
58
76
|
const toyota = getMakes({ year: 2024 }).find((make) => make.makeName === "TOYOTA");
|
|
59
77
|
const toyotaModels = getModels({ makeId: toyota!.makeId, year: 2024 });
|
|
@@ -146,22 +164,30 @@ Returns all years present in the combined catalog, sorted ascending.
|
|
|
146
164
|
| [NHTSA vPIC](https://vpic.nhtsa.dot.gov/api/) | U.S. passenger cars, trucks, and MPVs; model years 1990–2026 | U.S. government public data |
|
|
147
165
|
| [UK DfT/DVLA vehicle licensing statistics](https://www.gov.uk/government/statistical-data-sets/vehicle-licensing-statistics-data-files) | 701 normalized makes across cars, motorcycles, goods vehicles, buses and coaches, and other vehicles; manufacture years 1990–2025 | [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/) |
|
|
148
166
|
| [Atul Auto product catalog](https://atulauto.co.in/products/) | Current Indian passenger and cargo auto-rickshaw range; catalog years 2024–2026 | Source attribution; factual product names only |
|
|
167
|
+
| [NZTA Motor Vehicle Register](https://www.nzta.govt.nz/resources/new-zealand-motor-vehicle-register-statistics/new-zealand-vehicle-fleet-open-data-sets) | 30,374 Asian-origin car, truck, bus, motorcycle, and moped model-year records from 12 countries of origin; vehicle years 1990–2026 | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |
|
|
168
|
+
| [Malaysia JPJ registration transactions](https://data.gov.my/data-catalogue/registration_transactions_car) | 1,756 passenger car, MPV, jeep, pickup, and window-van model/registration-year records; 2024–2026 | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |
|
|
149
169
|
|
|
150
|
-
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),
|
|
170
|
+
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, and registration year for Malaysia JPJ. 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.
|
|
151
171
|
|
|
152
172
|
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.
|
|
153
173
|
|
|
174
|
+
NZTA and Malaysia source attribution: Licensed under Creative Commons Attribution 4.0 International. Sources: New Zealand Transport Agency Waka Kotahi and Malaysia Road Transport Department/data.gov.my.
|
|
175
|
+
|
|
176
|
+
## Factory colors
|
|
177
|
+
|
|
178
|
+
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.
|
|
179
|
+
|
|
154
180
|
## Snapshot stats
|
|
155
181
|
|
|
156
182
|
| | |
|
|
157
183
|
|---|---:|
|
|
158
184
|
| Years | 1990–2026 |
|
|
159
|
-
| Sources |
|
|
185
|
+
| Sources | 5 |
|
|
160
186
|
| Vehicle types | 7 |
|
|
161
|
-
| Makes | 1,
|
|
162
|
-
| Model names |
|
|
163
|
-
| Deduplicated model-year entries |
|
|
164
|
-
| Bundled TypeScript data |
|
|
187
|
+
| Makes | 1,145 |
|
|
188
|
+
| Model names | 14,841 |
|
|
189
|
+
| Deduplicated model-year entries | 132,491 |
|
|
190
|
+
| Bundled TypeScript data | 4.21 MB |
|
|
165
191
|
|
|
166
192
|
## Refreshing and rebuilding
|
|
167
193
|
|
|
@@ -179,10 +205,12 @@ Refresh either network source independently, then rebuild the combined catalog:
|
|
|
179
205
|
```bash
|
|
180
206
|
npm run refresh:uk-dft
|
|
181
207
|
npm run refresh:nhtsa -- --start-year 1990 --end-year 2026
|
|
208
|
+
npm run refresh:nzta-asia-pacific -- --start-year 1990 --end-year 2026
|
|
209
|
+
npm run refresh:malaysia-jpj -- --start-year 2024 --end-year 2026
|
|
182
210
|
npm run build:data
|
|
183
211
|
```
|
|
184
212
|
|
|
185
|
-
The NHTSA API rate-limits aggressively, so a full NHTSA refresh can take time. The UK importer downloads the two official VEH0124 CSV files
|
|
213
|
+
The NHTSA API rate-limits aggressively, so a full NHTSA refresh can take time. 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. Importers assign deterministic numeric IDs, write normalized snapshots, and discard temporary raw downloads.
|
|
186
214
|
|
|
187
215
|
## License
|
|
188
216
|
|