To create a .
mp4 file, try$ ffmpeg -r 10 -i frames/frame_%05d.
png -c:v libx264 -vf fps=25 -crf 17 -pix_fmt yuv420p video.
gif file, try$ ffmpeg -y -t 3 -i frames/frame_%05d.
png -vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.
png$ ffmpeg -r 10 -i frames/frame_%05d.
png -i palette.
png -filter_complex "fps=10,scale=720:-1:flags=lanczos[x];[x][1:v]paletteuse" animation.
gifCheck out the animation of density maps throughout a day:Animation of density maps throughout a dayAnd also the animation of journeys at different times:Animation of journeys in the morningAnimation of journeys after midnightConclusionsThis post demonstrates my work on visualizing the bike sharing system in London, with the use of bar charts, density maps, connection maps, and animations.
The abstraction of Python makes it a really nice and fancy tool for spatio-temporal data visualization (at the expense of computational time but whatever).
I leveraged folium, selenium, chromedriver, brew, ffmpeg, and most importantly, part of the building blocks from Vincent’s code to make this happen.
RemarksOnce again, a shout-out to Vincent Lonij and Dhrumil Patel for their demonstration of relevant works.
This work was based on my Master’s thesis regarding the optimization of station-based bike sharing systems.
Stay tuned for my soon-to-be-published paper.
Originally published on my blog edenau.