Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added 08-31-2022.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
This is a change I am making to the readme file

# Exploring COVID-19 Vaccine Effectiveness
## National View
![](img/animation.gif)
Expand Down
Binary file modified img/05-31-2021.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/06-30-2021.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/07-31-2021.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/08-31-2021.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/08-31-2022.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/09-30-2021.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/10-31-2021.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/11-30-2021.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/animation.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
import imageio as iio
import os

#create an iterable list in correct date order. Uses the final character in year (-5 index) to sort. (eg. '11-30-2021.png'
#is before '08-31-2022.png' because 1 is before 2)
dates = sorted(os.listdir('img'), key=lambda date: date[-5])

def create_gif(filename_save):
"""This function creates a gif animation from a folder of png images
Parameters:
Expand All @@ -16,7 +20,7 @@ def create_gif(filename_save):
images = list()

#this part looks at the img directory and reads in all the files that end with .png (only going to bring in those)
for filename in sorted(os.listdir('img')):
for filename in dates:
if filename[-4:] == '.png' and not filename == 'comparison.png':
f = os.path.join('img',filename)
im = iio.imread(f)
Expand Down