covid19-etl/etl/idph.py
def files_to_submissions(self):
        """
        Reads JSON file and convert the data to Sheepdog records.
        """
        start = time.time()

        latest_submitted_date = self.metadata_helper.get_latest_submitted_date_idph()
        today = datetime.date.today()
        if latest_submitted_date == today:
            print("Nothing to submit: today and latest submitted date are the same.")
            return

        print(
            f"Latest submitted date: {latest_submitted_date}. Getting data until date: {today}"
        )

        self.parse_il_counties()

        # convert date to datetime
        latest_submitted_datetime = (
            datetime.datetime(
                latest_submitted_date.year,
                latest_submitted_date.month,
                latest_submitted_date.day,
            )
            if latest_submitted_date
            else None
        )

        for county in self.county_dict:
            self.parse_county_data(latest_submitted_datetime, county)

        self.parse_state_data(latest_submitted_datetime)

        print("Done in {} secs".format(int(time.time() - start)))

        Reads JSON file and convert the data to Sheepdog records.
        
Reads JSON file and convert the data to Sheepdog records.
Reads JSON file and convert the data to Sheepdog records .
def files_to_submissions(self):
        start = time.time()
        latest_submitted_date = self.metadata_helper.get_latest_submitted_date_idph()
        today = datetime.date.today()
        if latest_submitted_date == today:
            print("Nothing to submit: today and latest submitted date are the same.")
            return
        print(
            f"Latest submitted date: {latest_submitted_date}. Getting data until date: {today}"
        )
        self.parse_il_counties()
        latest_submitted_datetime = (
            datetime.datetime(
                latest_submitted_date.year,
                latest_submitted_date.month,
                latest_submitted_date.day,
            )
            if latest_submitted_date
            else None
        )
        for county in self.county_dict:
            self.parse_county_data(latest_submitted_datetime, county)
        self.parse_state_data(latest_submitted_datetime)
        print("Done in {} secs".format(int(time.time() - start)))
def files_to_submissions ( self ) : start = time . time ( ) latest_submitted_date = self . metadata_helper . get_latest_submitted_date_idph ( ) today = datetime . date . today ( ) if latest_submitted_date == today : print ( "Nothing to submit: today and latest submitted date are the same." ) return print ( f"Latest submitted date: {latest_submitted_date}. Getting data until date: {today}" ) self . parse_il_counties ( ) latest_submitted_datetime = ( datetime . datetime ( latest_submitted_date . year , latest_submitted_date . month , latest_submitted_date . day , ) if latest_submitted_date else None ) for county in self . county_dict : self . parse_county_data ( latest_submitted_datetime , county ) self . parse_state_data ( latest_submitted_datetime ) print ( "Done in {} secs" . format ( int ( time . time ( ) - start ) ) )
Reads JSON file and convert the data to Sheepdog records.
Reads JSON file and convert the data to Sheepdog records .
"""
        Reads JSON file and convert the data to Sheepdog records.
        """ # convert date to datetime
self