pangeo_fish.helpers.render_distributions#
- pangeo_fish.helpers.render_distributions(*, data: Dataset, time_step=3, frames_dir='frames', output_path='states', extension='gif', fps=10, remove_frames=True, storage_options: dict = None, **kwargs)#
Render a video of a dataset resulting from the merging of
emissionand thestatesdistributions.- Parameters:
data (
xarray.Dataset) – A dataset that contains theemissionandstatesvariablestime_step (
int, default:3) – Time step to sample data fromdataframes_dir (
str, default:"frames") – Name of the folder to save the images tooutput_path (
str, default:"states") – Path to save the video. In case of an AWS S3 uri, the video is first saved locally, and then send to the bucketextension (
str, default:"gif") – Name of the file extension of the video Either “gif” or “mp4”. In the latter case, make sure to have installed imageio[ffmpeg]fps (
int, default:10) – Number of frames per second.remove_frames (
bool, default:True) – Whether to delete the framesstorage_options (
dict, optional) – Dictionary containing storage options for connecting to the S3 bucket
- Returns:
video_fn (
str) – Local path to the video
See also
pangeo_fish.helpers.open_distributions.