Tom Sargent and John Stachurski go online with a fascinating web based course in quantitative economic modeling.
Two thoughts. The education world is going online, but we're all in version 1.0 at best. Tom and John's website is an interestingly different paradigm than the online courses such as the Coursera platform that I'm using for an online asset pricing course. I'll be curious to see which elements of which paradigm survive. Or perhaps the Toms' webiste will become the "textbook" for Coursera type courses, which can then add videos, forums, a structured environment for plowing through the material, and the carrot of certification at the end.
The website is just gorgeous. Producing economic (and scientific) articles for viewing online has so far been a headache. Our journals produce beautiful pdf representations of.. printed pages. They might as well show 3-d images of a papyrus scroll. Math and tables in html as presented on most journal websites is just pathetically ugly. As I looked through this website, I'm enthused that 1) I need to learn python and 2) I need to learn to write my papers and textbooks in this gorgeous format.
It seems they are using MathJax (http://www.mathjax.org/) to typeset equations, which simply renders the LaTeX math markup you're probably already familiar with. No need to learn python for that.
ReplyDeletePython is used to code up the quantitative exercises in their book.
DeleteIt looks like the website is all in Latex code and just translated from the pdf. I'm sure there's an easy way to set that up, but I have pretty much no idea what that is.
ReplyDeleteI read most of the pdf. I thought the python introduction was one of the better ones I've seen (mainly since it was well-written, looked good, and included some stuff I wasn't already familiar with).
How do you translate latex or pdf directly to html? I know mathjax, and tried to use it for this blog. Alas it didn't work on mobile devices so I stopped.
DeleteProf. Cochrane,
DeleteHave you tried WinEdt? WinEdt is a latex editor and provides a way for you to convert latex to html. I tried it once and was satisfied. To convert latex to hmtl: open WinEdt, and go to Tex -> Html -> Latex (or Tex) -> Html. I believe that many other latex editors provide such a functionality.
A really helpful tool for this kind of thing is is pandoc:
Deletehttp://johnmacfarlane.net/pandoc/
For R users there's a great package for creating documents like the online textbook you mention above: knitr
http://yihui.name/knitr/
http://www.crcpress.com/product/isbn/9781482203530
I find myself using knitr for pretty much everything these days, from research articles written in LaTeX to teaching material deployed online. Here's an example (math at the bottom):
http://www.ditraglia.com/econ103/Rtutorial3.html
The preceding example was written in RMarkdown. All the math commands are straight-up LaTeX and everything else is like a stripped down version of HTML. The R code chunks live inside the document so when you compile it the output is automatically updated and included. Best of all, the final webpage is completely self-contained: all images and other material are directly embedded so there's only one file to upload.
Python is very cool, but for econometrics it's hard to beat R in my opinion. For those who worry that R is too slow for heavy-duty computation, I recommend the Rcpp package which makes it completely painless to include C++ code in R scripts:
http://dirk.eddelbuettel.com/code/rcpp.html
along with the RcppArmadillo package for high-performance matrix algebra:
http://dirk.eddelbuettel.com/code/rcpp.armadillo.html
http://arma.sourceforge.net/docs.html
Wow! Thanks for sharing these tools.
DeleteCooler than you think: they use sphinx, which then outputs html, latex, or pdf as desired. Also does syntax highlighting on code snippets.
ReplyDeleteLinks:
* Sphinx: http://sphinx-doc.org/
* Example of code (look for "show source" on the right): http://johnstachurski.net/emet/index.html