covid19-etl/etl/idph_zipcode.py
def parse_data(self, date_str):
        """
        Converts a JSON files to data we can submit via Sheepdog. Stores the
        records to submit in `self.summary_locations` and `self.summary_clinicals`.

        Args:
            date_str (str): date in "%Y-%m-%d" format
        """
        existing_summary_locations = (
            self.metadata_helper.get_existing_summary_locations()
        )
        url = f"https://idph.illinois.gov/DPHPublicInformation/api/COVIDExport/GetZip?reportDate={date_str}"
        print("Getting data from {}".format(url))
        with closing(self.get(url, stream=True)) as r:
            data = r.json()
            for zipcode_values in data:
                (summary_location, summary_clinical) = self.parse_zipcode(
                    zipcode_values
                )

                sl_id = summary_location["submitter_id"]
                if sl_id not in existing_summary_locations:
                    self.summary_locations[sl_id] = summary_location
                self.summary_clinicals.append(summary_clinical)

        Converts a JSON files to data we can submit via Sheepdog. Stores the
        records to submit in `self.summary_locations` and `self.summary_clinicals`.

        Args:
            date_str (str): date in "%Y-%m-%d" format
        
Converts a JSON files to data we can submit via Sheepdog.
Converts a JSON files to data we can submit via Sheepdog .
def parse_data(self, date_str):
        existing_summary_locations = (
            self.metadata_helper.get_existing_summary_locations()
        )
        url = f"https://idph.illinois.gov/DPHPublicInformation/api/COVIDExport/GetZip?reportDate={date_str}"
        print("Getting data from {}".format(url))
        with closing(self.get(url, stream=True)) as r:
            data = r.json()
            for zipcode_values in data:
                (summary_location, summary_clinical) = self.parse_zipcode(
                    zipcode_values
                )
                sl_id = summary_location["submitter_id"]
                if sl_id not in existing_summary_locations:
                    self.summary_locations[sl_id] = summary_location
                self.summary_clinicals.append(summary_clinical)
def parse_data ( self , date_str ) : existing_summary_locations = ( self . metadata_helper . get_existing_summary_locations ( ) ) url = f"https://idph.illinois.gov/DPHPublicInformation/api/COVIDExport/GetZip?reportDate={date_str}" print ( "Getting data from {}" . format ( url ) ) with closing ( self . get ( url , stream = True ) ) as r : data = r . json ( ) for zipcode_values in data : ( summary_location , summary_clinical ) = self . parse_zipcode ( zipcode_values ) sl_id = summary_location [ "submitter_id" ] if sl_id not in existing_summary_locations : self . summary_locations [ sl_id ] = summary_location self . summary_clinicals . append ( summary_clinical )
Converts a JSON files to data we can submit via Sheepdog.
Converts a JSON files to data we can submit via Sheepdog .
"""
        Converts a JSON files to data we can submit via Sheepdog. Stores the
        records to submit in `self.summary_locations` and `self.summary_clinicals`.

        Args:
            date_str (str): date in "%Y-%m-%d" format
        """
self
date_str
date in "%Y-%m-%d" format
date in " %Y - %m - %d " format