From 831935cb3f52b67f3d8574551a01772be5a56779 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 28 Aug 2025 04:08:03 +0000 Subject: [PATCH 1/4] Initial plan From bc2d429f3939719eaa6b3333daf42952bcaf03bc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 28 Aug 2025 04:19:10 +0000 Subject: [PATCH 2/4] Fix broken Thomas Sargent link and update redirect URLs Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com> --- lectures/_config.yml | 1 - lectures/about_py.md | 4 ++-- lectures/numpy.md | 2 +- lectures/pandas.md | 8 ++++---- lectures/scipy.md | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lectures/_config.yml b/lectures/_config.yml index fccfa67a..900abc65 100644 --- a/lectures/_config.yml +++ b/lectures/_config.yml @@ -33,7 +33,6 @@ sphinx: html_theme_options: authors: - name: Thomas J. Sargent - url: https://www.tomsargent.com/ - name: John Stachurski url: https://johnstachurski.net/ dark_logo: quantecon-logo-transparent.png diff --git a/lectures/about_py.md b/lectures/about_py.md index fdd22c7f..96e8f1a1 100644 --- a/lectures/about_py.md +++ b/lectures/about_py.md @@ -311,7 +311,7 @@ But when we want to work with larger arrays in real programs we need more effici For this we need to use libraries for working with arrays. For Python, the most important matrix and array processing library is -[NumPy](https://www.numpy.org/) library. +[NumPy](https://numpy.org/) library. For example, let's build a NumPy array with 100 elements @@ -365,7 +365,7 @@ This lecture series will provide you with extensive background in NumPy. ### SciPy -The [SciPy](https://www.scipy.org) library is built on top of NumPy and provides additional functionality. +The [SciPy](https://scipy.org/) library is built on top of NumPy and provides additional functionality. (tuple_unpacking_example)= For example, let's calculate $\int_{-2}^2 \phi(z) dz$ where $\phi$ is the standard normal density. diff --git a/lectures/numpy.md b/lectures/numpy.md index 62defc8c..d707ead5 100644 --- a/lectures/numpy.md +++ b/lectures/numpy.md @@ -1165,7 +1165,7 @@ np.linalg.inv(A) # Compute the inverse ```{index} single: Python; SciPy ``` -Much of this functionality is also available in [SciPy](https://www.scipy.org/), a collection of modules that are built on top of NumPy. +Much of this functionality is also available in [SciPy](https://scipy.org/), a collection of modules that are built on top of NumPy. We'll cover the SciPy versions in more detail {doc}`soon `. diff --git a/lectures/pandas.md b/lectures/pandas.md index 46bebb31..218b058a 100644 --- a/lectures/pandas.md +++ b/lectures/pandas.md @@ -47,7 +47,7 @@ Here's a popularity comparison over time against Matlab and STATA courtesy of St :scale: 100 ``` -Just as [NumPy](https://www.numpy.org/) provides the basic array data type plus core array operations, pandas +Just as [NumPy](https://numpy.org/) provides the basic array data type plus core array operations, pandas 1. defines fundamental structures for working with data and 1. endows them with methods that facilitate operations such as @@ -499,9 +499,9 @@ plt.show() Python makes it straightforward to query online databases programmatically. -An important database for economists is [FRED](https://research.stlouisfed.org/fred2/) --- a vast collection of time series data maintained by the St. Louis Fed. +An important database for economists is [FRED](https://fred.stlouisfed.org/) --- a vast collection of time series data maintained by the St. Louis Fed. -For example, suppose that we are interested in the [unemployment rate](https://research.stlouisfed.org/fred2/series/UNRATE). +For example, suppose that we are interested in the [unemployment rate](https://fred.stlouisfed.org/series/UNRATE). (To download the data as a csv, click on the top right `Download` and select the `CSV (data)` option). @@ -536,7 +536,7 @@ In the second case, you can either * switch to another machine * solve your proxy problem by reading [the documentation](https://requests.readthedocs.io/en/latest/) -Assuming that all is working, you can now proceed to use the `source` object returned by the call `requests.get('https://research.stlouisfed.org/fred2/series/UNRATE/downloaddata/UNRATE.csv')` +Assuming that all is working, you can now proceed to use the `source` object returned by the call `requests.get('https://fred.stlouisfed.org/series/UNRATE/downloaddata/UNRATE.csv')` ```{code-cell} ipython3 url = 'https://fred.stlouisfed.org/graph/fredgraph.csv?bgcolor=%23e1e9f0&chart_type=line&drp=0&fo=open%20sans&graph_bgcolor=%23ffffff&height=450&mode=fred&recession_bars=on&txtcolor=%23444444&ts=12&tts=12&width=1318&nt=0&thu=0&trc=0&show_legend=yes&show_axis_titles=yes&show_tooltip=yes&id=UNRATE&scale=left&cosd=1948-01-01&coed=2024-06-01&line_color=%234572a7&link_values=false&line_style=solid&mark_type=none&mw=3&lw=2&ost=-99999&oet=99999&mma=0&fml=a&fq=Monthly&fam=avg&fgst=lin&fgsnd=2020-02-01&line_index=1&transformation=lin&vintage_date=2024-07-29&revision_date=2024-07-29&nd=1948-01-01' diff --git a/lectures/scipy.md b/lectures/scipy.md index f5eb01ae..8e91c82e 100644 --- a/lectures/scipy.md +++ b/lectures/scipy.md @@ -25,7 +25,7 @@ kernelspec: ## Overview -[SciPy](https://www.scipy.org) builds on top of NumPy to provide common tools for scientific programming such as +[SciPy](https://scipy.org/) builds on top of NumPy to provide common tools for scientific programming such as * [linear algebra](https://docs.scipy.org/doc/scipy/reference/linalg.html) * [numerical integration](https://docs.scipy.org/doc/scipy/reference/integrate.html) From 89484d893b8ed4045045de3ffc925228884cb650 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 28 Aug 2025 05:27:26 +0000 Subject: [PATCH 3/4] Update Thomas Sargent URL to use http:// instead of removing it Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com> --- lectures/_config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/lectures/_config.yml b/lectures/_config.yml index 900abc65..e4a8a23d 100644 --- a/lectures/_config.yml +++ b/lectures/_config.yml @@ -33,6 +33,7 @@ sphinx: html_theme_options: authors: - name: Thomas J. Sargent + url: http://www.tomsargent.com/ - name: John Stachurski url: https://johnstachurski.net/ dark_logo: quantecon-logo-transparent.png From 27f24317d4e23705426c14e53cc87afda50b9ece Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 28 Aug 2025 05:34:31 +0000 Subject: [PATCH 4/4] Revert FRED URL in requests.get() call to fix broken Python code execution Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com> --- lectures/pandas.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/pandas.md b/lectures/pandas.md index 218b058a..3d2c809d 100644 --- a/lectures/pandas.md +++ b/lectures/pandas.md @@ -536,7 +536,7 @@ In the second case, you can either * switch to another machine * solve your proxy problem by reading [the documentation](https://requests.readthedocs.io/en/latest/) -Assuming that all is working, you can now proceed to use the `source` object returned by the call `requests.get('https://fred.stlouisfed.org/series/UNRATE/downloaddata/UNRATE.csv')` +Assuming that all is working, you can now proceed to use the `source` object returned by the call `requests.get('https://research.stlouisfed.org/fred2/series/UNRATE/downloaddata/UNRATE.csv')` ```{code-cell} ipython3 url = 'https://fred.stlouisfed.org/graph/fredgraph.csv?bgcolor=%23e1e9f0&chart_type=line&drp=0&fo=open%20sans&graph_bgcolor=%23ffffff&height=450&mode=fred&recession_bars=on&txtcolor=%23444444&ts=12&tts=12&width=1318&nt=0&thu=0&trc=0&show_legend=yes&show_axis_titles=yes&show_tooltip=yes&id=UNRATE&scale=left&cosd=1948-01-01&coed=2024-06-01&line_color=%234572a7&link_values=false&line_style=solid&mark_type=none&mw=3&lw=2&ost=-99999&oet=99999&mma=0&fml=a&fq=Monthly&fam=avg&fgst=lin&fgsnd=2020-02-01&line_index=1&transformation=lin&vintage_date=2024-07-29&revision_date=2024-07-29&nd=1948-01-01'