diff --git a/08-31-2022.png b/08-31-2022.png new file mode 100644 index 0000000..af9adee Binary files /dev/null and b/08-31-2022.png differ diff --git a/README.md b/README.md index 392499e..d83a39c 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/img/05-31-2021.png b/img/05-31-2021.png index 9645cf8..aafdc6c 100644 Binary files a/img/05-31-2021.png and b/img/05-31-2021.png differ diff --git a/img/06-30-2021.png b/img/06-30-2021.png index dbd31ea..8629ede 100644 Binary files a/img/06-30-2021.png and b/img/06-30-2021.png differ diff --git a/img/07-31-2021.png b/img/07-31-2021.png index 16fb68f..49518e3 100644 Binary files a/img/07-31-2021.png and b/img/07-31-2021.png differ diff --git a/img/08-31-2021.png b/img/08-31-2021.png index 74c4dca..305e5e9 100644 Binary files a/img/08-31-2021.png and b/img/08-31-2021.png differ diff --git a/img/08-31-2022.png b/img/08-31-2022.png new file mode 100644 index 0000000..af9adee Binary files /dev/null and b/img/08-31-2022.png differ diff --git a/img/09-30-2021.png b/img/09-30-2021.png index d9a5097..15bd963 100644 Binary files a/img/09-30-2021.png and b/img/09-30-2021.png differ diff --git a/img/10-31-2021.png b/img/10-31-2021.png index 8d057e3..b429474 100644 Binary files a/img/10-31-2021.png and b/img/10-31-2021.png differ diff --git a/img/11-30-2021.png b/img/11-30-2021.png index a34033e..6c65ee5 100644 Binary files a/img/11-30-2021.png and b/img/11-30-2021.png differ diff --git a/img/animation.gif b/img/animation.gif index 592bd27..e02a867 100644 Binary files a/img/animation.gif and b/img/animation.gif differ diff --git a/src/animation.py b/src/animation.py index ed200b9..c65c060 100644 --- a/src/animation.py +++ b/src/animation.py @@ -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: @@ -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)