Update business cycle data to latest available (#364)#770
Open
jstac wants to merge 3 commits into
Open
Conversation
FRED series had hardcoded end dates of 2022-12-31, capping the unemployment, NBER recession, consumer sentiment/CPI and industrial output series. Switch these to datetime.now() so the lecture always pulls the most recent data, matching the auto-updating World Bank series. Also pin the most recent year as an explicit x-axis tick in plot_series and plot_comparison, so the extended GDP series read as intentional rather than trailing off past the last labelled tick. Update prose that referenced fixed end years (2022) to "the present". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for taupe-gaufre-c4e660 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Address narrative-drift risk from dynamic data dates: - Define the data cutoff once (end_date) with a documented one-line switch to pin it for reproducible builds, instead of repeating datetime.now() across four FRED cells. - Rename the 1942 historical cutoff to hist_end_date so it no longer clobbers the shared end_date in the unemployment cell. - Reword the post-pandemic labour-market sentence to be anchored to the 2020 shock rather than to the moving right edge of the chart. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The added final-year tick crowded the existing 2020 ("Covid-19") tick
and looked worse than the gap it was meant to address. Revert to
matplotlib's default x-axis ticks in plot_series and plot_comparison.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
@mmcky Would you mind checking why the Colab build is failing? (PS Colab rather than Collab) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #364.
What
The World Bank series in
business_cycle.mdalready auto-fetch the most recent year. The FRED pulls, however, hadend_date = datetime.datetime(2022, 12, 31)hardcoded in four places, capping the unemployment, NBER-recession, consumer-sentiment/CPI, and industrial-output series at 2022.end_datevariable with a documented one-line switch to pin it for reproducible builds (instead of repeatingdatetime.now()across cells).hist_end_dateso it no longer clobbers the sharedend_date.end_date_graphto track the dynamic end date instead of a hardcoded 2023.Narrative check
I re-read the prose against what the extended data shows:
Note
An earlier revision pinned the final year as an explicit x-axis tick, but it crowded the existing 2020 ("Covid-19") tick, so it was reverted — the charts use matplotlib's default ticks.
🤖 Generated with Claude Code