From 7b26427faafd8eec26bfa658b3325646d7e3e4ac Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Thu, 16 Jul 2026 09:10:18 +1000 Subject: [PATCH] Repoint ols data reads to this repo's own copies The three data reads in the lecture body (maketable1/2/4) still fetched from the retired QuantEcon/lecture-python repo, leaving this lecture dependent on a repo the series no longer maintains. Identical copies are already committed under lectures/_static/lecture_specific/ols/ and are already what the solutions read, so the body now uses them too and the URL form matches the solutions exactly. Verified byte-identical before repointing: sha256 of each own-repo copy matches the legacy-repo file, so lecture output is unchanged. Confirmed the new URLs serve those same bytes and that pd.read_stata() parses all three (163 rows each, expected columns present). Part of QuantEcon/meta#337 See QuantEcon/meta#336 Co-Authored-By: Claude Fable 5 --- lectures/ols.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lectures/ols.md b/lectures/ols.md index bb4cc68af..7c60574bf 100644 --- a/lectures/ols.md +++ b/lectures/ols.md @@ -91,7 +91,7 @@ These variables and other data used in the paper are available for download on D We will use pandas' `.read_stata()` function to read in data contained in the `.dta` files to dataframes ```{code-cell} python3 -df1 = pd.read_stata('https://github.com/QuantEcon/lecture-python/blob/master/source/_static/lecture_specific/ols/maketable1.dta?raw=true') +df1 = pd.read_stata('https://github.com/QuantEcon/lecture-python.myst/raw/refs/heads/main/lectures/_static/lecture_specific/ols/maketable1.dta') df1.head() ``` @@ -323,7 +323,7 @@ Let's estimate some of the extended models considered in the paper (Table 2) using data from `maketable2.dta` ```{code-cell} python3 -df2 = pd.read_stata('https://github.com/QuantEcon/lecture-python/blob/master/source/_static/lecture_specific/ols/maketable2.dta?raw=true') +df2 = pd.read_stata('https://github.com/QuantEcon/lecture-python.myst/raw/refs/heads/main/lectures/_static/lecture_specific/ols/maketable2.dta') # Add constant term to dataset df2['const'] = 1 @@ -475,7 +475,7 @@ used for estimation) ```{code-cell} python3 # Import and select the data -df4 = pd.read_stata('https://github.com/QuantEcon/lecture-python/blob/master/source/_static/lecture_specific/ols/maketable4.dta?raw=true') +df4 = pd.read_stata('https://github.com/QuantEcon/lecture-python.myst/raw/refs/heads/main/lectures/_static/lecture_specific/ols/maketable4.dta') df4 = df4[df4['baseco'] == 1] # Add a constant variable