Jorge Jesus Alonso Ortiz

Jorge Jesus Alonso Ortiz

Research, teaching, coding… and dogs

PyLab Studio

Jupyter notebooks for iPad

PyLab Studio

Change a central bank’s rule. Weigh the evidence for smaller classes. Or follow a month of tides. On iPad, open the notebook and see how a change in the code moves the figure.

Apple’s listing opens when the app is released in your region.

Download the demo films and five notebooks (ZIP, 20.6 MB)

Policy questions you can put to a test

What should a central bank watch after a surprise rate increase? What would a school board want to know before hiring more teachers? Follow the code and the evidence in two short notebook films. Full presentation and offline download

Monetary policy · 42 s

When a rate shock lingers

Give two central banks the same 25-basis-point surprise. In the Macro Avanzada model, raising the weight on last quarter’s rate from 35% to 75% deepens the first-quarter output gap from −0.26% to −0.55%. Follow both paths for 20 quarters.

Full Dynare runs on a connected computer with GNU Octave. The notebook also offers a PureMacro solver for the same .mod file.

Explore the Macro Avanzada course notebook

Read the film transcript

If a central bank raises its rate unexpectedly, how long does the effect on output last? Give both rules the same 25-basis-point quarterly shock. Change the weight on last quarter’s rate from 35% to 75%. Each line traces the output gap in the same course model. With more smoothing, the initial drop is larger. By quarter four, the gap is about −0.005% under the 35% rule and −0.083% under the 75% rule. Open the notebook on iPad. Full Dynare runs on a connected computer. PureMacro can solve the same model in Python.

Microeconometrics · 42 s

What did smaller classes change?

In Tennessee’s Project STAR, children in small kindergarten classes gained 0.21 standard deviations in reading and 0.20 in math relative to regular classes without an aide. See the 95% intervals for 3,730 pupils across 78 schools.

The Python notebook estimates differences within schools from the included totals. The R script reproduces the pupil-level regression and clusters uncertainty by school.

Read the original STAR study · Look up the variables

Read the film transcript

Would smaller kindergarten classes change how much children learn? Tennessee’s Project STAR put that question to a randomized test. Compare pupils at the same school. The analysis includes 3,730 children in 78 schools with both class sizes. Reading rises by 0.21 standard deviations and math by 0.20. Each dot marks the estimated difference. The bars give 95% confidence intervals clustered by school. The reading interval runs from 0.10 to 0.33 standard deviations. Rerun both estimates from the school totals in the notebook. The download includes the R replication using the original data.

iPad · 15 s

From the gallery to the model

Open Macroeconomics and choose the real business cycle template. This 13-inch iPad simulator recording shows where to edit the Dynare-format source that PureMacro reads.

Read the film transcript

Choose Macroeconomics in the template gallery, then open DSGE from a Dynare .mod. An editable Python notebook opens. Its rbc.mod source cell contains the model equations and calibration.

The download includes the course model, school totals, and R replication. Open either .ipynb in PyLab Studio. Set language to “es” in the notebook for Spanish figure labels.

Three experiments you can change

Each short film opens a real notebook on iPad. Watch with the sound on or follow the captions.

Python · 20 s

Two slits, one beam

Double the distance between two openings. The bright bands on the screen draw closer, from 2.950 to 1.475 mm apart.

Read the film transcript

One beam, two slits. What changes when you move the openings farther apart? Begin with a prediction. See the spacing control and the Python that describes the light. Tap Read to reveal the pattern. Compare both screens in the same notebook. Double the slit spacing. The spacing between bright peaks falls from 2.950 to 1.475 mm. Try a different spacing. Running Python on iPad requires the one-time Code Execution purchase.

Julia · 21 s

A curve comes loose

Two oscillators draw a closed figure at a ratio of 3 to 2. Change 3 to 3.08 and follow the pen for five passes.

Read the film transcript

One pen, two rhythms. Follow two oscillators through a saved Julia notebook. Open Orbit Loom. Read the question, then tap Read to see the figures. Start at three to two. The pen returns to its starting point after one cycle. Change 3 to 3.08. Five passes of the pen weave a different pattern. Measure the difference. Run Julia through a paired Mac or a Jupyter server.

R · 21 s

A month of tides

Combine waves with periods of 12 and 12.42 hours. A heat map reveals a 14.79-day rhythm in the daily tidal range.

Read the film transcript

Two clocks, one tide. Explore a month of modeled tides in a saved R notebook. Start with two rhythms. One wave repeats every 12 hours. The other takes 12.42. Read the tide by color. Follow one bright band across the days. See the daily swing. Swipe from the heat map to the daily range. They line up every 14.79 days. Run R through a paired Mac or a Jupyter server.

The iPad notebook template gallery in light mode, with its search field and experiment cards.
The same iPad gallery in dark mode, with light text and colored notebook icons.

Inside the app

The gallery, in two lights

Use the sun or moon in the workspace to change its appearance. This view follows your device setting. Open either capture to compare the same gallery in both modes.

Light capture · Dark capture · Play the appearance switch

The notebook files

Take the experiments apart