- Product version
- 0.5.0
- Docs revision
- r0
- State
- Current · released
- Deployment
- not-deployed
- Source
- v0.5.0 · e2d18656f5e4
Documented release is not yet live
Economic Data
Checking that Economic Data is current
v0.5.0e2d1865
This page answers one question for someone who already uses Economic Data: is what I am looking at current, and how would I know?
It matters because of the way a data service fails. When collection pauses, the tools keep answering. Every request still returns a well-formed response with a plausible payload; nothing errors, and the data is simply older than you think. So the rule is simple: a successful response proves the tool works, and only a freshness check proves the data is current.
How often the data changes
Each part of Economic Data refreshes on its own rhythm, and knowing it tells you how often a request can return something new.
In the calendar, a figure that has not printed yet is empty, never zero.
Check the data, not the tool
For a historical series
Use the quality check rather than judging the values by eye. Ask get_data_quality with
check_name="freshness". It compares the age of the last observation with the expected lag for
the series' frequency and grades the result:
The expected lag is 3 days for daily series, 10 for weekly, 40 for monthly, 105 for quarterly
and 400 for annual. A monthly series at ok can therefore be up to forty days old. That is the
publication rhythm of the indicator, not staleness; read the threshold for the frequency before
judging the number.
For a calendar-tier series you can also cross-check against the calendar: if the most recent release in the calendar carries an actual figure, the series should carry it too.
For calendar events
Ask for a window that ends now and look at the events whose scheduled time has passed. An event list that keeps growing while past events never gain an actual figure is the sign to look for: the schedule is being read, but results are not arriving. A well-populated list alone does not prove the calendar is current.
Make sure the request asks for current data
Before concluding that data is stale, check the request itself.
- The window. A window entirely in the past correctly returns past data.
- The name. An indicator or country the service does not carry returns an empty or narrow
result. Use
list_economic_history_catalogto confirm an indicator name before treating a thin result as staleness. - The case. Calendar country names are lowercase:
united states, notUnited States. A capitalised name returns nothing, silently. The Euro Area is filtered aseuropean union. - The filters. A narrow combination of filters can legitimately return nothing recent.
A worked check
1. request a window ending now, with the narrowest filter that answers the question2. if the response is empty: confirm the name through the catalog, then retry once still empty -> report "no data", not "stale"3. for a series, read the freshness check and the threshold for its frequency for the calendar, look at past events that still have no actual figure4. within your tolerance -> usable beyond your tolerance -> stale; note which series or events are frozen, and since whenChoosing a tolerance
There is no single correct tolerance, because it depends on the question. A check of what is expected before a release tolerates an older calendar than a check of what printed after it. A series used as background tolerates more age than the same series used to catch a new print, and the expected lag differs by frequency. An automated workflow that acts on a release should never rely on a successful call alone; it should check recency explicitly every time.
State the tolerance you used when you report a result. "The calendar is current" is not a finding; "the calendar is current to within five minutes" is.
What not to do
Do not treat a healthy health_check as proof of fresh data. It reports that the server and its
database are reachable, which is also what a paused collection looks like from outside.
Do not widen your tolerance to make an old result usable. If the data is too old for the decision, the right outcome is to say so.
Do not read a difference between the two history tiers as staleness. The official tier carries revisions and the calendar tier keeps the first release, so they can differ on the same period.