Skip to content

Commit 6d0df81

Browse files
Copilotmmcky
andauthored
FIX:116 redirected URLs in documentation to eliminate unnecessary redirects (qe-link-checker w. copilot) (#389)
* Initial plan * Fix redirected URLs in documentation - part 1 Co-authored-by: mmcky <[email protected]> * Update lectures/numba.md * Revert FRED URLs to original research.stlouisfed.org/fred2/ format per feedback Co-authored-by: mmcky <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: mmcky <[email protected]> Co-authored-by: Matt McKay <[email protected]>
1 parent dd8d502 commit 6d0df81

File tree

10 files changed

+40
-40
lines changed

10 files changed

+40
-40
lines changed

lectures/about_py.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ series, as well as in our later series on [JAX](https://jax.quantecon.org/intro.
8989

9090
[Python](https://www.python.org) is a general-purpose programming language conceived in 1989 by [Guido van Rossum](https://en.wikipedia.org/wiki/Guido_van_Rossum).
9191

92-
Python is free and [open source](https://en.wikipedia.org/wiki/Open_source), with development coordinated through the [Python Software Foundation](https://www.python.org/psf/).
92+
Python is free and [open source](https://en.wikipedia.org/wiki/Open_source), with development coordinated through the [Python Software Foundation](https://www.python.org/psf-landing/).
9393

9494
This is important because it
9595

@@ -349,7 +349,7 @@ We will discuss the details later in the lecture series, where we cover NumPy in
349349
While NumPy is still the king of array processing in Python, there are now
350350
important competitors.
351351

352-
Libraries such as [JAX](https://github.com/google/jax), [Pytorch](https://pytorch.org/), and [CuPy](https://cupy.dev/) also have
352+
Libraries such as [JAX](https://github.com/jax-ml/jax), [Pytorch](https://pytorch.org/), and [CuPy](https://cupy.dev/) also have
353353
built in array types and array operations that can be very fast and efficient.
354354

355355
In fact these libraries are better at exploiting parallelization and fast hardware, as
@@ -430,9 +430,9 @@ Other graphics libraries include
430430
* [Plotly](https://plotly.com/python/)
431431
* [seaborn](https://seaborn.pydata.org/) --- a high-level interface for matplotlib
432432
* [Altair](https://altair-viz.github.io/)
433-
* [Bokeh](https://bokeh.pydata.org/en/latest/)
433+
* [Bokeh](https://docs.bokeh.org/en/latest/)
434434

435-
You can visit the [Python Graph Gallery](https://www.python-graph-gallery.com/) for more example plots drawn using a variety of libraries.
435+
You can visit the [Python Graph Gallery](https://python-graph-gallery.com/) for more example plots drawn using a variety of libraries.
436436

437437

438438
### Networks and Graphs

lectures/getting_started.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Anaconda also comes with a package management system to organize your code libra
107107
```{index} single: Python; Anaconda
108108
```
109109

110-
To install Anaconda, [download](https://www.anaconda.com/download/) the binary and follow the instructions.
110+
To install Anaconda, [download](https://www.anaconda.com/download) the binary and follow the instructions.
111111

112112
Important points:
113113

@@ -410,7 +410,7 @@ You can explore more functionality of the debugger in the [Jupyter documentation
410410

411411
Notebook files are just text files structured in [JSON](https://en.wikipedia.org/wiki/JSON) and typically ending with `.ipynb`.
412412

413-
You can share them in the usual way that you share files --- or by using web services such as [nbviewer](https://nbviewer.jupyter.org/).
413+
You can share them in the usual way that you share files --- or by using web services such as [nbviewer](https://nbviewer.org/).
414414

415415
The notebooks you see on that site are **static** html representations.
416416

@@ -424,7 +424,7 @@ If you are interested in sharing notebooks containing interactive content, you m
424424
To collaborate with other people on notebooks, you might want to take a look at
425425
426426
- [Google Colab](https://colab.research.google.com/)
427-
- [Kaggle](https://www.kaggle.com/kernels)
427+
- [Kaggle](https://www.kaggle.com/code)
428428
429429
To keep the code private and to use the familiar JupyterLab and Notebook interface, look into the [JupyterLab Real-Time Collaboration extension](https://jupyterlab-realtime-collaboration.readthedocs.io/en/latest/).
430430
```
@@ -447,10 +447,10 @@ Most of the libraries we need come in Anaconda.
447447

448448
Other libraries can be installed with `pip` or `conda`.
449449

450-
One library we'll be using is [QuantEcon.py](http://quantecon.org/quantecon-py).
450+
One library we'll be using is [QuantEcon.py](https://quantecon.org/quantecon-py/).
451451

452452
(gs_install_qe)=
453-
You can install [QuantEcon.py](http://quantecon.org/quantecon-py) by
453+
You can install [QuantEcon.py](https://quantecon.org/quantecon-py/) by
454454
starting Jupyter and typing
455455

456456
```{code-block} ipython3
@@ -469,7 +469,7 @@ Alternatively, you can type the following into a terminal
469469
conda install quantecon
470470
```
471471

472-
More instructions can be found on the [library page](http://quantecon.org/quantecon-py).
472+
More instructions can be found on the [library page](https://quantecon.org/quantecon-py/).
473473

474474
To upgrade to the latest version, which you should do regularly, use
475475

lectures/jax_intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In addition to what's in Anaconda, this lecture will need the following librarie
2121
!pip install jax
2222
```
2323

24-
This lecture provides a short introduction to [Google JAX](https://github.com/google/jax).
24+
This lecture provides a short introduction to [Google JAX](https://github.com/jax-ml/jax).
2525

2626
Here we are focused on using JAX on the CPU, rather than on accelerators such as
2727
GPUs or TPUs.
@@ -620,7 +620,7 @@ x.nbytes # and y is just a pointer to x
620620

621621
This extra memory usage can be a big problem in actual research calculations.
622622

623-
So let's try a different approach using [jax.vmap](https://jax.readthedocs.io/en/latest/_autosummary/jax.vmap.html)
623+
So let's try a different approach using [jax.vmap](https://docs.jax.dev/en/latest/_autosummary/jax.vmap.html)
624624

625625
+++
626626

lectures/numba.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ This kind of speed gain is impressive relative to how simple and clear the modif
166166

167167
### How and When it Works
168168

169-
Numba attempts to generate fast machine code using the infrastructure provided by the [LLVM Project](http://llvm.org/).
169+
Numba attempts to generate fast machine code using the infrastructure provided by the [LLVM Project](https://llvm.org/).
170170

171171
It does this by inferring type information on the fly.
172172

@@ -419,7 +419,7 @@ If you prefer, you can safely skip this section.
419419

420420
### Cython
421421

422-
Like {doc}`Numba <numba>`, [Cython](http://cython.org/) provides an approach to generating fast compiled code that can be used from Python.
422+
Like {doc}`Numba <numba>`, [Cython](https://cython.org/) provides an approach to generating fast compiled code that can be used from Python.
423423

424424
As was the case with Numba, a key problem is the fact that Python is dynamically typed.
425425

@@ -442,15 +442,15 @@ cumbersome than Numba.
442442
```
443443

444444
If you are comfortable writing Fortran you will find it very easy to create
445-
extension modules from Fortran code using [F2Py](https://docs.scipy.org/doc/numpy/f2py/).
445+
extension modules from Fortran code using [F2Py](https://numpy.org/doc/stable/f2py/).
446446

447447
F2Py is a Fortran-to-Python interface generator that is particularly simple to
448448
use.
449449

450-
Robert Johansson provides a [nice introduction](http://nbviewer.jupyter.org/github/jrjohansson/scientific-python-lectures/blob/master/Lecture-6A-Fortran-and-C.ipynb)
450+
Robert Johansson provides a [nice introduction](https://nbviewer.org/github/jrjohansson/scientific-python-lectures/blob/master/Lecture-6A-Fortran-and-C.ipynb)
451451
to F2Py, among other things.
452452

453-
Recently, [a Jupyter cell magic for Fortran](http://nbviewer.jupyter.org/github/mgaitan/fortran_magic/blob/master/documentation.ipynb) has been developed --- you might want to give it a try.
453+
Recently, [a Jupyter cell magic for Fortran](https://nbviewer.org/github/mgaitan/fortran_magic/blob/master/documentation.ipynb) has been developed --- you might want to give it a try.
454454

455455
## Summary and Comments
456456

@@ -554,7 +554,7 @@ characters.
554554
:label: speed_ex2
555555
```
556556

557-
In the [Introduction to Quantitative Economics with Python](https://python-intro.quantecon.org) lecture series you can
557+
In the [Introduction to Quantitative Economics with Python](https://intro.quantecon.org/intro.html) lecture series you can
558558
learn all about finite-state Markov chains.
559559

560560
For now, let's just concentrate on simulating a very simple example of such a chain.

lectures/numpy.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ In this lecture, we will start a more systematic discussion of
5050
1. the fundamental array processing operations provided by NumPy.
5151

5252

53-
(For an alternative reference, see [the official NumPy documentation](https://docs.scipy.org/doc/numpy/reference/).)
53+
(For an alternative reference, see [the official NumPy documentation](https://numpy.org/doc/stable/reference/).)
5454

5555
We will use the following imports.
5656

@@ -72,11 +72,11 @@ from matplotlib import cm
7272
The essential problem that NumPy solves is fast array processing.
7373

7474
The most important structure that NumPy defines is an array data type, formally
75-
called a [numpy.ndarray](https://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html).
75+
called a [numpy.ndarray](https://numpy.org/doc/stable/reference/arrays.ndarray.html).
7676

7777
NumPy arrays power a very large proportion of the scientific Python ecosystem.
7878

79-
To create a NumPy array containing only zeros we use [np.zeros](https://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html#numpy.zeros)
79+
To create a NumPy array containing only zeros we use [np.zeros](https://numpy.org/doc/stable/reference/generated/numpy.zeros.html#numpy.zeros)
8080

8181
```{code-cell} python3
8282
a = np.zeros(3)
@@ -90,7 +90,7 @@ type(a)
9090
NumPy arrays are somewhat like native Python lists, except that
9191

9292
* Data *must be homogeneous* (all elements of the same type).
93-
* These types must be one of the [data types](https://docs.scipy.org/doc/numpy/reference/arrays.dtypes.html) (`dtypes`) provided by NumPy.
93+
* These types must be one of the [data types](https://numpy.org/doc/stable/reference/arrays.dtypes.html) (`dtypes`) provided by NumPy.
9494

9595
The most important of these dtypes are:
9696

@@ -220,7 +220,7 @@ na is np.array(na) # Does make a new copy --- perhaps unnecessarily
220220
```
221221

222222
To read in the array data from a text file containing numeric data use `np.loadtxt`
223-
or `np.genfromtxt`---see [the documentation](https://docs.scipy.org/doc/numpy/reference/routines.io.html) for details.
223+
or `np.genfromtxt`---see [the documentation](https://numpy.org/doc/stable/reference/routines.io.html) for details.
224224

225225
### Array Indexing
226226

@@ -464,7 +464,7 @@ B = np.ones((2, 2))
464464
A @ B
465465
```
466466

467-
(For older versions of Python and NumPy you need to use the [np.dot](https://docs.scipy.org/doc/numpy/reference/generated/numpy.dot.html) function)
467+
(For older versions of Python and NumPy you need to use the [np.dot](https://numpy.org/doc/stable/reference/generated/numpy.dot.html) function)
468468

469469
We can also use `@` to take the inner product of two flat arrays
470470

@@ -1167,7 +1167,7 @@ Much of this functionality is also available in [SciPy](https://www.scipy.org/),
11671167

11681168
We'll cover the SciPy versions in more detail {doc}`soon <scipy>`.
11691169

1170-
For a comprehensive list of what's available in NumPy see [this documentation](https://docs.scipy.org/doc/numpy/reference/routines.html).
1170+
For a comprehensive list of what's available in NumPy see [this documentation](https://numpy.org/doc/stable/reference/routines.html).
11711171

11721172

11731173
## Speed Comparisons

lectures/pandas.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ df.loc[(df.cc + df.cg >= 80) & (df.POP <= 20000), ['country', 'year', 'POP']]
270270

271271
**Application: Subsetting Dataframe**
272272

273-
Real-world datasets can be [enormous](https://developers.google.com/machine-learning/data-prep/construct/collect/data-size-quality).
273+
Real-world datasets can be [enormous](https://developers.google.com/machine-learning/crash-course/overfitting).
274274

275275
It is sometimes desirable to work with a subset of data to enhance computational efficiency and reduce redundancy.
276276

@@ -516,7 +516,7 @@ We start with a relatively low-level method and then return to pandas.
516516
```{index} single: Python; requests
517517
```
518518

519-
One option is to use [requests](https://requests.readthedocs.io/en/master/), a standard Python library for requesting data over the Internet.
519+
One option is to use [requests](https://requests.readthedocs.io/en/latest/), a standard Python library for requesting data over the Internet.
520520

521521
To begin, try the following code on your computer
522522

@@ -534,7 +534,7 @@ If you do get an error, then there are two likely causes
534534
In the second case, you can either
535535

536536
* switch to another machine
537-
* solve your proxy problem by reading [the documentation](https://requests.readthedocs.io/en/master/)
537+
* solve your proxy problem by reading [the documentation](https://requests.readthedocs.io/en/latest/)
538538

539539
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')`
540540

lectures/python_essentials.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ with open('output2.txt', 'r') as fo:
401401

402402
```{note}
403403
Note that we only covered `r`, `w`, and `a` mode here, which are the most commonly used modes.
404-
Python provides [a variety of modes](https://www.geeksforgeeks.org/reading-writing-text-files-python/)
404+
Python provides [a variety of modes](https://www.geeksforgeeks.org/python/reading-writing-text-files-python/)
405405
that you could experiment with.
406406
```
407407

lectures/troubleshooting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ You have installed Anaconda, haven't you, following the instructions in {doc}`th
3333

3434
Assuming that you have, the most common source of problems for our readers is that their Anaconda distribution is not up to date.
3535

36-
[Here's a useful article](https://www.anaconda.com/keeping-anaconda-date/)
36+
[Here's a useful article](https://www.anaconda.com/blog/keeping-anaconda-date)
3737
on how to update Anaconda.
3838

3939
Another option is to simply remove Anaconda and reinstall.
4040

41-
You also need to keep the external code libraries, such as [QuantEcon.py](https://quantecon.org/quantecon-py) up to date.
41+
You also need to keep the external code libraries, such as [QuantEcon.py](https://quantecon.org/quantecon-py/) up to date.
4242

4343
For this task you can either
4444

lectures/workspace.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ In this lecture, you will learn to
4444
```{note}
4545
Going forward, it is assumed that you have an Anaconda environment up and running.
4646
47-
You may want to [create a new conda environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands) if you haven't done so already.
47+
You may want to [create a new conda environment](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands) if you haven't done so already.
4848
```
4949

5050
## Working with Python files
@@ -320,14 +320,14 @@ However, this is outside the focus of these lectures.
320320

321321
This section will familiarize you with git and GitHub.
322322

323-
[Git](http://git-scm.com/) is a *version control system* --- a piece of software used to manage digital projects such as code libraries.
323+
[Git](https://git-scm.com/) is a *version control system* --- a piece of software used to manage digital projects such as code libraries.
324324

325325
In many cases, the associated collections of files --- called *repositories* --- are stored on [GitHub](https://github.com/).
326326

327327
GitHub is a wonderland of collaborative coding projects.
328328

329329
For example, it hosts many of the scientific libraries we'll be using later
330-
on, such as [this one](https://github.com/pydata/pandas).
330+
on, such as [this one](https://github.com/pandas-dev/pandas).
331331

332332
Git is the underlying software used to manage these projects.
333333

@@ -337,9 +337,9 @@ lectures.
337337

338338
There are two main flavors of Git
339339

340-
1. the plain vanilla [command line Git](http://git-scm.com/downloads) version
340+
1. the plain vanilla [command line Git](https://git-scm.com/downloads) version
341341
2. the various point-and-click GUI versions
342-
* See, for example, the [GitHub version](https://desktop.github.com/) or Git GUI integrated into your IDE.
342+
* See, for example, the [GitHub version](https://github.com/apps/desktop) or Git GUI integrated into your IDE.
343343

344344
In case you already haven't, try
345345

@@ -361,11 +361,11 @@ As the 2nd task,
361361
1. Look into 'forking' GitHub repositories (forking means making your own copy of a GitHub repository, stored on GitHub).
362362
1. Fork [QuantEcon.py](https://github.com/QuantEcon/QuantEcon.py).
363363
1. Clone your fork to some local directory, make edits, commit them, and push them back up to your forked GitHub repo.
364-
1. If you made a valuable improvement, send us a [pull request](https://help.github.com/articles/about-pull-requests/)!
364+
1. If you made a valuable improvement, send us a [pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)!
365365

366366
For reading on these and other topics, try
367367

368-
* [The official Git documentation](http://git-scm.com/doc).
368+
* [The official Git documentation](https://git-scm.com/doc).
369369
* Reading through the docs on [GitHub](https://docs.github.com/en).
370-
* [Pro Git Book](http://git-scm.com/book) by Scott Chacon and Ben Straub.
370+
* [Pro Git Book](https://git-scm.com/book) by Scott Chacon and Ben Straub.
371371
* One of the thousands of Git tutorials on the Net.

lectures/writing_good_code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ But as a programmer, your aim should be to **automate** repetition, **not** do i
189189

190190
More importantly, repeating the same logic in different places means that eventually one of them will likely be wrong.
191191

192-
If you want to know more, read the excellent summary found on [this page](https://code.tutsplus.com/tutorials/3-key-software-principles-you-must-understand--net-25161).
192+
If you want to know more, read the excellent summary found on [this page](https://code.tutsplus.com/3-key-software-principles-you-must-understand--net-25161t).
193193

194194
We'll talk about how to avoid repetition below.
195195

0 commit comments

Comments
 (0)