Reading path: Coastal water observation →

Find the provider's definition

A quality flag is a label attached to a measurement or record to communicate information about its review status or suitability. The same letter or number can mean different things across providers, instruments, and datasets. A flag marked “2” might represent a particular quality category in one file and something else elsewhere, so never infer its meaning from the symbol alone.

Read the accompanying data dictionary, metadata, or methods note. Check whether the flag applies to a single measurement, a whole time interval, or a derived product. Also determine whether the values have already been screened or corrected. If definitions are missing, treat the flag as unresolved context and seek the provider's documentation before using it as a filter.

Keep values and flags together

Retain the original measurement and its flag in your working copy. Removing flagged rows immediately discards information about what was observed and why it may be questionable. A separate analysis column can mark records included in a particular calculation, while the source value remains unchanged. This makes it possible to revise a decision when more documentation becomes available.

Suppose a temperature series includes a single point flagged for review. Preserve the value, flag, timestamp, and any note. Plot it with a distinct symbol or inspect the surrounding readings. If the purpose is a seasonal overview, you might report a result with and without that point, explaining the choice. The example is a workflow, not a universal rule that all flagged values must be excluded.

Make exclusions reproducible

If you exclude records, state the exact flag definition and rule used. “Removed bad data” is too vague to repeat. A clearer note identifies which provider flag was excluded, whether the rule applied to all values or only a specific variable, and the date range affected. Keep a count or list of affected records in the analysis notes when feasible.

Flags can indicate that a value needs scrutiny rather than proving it is wrong. A spike may be real, and an apparently ordinary point may still carry a concern such as a known instrument issue. Use field logs, neighboring sensors, maintenance history, and the measurement context to assess the case. Do not replace missing values with zero or silently interpolate across them.

Use flags as part of interpretation

A well-documented flag helps communicate uncertainty, but it cannot substitute for understanding the measurement system. When comparing stations, check that their flag schemes are compatible; identical codes may not share definitions. When plotting a time series, show missing and excluded values distinctly where practical, so a visual gap is not mistaken for a period of stable conditions.

The most useful record preserves both the observation and the reasoning applied to it. State what the flag means according to its source, what you did with the record, and why that choice fits the question. That leaves future readers able to inspect the evidence rather than inherit an unexplained cleanup decision.