Dataproofer
Dataproofer copied to clipboard
Test: check if a sequential "year" column skips years
Please read how to create a new test if you're interested in writing this test.
If a column is named year
, or some variation, and contains an ordered series of years, check to see if it skips a year or more.
In the future we want to let users specify the length of gap in time they want to check against (i.e. show me if there's a gap longer than five years). For now we can test for gaps in immediately sequential years (i.e. 1999, 2000, 2001), and highlight the cells preceding and following the gap.
Methodology considerations:
- Should sort the column first in case the column is unordered
- Should parse the string as a numeric and check to make sure the column is more than 90% numeric. See stats-suite/medianAbsoluteDeviationOutliers.js for a working example