Corrected the data sourcing so that the proper date format is used and the
data extracted is now correct
Updated to reflect the modified R code