How to Audit Missing Fields & Null Values in Vehicle Data
This guide is part of our broader How to Verify Automotive Dataset Coverage, Quality & Provenance section, where we cover the checks that help determine whether automotive data is complete and usable for the intended application. CarDatabases provides downloadable structured automotive datasets for businesses, developers, analysts, and other teams that need vehicle data they can integrate into their own systems. Here, the focus is on how to audit missing fields and null values by separating legitimate non-applicable values from coverage gaps, inconsistent population, schema issues, and other data-quality risks.
Identify every way the dataset says "no value"
Missing information rarely arrives as one clean marker. A single dataset can mix true database nulls, empty strings, text placeholders, and numeric codes, and each can mean something different. Before you count anything, inventory what is actually in the fields.
| State | Typical appearance | What it may mean | Audit trap |
|---|---|---|---|
| Database null | NULL in SQL, null in JSON, NaN after loading into pandas | Unknown, not collected, or not meaningful; the null itself does not say which | Comparisons with null evaluate to unknown, so filters can drop these rows silently |
| Omitted field | Key absent from a JSON record or API response | Provider suppresses empty values, field not supported for that record type or API version, or a serialization defect | Absent keys never show up in per-column null counts unless you check field presence separately |
| Empty or whitespace string | "" or " " | A blank from a form, export, or source system; sometimes the source's own "no data" marker | Counts as populated in COUNT(column) and in most "is not null" checks |
| Placeholder text | "N/A", "Unknown", "Not Applicable", "TBD", "-" | Anything from "does not apply" to "we do not know" | Treated as valid text; spellings often vary within one field |
| Numeric sentinel | -1, 0, 999, 9999 | A coded "not available" or "not applicable" | Skews averages, minimums, and range filters unless excluded |
| Real zero | 0 | A measured or defined value | Becomes indistinguishable from a sentinel once nulls are coerced to 0 |
| Default value | A fuel type, door count, or drive type filled in by a loader or form | Nothing was supplied; a system filled the gap | Looks complete and plausible; only lineage or suspicious uniformity exposes it |
Public vehicle data sources show why these distinctions matter. The NHTSA vPIC API returns empty values for variables it has no data on, and its response message states that a missing value means NHTSA does not have data on that variable, not that the feature or technology is unavailable on the vehicle. Some vPIC variables that do not fit the vehicle type, such as trailer or bus attributes on a passenger car, come back with the text "Not Applicable" instead. EPA's fuel economy data, documented in the FuelEconomy.gov web services field descriptions, uses -1 to mean "not available" for its fuel economy and greenhouse gas scores, and its stop-start field holds Y, N, or blank for older vehicles. A blank stop-start value on an older model therefore does not mean "no stop-start." It means the attribute was not recorded.
Null versus zero
Oracle's SQL documentation on nulls advises against using null to represent zero, because the two are not equivalent. In vehicle data, conflating them changes facts. Zero cylinders on a battery-electric vehicle can be a deliberate value in one schema, while a null in the same field could mean the engine record was never matched. If a pipeline coerces nulls to zero, those two records become identical, and averages, filters, and displays treat a missing value as a measured one.
Null versus empty string or placeholder
Database systems do not agree here. Oracle currently treats a zero-length character value as null and recommends not relying on that behavior, while other systems keep empty strings distinct from null. Loading tools add their own conversions: by default, pandas read_csv reads empty fields and strings such as "N/A," "NA," "NULL," and "None" as missing. That is convenient until a legitimate code collides with the list, or until a source's "Not Applicable" and "Unknown" both collapse into the same NaN. Profile raw text values before parsing, and control the conversion explicitly (in pandas, with na_values and keep_default_na).
Missing field versus field present with a null
In JSON these are separate conditions. In JSON Schema, the required keyword means a property must be present in the object; whether its value may be null is a separate type constraint. An audit that only counts nulls in a flattened table can miss records where the key never arrived. Count field presence and null values separately, especially when records come from different API versions or record types.
The practical step: for each field, produce a frequency table of raw values that could signal absence (nulls, absent keys, zero-length strings, whitespace-only strings, case variants of "n/a," "unknown," and "none," and suspicious numbers such as -1, 0, and 9999). Map each one to an explicit value state: populated with a usable value, missing or unknown, present but unusable, or unclassified. Track whether the field applies to the vehicle separately, and keep the raw value beside the mapped state so the mapping can be reviewed and reversed.
Define where each field applies before you count anything
Not every field should be populated for every vehicle. A null rate that ignores applicability penalizes a dataset for correctly leaving pickup-bed length empty on sedans, and it can bury real gaps in fields that apply to only a small slice of records.
| Applicability basis | Example fields | What determines applicability |
|---|---|---|
| Universal identity | VIN (in VIN-level datasets), model year, make, model | Should exist for every record in scope |
| Vehicle type and body | Bed length, cab type, GVWR, interior passenger and luggage volume | Body class or vehicle type. EPA does not require interior volume dimensions for two-seater cars or for trucks, including vans, pickups, minivans, and SUVs. |
| Powertrain and fuel | Secondary fuel type, electric range, charge time, battery capacity, cylinders, displacement | Fuel type and electrification level. EPA's secondary fuel field is used only for dual-fuel vehicles, and its charging fields apply to electric vehicles and plug-in hybrids. |
| Model year or era | Stop-start, newer driver-assistance features, test-based emissions values | When the attribute was introduced or first collected. EPA bases tailpipe CO2 on its own tests from model year 2013 forward; vPIC decoding is intended for model year 1981 and later. |
| Market | Regulatory ratings, market-specific trims and equipment | The jurisdiction and market in which the configuration was sold |
| Configuration and options | Optional equipment, package contents, alternate charger specifications | Trim, package, or option code |
Write these rules down as data rather than leaving them as team knowledge: for each conditional field, a condition on the fields that determine it, such as "for a plug-in vehicle comparison, battery capacity applies when the vehicle is battery-electric or plug-in hybrid." Then classify every record as applicable, not applicable, or applicability unknown.
The third bucket matters. If the fields needed to establish electrification are missing, you may not know whether battery capacity should be required. Those records should not be counted as defects in the battery field, and they should not be excluded as non-applicable either. They are evidence of a gap in the determining field. Treat source-supplied "Not Applicable" labels the same way: check them against your rules, because a "Not Applicable" on a field your rules say applies is an anomaly worth investigating.
Measure completeness against the applicable population
Applicable completeness for a field is the number of records with a valid populated value divided by the number of records where the field applies. Report the ratio together with the counts behind it, because the ratio alone hides the denominator. Count at a defined record level, such as one VIN or one vehicle configuration; a one-to-many join can duplicate rows and distort the denominator. For each field, report:
- Populated with a usable value.
- Missing but applicable: null, empty, placeholder, or sentinel where a value should exist.
- Not applicable, by source label or by your rules.
- Applicability unknown, because a determining field is missing.
- Present but unusable: a non-placeholder value in the wrong type, unit, or format. This is a validity problem rather than an absent-value problem, but it still leaves no usable value; count it separately from missing values.
Schema status adds a separate check. An optional field that is empty may be perfectly acceptable. In JSON Schema, a required property must be present, but a present null is allowed when the property's type permits it. Missing required properties and disallowed nulls violate the schema, regardless of the completeness rate.
A simplified illustration shows why the denominator matters. Take 10,000 vehicle configurations, 800 of which are battery-electric or plug-in hybrid. Battery capacity is empty on 9,320 records, a raw null rate of 93% that looks catastrophic. Against the applicable population, 680 of 800 are populated: 85% complete, with 120 real gaps. Now take a model field with only 50 nulls, or 0.5%. If all 50 sit in one make your application serves, the "nearly complete" field fails your use case outright. Neither raw rate tells you what you need to know.
Watch how your tools count
In SQL, COUNT(*) counts rows, while COUNT(column) counts only rows where that column is not null, as described in the PostgreSQL aggregate function documentation. A column full of empty strings or "N/A" will therefore look fully populated. Count against your normalized states instead of raw nulls. With one audited row per vehicle configuration and normalized state columns in place, the core measurement is short:
SELECT COUNT() FILTER (WHERE battery_applicability = 'applicable') AS applicable, COUNT() FILTER (WHERE battery_applicability = 'applicable' AND battery_value_state = 'populated') AS populated, COUNT(*) FILTER (WHERE battery_applicability = 'unknown') AS applicability_unknown FROM vehicle_audit;
Completeness is not coverage, and it is not accuracy
A field can be 99% complete across the records you have while the dataset lacks the model years, markets, or Year Make Model (YMM) combinations you need. That is a coverage question, answered by comparing the dataset's record population with your target population, and a null audit does not answer it. Completeness also says nothing about correctness: a populated horsepower value can still be wrong, and checking that requires a separate accuracy review.
Look for patterns, not just totals
Missing values in vehicle data are rarely scattered at random. They tend to follow sources, manufacturers, model years, and pipeline events. Segment each field's missing-but-applicable count by make, model, model year, market, body class, powertrain, source or provider, load date, and schema version, then read the pattern.
| Pattern | Possible explanations | How to confirm |
|---|---|---|
| One make or manufacturer group empty across all years | The source never received the attribute for that manufacturer, or a mapping is broken for that source | Check raw source records for that make. For VIN-decoded data, vPIC content comes from manufacturer submittals, so its depth varies by manufacturer. |
| Empty before a given model year, populated after | The attribute was introduced or first collected later, or the source changed | Check the field definition and source documentation for a start year, as with EPA's stop-start field |
| Empty for records loaded after a given date | An ingestion or transformation change | Compare load logs, schema versions, and the same records in the previous load |
| Empty for one powertrain or body class | Usually non-applicability, sometimes a missing rule | Check the applicability rule; if the field should apply, it is a real population gap |
| A whole field family empty together (all engine fields, all dimensions) | A failed join or a missing relationship key | Look for null or orphaned foreign keys linking to the engine or specification table |
| Newest model year sparse | Source data not yet published or not yet loaded | Recheck after the source's next release before classifying it as a permanent gap |
| Scattered nulls in an otherwise full field | Isolated record defects | Inspect the individual records and their source rows |
Separate missing source data from failed transformation
Trace a sample of missing values backward through each pipeline stage: target table, staging, raw extract, source. If the raw source had a value and the target does not, the pipeline lost it. Common culprits are type casts that turn a valid number formatted as "1,500" into null, join keys that stop matching after normalization, and fields renamed between schema versions. If the raw source is also empty, the gap belongs to the source, and fixing the pipeline will not fill it. Row counts per stage and per segment help locate where records or values drop out.
Rank gaps by what they break
No universal null-rate threshold makes a dataset acceptable. The useful test is what each missing value does to your application, which sorts fields into rough tiers.
| Field group | Examples | Consequence of a missing value |
|---|---|---|
| Identity and relationship keys | VIN, vehicle or configuration ID, model year, foreign keys to engine, trim, or specification tables | Records cannot be matched, joined, or deduplicated, and one null can orphan every attribute linked to that record. Even very low rates may be unacceptable. |
| Applicability-determining fields | Fuel type, electrification level, body class, vehicle type, drive type | Other fields' applicability becomes unknown, and filters, fitment, or eligibility logic misfire |
| Units and qualifiers | Unit of measure, measurement basis, test procedure | A number without its unit cannot be interpreted or converted; a displacement of 2.0 and one of 2000 are both plausible |
| Core fields your application uses | Trim, engine description, horsepower, range | Display gaps, weaker search and comparison, incomplete analytics |
| Peripheral fields | Attributes your application never reads | Little operational effect; document them rather than chase them |
Missing values also change query and code behavior without announcing it. Under SQL null semantics, a comparison involving null evaluates to unknown, so a filter such as fuel_type <> 'Electric' returns neither the electric vehicles nor the rows where fuel type is null. Arithmetic with a null operand returns null, and aggregates such as AVG skip nulls, so an average over a field that is missing mostly in one segment really describes the other segments. Sentinels do the opposite damage: an unexcluded -1 drags an average down and passes a "value is present" check.
Start from the list of fields your application actually reads and what it does with each. That list, not the dataset's overall null rate, defines what "complete enough" means.
CarDatabases provides downloadable structured automotive datasets that customers can integrate into their own systems. Where sample data is available, buyers can test null conventions, field types, and load behavior before purchase, while full-dataset fill rates still need coverage statistics or a broader audit.
Verify suspect gaps against authoritative sources
For a sample of missing-but-applicable values, especially in high-tier fields, check whether the value should exist and whether a competent source has it.
- VIN-encoded attributes. Under 49 CFR 565.15, the VIN must make certain attributes decipherable by vehicle type: for passenger cars, make, line, series, body type, engine type, and restraint devices and their locations; for trucks, additions such as cab type, brake system, and gross vehicle weight rating. NHTSA's vPIC decodes VINs from manufacturer submittals, and its FAQ notes that it has no data for manufacturers that did not register through the Part 565 process. Attributes outside the required elements depend on how much a manufacturer filed, so an empty vPIC value for horsepower, for example, is not evidence that the attribute is absent.
- Fuel economy, range, and charging. EPA's FuelEconomy.gov data and its published field definitions.
- Configuration and equipment. Manufacturer documentation such as specification sheets, order guides, and window stickers for the specific model year and market.
Each gap then gets a classification that determines what happens next.
| Classification | Evidence | Action |
|---|---|---|
| Not applicable | A rule or authoritative source shows the attribute does not exist for this configuration | Record it as not applicable and remove it from the denominator |
| Unavailable at source | The source itself lacks the value, such as an empty vPIC variable | Keep it as unknown; seek another competent source if the field matters |
| Provider coverage gap | An authoritative source has the value, but your dataset does not | Raise it with the data provider and track it by segment |
| Transformation or ingestion defect | Raw or staging data has the value, but the target does not | Fix the pipeline, reload, and add a regression check |
| Isolated record defect | Scattered occurrences with no segment pattern; the value exists in the source | Correct the individual records from the source |
| Unresolved | No competent source confirms whether the value exists or what it is | Keep it explicitly unknown |
Do not fill gaps from neighboring records, similar trims, or what a model usually has. Configurations that share a name can differ in engine, battery, or equipment by model year and market, and an inferred value stored as fact is much harder to detect later than an honest null. If an application needs a fallback for display, label it as a fallback and keep it out of the factual record.
Null audit checklist
- List the fields your application reads and what each one drives: matching, filtering, analytics, display, or business logic.
- Collect the data dictionary or schema, documented null conventions, required and optional status, and schema version history. Note where the documentation is silent.
- Inventory the raw no-value tokens in each field: nulls, absent keys, empty and whitespace strings, placeholders, and numeric sentinels.
- Map each token to a value state (populated, missing or unknown, present but unusable, or unclassified), keep applicability separate, and preserve the raw value.
- Write applicability rules for every conditional field and classify each record as applicable, not applicable, or applicability unknown.
- Compute applicable completeness per field with its counts, and flag absent required properties and nulls that the schema does not allow.
- Segment missing-but-applicable values by make, model, model year, market, configuration, source, load date, and schema version.
- Check field families for values that go missing together, and test relationship keys for nulls and orphans.
- Trace a sample of gaps back through the pipeline to separate source gaps from transformation defects.
- Verify a sample against authoritative sources and classify every gap.
- Decide fitness for use field by field, document unresolved gaps, and rerun the audit on each new load or schema change.