QuantEcon / lecture-python-intro

An Undergraduate Lecture Series for the Foundations of Computational Economics
https://intro.quantecon.org/
34 stars 17 forks source link

[markov_chain_I] Hamilton's chain animation #457

Closed longye-tian closed 1 week ago

longye-tian commented 3 weeks ago

Hi Matt @mmcky,

This pull request includes the animation (#456 ) for the convergence to a stationary distribution in our Markov Chain lecture (markov_chain_I, Hamilton's chain).

Thank you for the help testing the animation :))

Best regards, Longye

netlify[bot] commented 3 weeks ago

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
Latest commit 26c0eb7c10fb12e60708c4b4425a9f496a7d456e
Latest deploy log https://app.netlify.com/sites/taupe-gaufre-c4e660/deploys/666664792fa30e00089094b6
Deploy Preview https://deploy-preview-457--taupe-gaufre-c4e660.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

github-actions[bot] commented 3 weeks ago

🚀 Deployed on https://666666a4254c8b579ac042d9--taupe-gaufre-c4e660.netlify.app

mmcky commented 2 weeks ago

thanks @longye-tian this is looking great. It works out of the box for html output.

For pdf it doesn't break the build and leaves the following text representation

Screenshot 2024-06-17 at 3 22 00 PM

I think a link back to the website would be a better option and will require an update to the sphinx-jupyterbook-latex package to insert a link for these javascript object types.

@jstac using this specific package for animated outputs works well. I am comfortable with proceeding based on the fact it doesn't impact PDF output generation, and in the medium term we can improve the representation in the pdf output.

jstac commented 1 week ago

Thanks @mmcky , I'll leave this with you.

mmcky commented 1 week ago

thanks @longye-tian. I am excited to see some animations working their way into the lectures. The way this is done is nicely compatible with jupyter-book out of the box and I will work to enhance the pdf representation. Let's get this merged.