def getCurrentDayRealData()

in forecastMetrics/forecastMetrics.py [0:0]


def getCurrentDayRealData(currentDay):
    targetfile='target_'+tranformDateToString(currentDay)+".csv"
    targetfile_key='covid-19-daily/'+targetfile
    download_path='/tmp/'+targetfile
    try:
        s3_client.download_file(S3BucketName,targetfile_key,download_path)
    except:
        logger.info("no historical data found for " + tranformDateToString(currentDay) + " in bucket=" + S3BucketName + " , with key=" + targetfile_key)
        return None
    inputFile=open(download_path,'r')
    readerObj=csv.reader(inputFile)
    next(readerObj)
    currentDayRealData={}
    for row in readerObj:
       currentDayRealData[row[1]]=row[2]
    return currentDayRealData