From 843f9d73acf2fcaeaf98f2468514d3414f1489c7 Mon Sep 17 00:00:00 2001 From: mmcky Date: Wed, 7 Sep 2022 11:04:53 +1000 Subject: [PATCH 1/5] ENH: Add link checker Action --- .github/workflows/linkcheck.yml | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/linkcheck.yml diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml new file mode 100644 index 000000000..d0247cfa2 --- /dev/null +++ b/.github/workflows/linkcheck.yml @@ -0,0 +1,44 @@ +name: Link Checker [Anaconda, Linux] +on: + pull_request: + types: [opened, reopened] + schedule: + # UTC 12:00 is early morning in Australia + - cron: '0 12 * * *' +jobs: + execution-tests-linux: + name: Execution Tests (${{ matrix.python-version }}, ${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest"] + python-version: ["3.9"] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Anaconda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + auto-activate-base: true + miniconda-version: 'latest' + python-version: 3.9 + environment-file: environment.yml + activate-environment: quantecon + - name: Download "build" folder (cache) + uses: dawidd6/action-download-artifact@v2 + with: + workflow: cache.yml + branch: main + name: build-cache + path: _build + - name: Link Checker + shell: bash -l {0} + run: jb build lectures --path-output=./ --builder=custom --custom-builder=linkcheck + - name: Upload Link Checker Reports + uses: actions/upload-artifact@v2 + if: failure() + with: + name: linkcheck-reports + path: _build/linkcheck \ No newline at end of file From 71dc478a43b021e15120c96d0135d5aa94034f31 Mon Sep 17 00:00:00 2001 From: mmcky Date: Wed, 7 Sep 2022 11:07:21 +1000 Subject: [PATCH 2/5] update task name --- .github/workflows/linkcheck.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index d0247cfa2..f4a13f090 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -6,8 +6,8 @@ on: # UTC 12:00 is early morning in Australia - cron: '0 12 * * *' jobs: - execution-tests-linux: - name: Execution Tests (${{ matrix.python-version }}, ${{ matrix.os }}) + link-check-linux: + name: Link Checking (${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false From b445c3069d475f6aa095ee04fc96ec65fd1899d1 Mon Sep 17 00:00:00 2001 From: Humphrey Yang Date: Sun, 11 Sep 2022 11:04:52 +1000 Subject: [PATCH 3/5] update broken links --- lectures/_static/quant-econ.bib | 1 - lectures/cass_koopmans_1.md | 2 +- lectures/lagrangian_lqdp.md | 3 ++- lectures/opt_transport.md | 2 +- lectures/rational_expectations.md | 2 +- lectures/svd_intro.md | 2 +- lectures/wald_friedman.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lectures/_static/quant-econ.bib b/lectures/_static/quant-econ.bib index af4e3ea32..25e9d5211 100644 --- a/lectures/_static/quant-econ.bib +++ b/lectures/_static/quant-econ.bib @@ -6,7 +6,6 @@ @article{Orcutt_Winokur_69, issn = {00129682, 14680262}, - url = {http://www.jstor.org/stable/1909199}, abstract = {Monte Carlo techniques are used to study the first order autoregressive time series model with unknown level, slope, and error variance. The effect of lagged variables on inference, estimation, and prediction is described, using results from the classical normal linear regression model as a standard. In particular, use of the t and x^2 distributions as approximate sampling distributions is verified for inference concerning the level and residual error variance. Bias in the least squares estimate of the slope is measured, and two bias corrections are evaluated. Least squares chained prediction is studied, and attempts to measure the success of prediction and to improve on the least squares technique are discussed.}, author = {Guy H. Orcutt and Herbert S. Winokur}, journal = {Econometrica}, diff --git a/lectures/cass_koopmans_1.md b/lectures/cass_koopmans_1.md index a00036a2d..c4b85cd03 100644 --- a/lectures/cass_koopmans_1.md +++ b/lectures/cass_koopmans_1.md @@ -30,7 +30,7 @@ This lecture and {doc}`Cass-Koopmans Competitive Equilibrium ` and David Cass {cite}`Cass` used to analyze optimal growth. The model can be viewed as an extension of the model of Robert Solow -described in [an earlier lecture](https://lectures.quantecon.org/py/python_oop.html) +described in [an earlier lecture](https://python-programming.quantecon.org/python_oop.html) but adapted to make the saving rate be a choice. (Solow assumed a constant saving rate determined outside the model.) diff --git a/lectures/lagrangian_lqdp.md b/lectures/lagrangian_lqdp.md index 1ce8eba87..248f0f2fa 100644 --- a/lectures/lagrangian_lqdp.md +++ b/lectures/lagrangian_lqdp.md @@ -670,7 +670,8 @@ lq.stationary_values() The preceding approach to imposing stability on a system of potentially unstable linear difference equations is not limited to linear quadratic dynamic optimization problems. -For example, the same method is used in our [Stability in Linear Rational Expectations Models](https://python.quantecon.org/re_with_feedback.html#Another-perspective) lecture. +For example, the same method is used in our [Stability in Linear Rational Expectations Models](https://python.quantecon.org/re_with_feedback.html#another-perspective) lecture. + Let's try to solve the model described in that lecture by applying the `stable_solution` function defined in this lecture above. diff --git a/lectures/opt_transport.md b/lectures/opt_transport.md index 54f0166f4..1f5ef742f 100644 --- a/lectures/opt_transport.md +++ b/lectures/opt_transport.md @@ -376,7 +376,7 @@ Here `'F'` stands for "Fortran", and we are using Fortran style column-major ord (For an alternative approach, using Python's default row-major ordering, see [this lecture by Alfred - Galichon](https://www.math-econ-code.org/mec-optim-b04).) + Galichon](https://www.math-econ-code.org/dynamic-programming).) **Interpreting the warning:** diff --git a/lectures/rational_expectations.md b/lectures/rational_expectations.md index a4acefa02..c479eaae1 100644 --- a/lectures/rational_expectations.md +++ b/lectures/rational_expectations.md @@ -73,7 +73,7 @@ plt.rcParams["figure.figsize"] = (11, 5) #set default figure size import numpy as np ``` -We'll also use the LQ class from QuantEcon.py. +We'll also use the LQ class from `QuantEcon.py`. ```{code-cell} ipython from quantecon import LQ diff --git a/lectures/svd_intro.md b/lectures/svd_intro.md index 687b0c040..c7d394fc2 100644 --- a/lectures/svd_intro.md +++ b/lectures/svd_intro.md @@ -668,7 +668,7 @@ This Dynamic mode decomposition was introduced by {cite}`schmid2010`, -You can read more about Dynamic Mode Decomposition here [[KBBWP16](https://python.quantecon.org/zreferences.html#id24)] and here [[BK19](https://python.quantecon.org/zreferences.html#id25)] (section 7.2). +You can read more about Dynamic Mode Decomposition here {cite}`DMD_book` and here [[BK19](https://python.quantecon.org/zreferences.html#id25)] (section 7.2). We want to fit a **first-order vector autoregression** diff --git a/lectures/wald_friedman.md b/lectures/wald_friedman.md index f99186d89..76cf5d307 100644 --- a/lectures/wald_friedman.md +++ b/lectures/wald_friedman.md @@ -759,7 +759,7 @@ This leads to him having a higher expected loss when he puts equal weight on bot ### A Notebook Implementation To facilitate comparative statics, we provide -a [Jupyter notebook](https://nbviewer.jupyter.org/github/QuantEcon/lecture-python-advanced.notebooks/blob/master/wald_friedman.ipynb) that +a [Jupyter notebook](https://nbviewer.org/github/QuantEcon/lecture-python.notebooks/blob/master/wald_friedman.ipynb) that generates the same plots, but with sliders. With these sliders, you can adjust parameters and immediately observe From 5db4c3d03eff1cd8aff1b105d95e90a066cddc7b Mon Sep 17 00:00:00 2001 From: Humphrey Yang Date: Tue, 13 Sep 2022 10:26:18 +1000 Subject: [PATCH 4/5] update links --- lectures/linear_algebra.md | 2 +- lectures/mle.md | 2 +- lectures/ols.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lectures/linear_algebra.md b/lectures/linear_algebra.md index 8619b2fca..524d7c608 100644 --- a/lectures/linear_algebra.md +++ b/lectures/linear_algebra.md @@ -838,7 +838,7 @@ $x$ that makes the distance $\| y - Ax\|$ as small as possible. To solve this problem, one can use either calculus or the theory of orthogonal projections. -The solution is known to be $\hat x = (A'A)^{-1}A'y$ --- see for example chapter 3 of [these notes](https://lectures.quantecon.org/_downloads/course_notes.pdf). +The solution is known to be $\hat x = (A'A)^{-1}A'y$ --- see for example chapter 3 of [these notes](https://python.quantecon.org/_static/lecture_specific/linear_algebra/course_notes.pdf). ### More Columns than Rows diff --git a/lectures/mle.md b/lectures/mle.md index 203b0ac31..fd2e4d89a 100644 --- a/lectures/mle.md +++ b/lectures/mle.md @@ -135,7 +135,7 @@ Let's have a look at the distribution of the data we'll be working with in this Treisman's main source of data is *Forbes'* annual rankings of billionaires and their estimated net worth. -The dataset `mle/fp.dta` can be downloaded from [here](https://lectures.quantecon.org/_downloads/mle/fp.dta) +The dataset `mle/fp.dta` can be downloaded from [here](https://python.quantecon.org/_static/lecture_specific/mle/fp.dta) or its [AER page](https://www.aeaweb.org/articles?id=10.1257/aer.p20161068). ```{code-cell} python3 diff --git a/lectures/ols.md b/lectures/ols.md index 70178c6c7..5439fa7ed 100644 --- a/lectures/ols.md +++ b/lectures/ols.md @@ -47,7 +47,7 @@ Along the way, we'll discuss a variety of topics, including As an example, we will replicate results from Acemoglu, Johnson and Robinson's seminal paper {cite}`Acemoglu2001`. -* You can download a copy [here](https://economics.mit.edu/files/4123). +* You can download a copy [here](http://economics.mit.edu/files/4123). In the paper, the authors emphasize the importance of institutions in economic development. @@ -86,7 +86,7 @@ In this paper, - economic outcomes are proxied by log GDP per capita in 1995, adjusted for exchange rates. - institutional differences are proxied by an index of protection against expropriation on average over 1985-95, constructed by the [Political Risk Services Group](https://www.prsgroup.com/). -These variables and other data used in the paper are available for download on Daron Acemoglu's [webpage](https://economics.mit.edu/faculty/acemoglu/data/ajr2001). +These variables and other data used in the paper are available for download on Daron Acemoglu's [webpage](http://economics.mit.edu/faculty/acemoglu/data/ajr2001). We will use pandas' `.read_stata()` function to read in data contained in the `.dta` files to dataframes From a64be04b1a5aa09fd8d31ad6f6143fb376988348 Mon Sep 17 00:00:00 2001 From: Humphrey Yang Date: Tue, 13 Sep 2022 10:33:51 +1000 Subject: [PATCH 5/5] update ols --- lectures/ols.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/ols.md b/lectures/ols.md index 5439fa7ed..ecaf11fe5 100644 --- a/lectures/ols.md +++ b/lectures/ols.md @@ -214,7 +214,7 @@ To view the OLS regression results, we can call the `.summary()` method. Note that an observation was mistakenly dropped from the results in the -original paper (see the note located in maketable2.do from Acemoglu's webpage), and thus the +original paper (see the note located in `maketable2.do` from Acemoglu's webpage), and thus the coefficients differ slightly. ```{code-cell} python3