Movie
Overview Functions
Functions
GEMS.generate_movie
— Functiongenerate_movie(rd::ResultData; seconds::Int64 = 60, fps::Int64 = 24, savepath::String = "video.mp4")
Generates a video of the disease progression on a geographical map based on the infections
dataframe in the ResultData
object. Note, that the population model used in the simulation must contain geolocated settings. Otherwise there is nothing to show. The optional parameters steer custom video length (seconds
), custom framerates (fps
) and a custom filepath (savepath
).
We've noticed that very large models may cause problems both in terms of runtime (too many points to put on the map for each frame) and explanatory value of the movie (as it can result in widespread 'red surfaces'). For this reason, there is a maximum number of points that will be put on the maps in videos. The value can be adapted via the MAX_MAP_POINTS_VIDEO
constant in the constants.jl
file. Generally, a value between 1,000,000 and 2,000,000 has proven to be a good maximum. If there are more geolocated infections in the ResultData
object than specified in the maximum, a subsample will be taken.
Parameters
rd::ResultData
: Data used to generate the movie (must contain theinfections
-dataframe with geolocations)seconds::Int64 = 60
(optional): Length of the video in secondsfps::Int64 = 24
(optoional): Frames per secondsavepath::String = "video.mp4"
(optional): Path to where the video shall be stored (must end in .mp4)