We will use Documents/trapMapViz as a work directory. First, we remove any files left over from a previous run.
%%bash
cd Documents/trapMapViz
rm -f *.png
rm -f *.avi
rm -f *.pdf
dir
trapMaps_2.pdf.1 trapMaps_2.pdf.3 trapMapViz.sh trapMaps_2.pdf.2 trapMapViz~ trapMapViz.sh~
The PDF version is downloaded from my website using wget, PNGs are extracted using Ghostscript (gs), and the resulting file sequence is stitched together inot an AVI video using avconv. It may take a few minutes to run this cell.
%%bash
cd Documents/trapMapViz
wget -q http://www.guaminsects.net/anr/sites/default/files/trapMaps_2.pdf
gs -q -dBATCH -dNOPAUSE -sDEVICE=png16m -r300 -sOutputFile="tm%d.png" "trapMaps_2.pdf"
avconv -v quiet -r 1 -i tm%d.png -r 1 tm.avi
ls *.avi
dir
@article { trapMapViz, title = {Generating a Trap Map Animation}, year = {2015}, type = {CRB Technical Report}, url = {http://nbviewer.ipython.org/url/guaminsects.net/anr/sites/default/files/trapMapViz.ipynb%7D, author = {Aubrey Moore} }