covid19-etl/etl/idph_regional_icu_capacity.py
def parse_file(self, latest_submitted_date, url):
        """
        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:
            latest_submitted_date (date): the date of latest available "summary_clinical" for project
            url (str): URL at which the JSON file is available
        """
        print("Getting data from {}".format(url))
        with closing(self.get(url, stream=True)) as r:
            data = r.json()
            date = self.etlJobDate

            summary_locations_in_guppy = (
                self.metadata_helper.get_existing_summary_locations()
            )

            for region in data:
                (summary_location, summary_clinical) = self.parse_region(date, region)
                self.summary_clinicals.append(summary_clinical)
                if summary_location["submitter_id"] not in summary_locations_in_guppy:
                    self.summary_locations.append(summary_location)

        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:
            latest_submitted_date (date): the date of latest available "summary_clinical" for project
            url (str): URL at which the JSON file is available
        
Converts a JSON files to data we can submit via Sheepdog.
Converts a JSON files to data we can submit via Sheepdog .
def parse_file(self, latest_submitted_date, url):
        print("Getting data from {}".format(url))
        with closing(self.get(url, stream=True)) as r:
            data = r.json()
            date = self.etlJobDate
            summary_locations_in_guppy = (
                self.metadata_helper.get_existing_summary_locations()
            )
            for region in data:
                (summary_location, summary_clinical) = self.parse_region(date, region)
                self.summary_clinicals.append(summary_clinical)
                if summary_location["submitter_id"] not in summary_locations_in_guppy:
                    self.summary_locations.append(summary_location)
def parse_file ( self , latest_submitted_date , url ) : print ( "Getting data from {}" . format ( url ) ) with closing ( self . get ( url , stream = True ) ) as r : data = r . json ( ) date = self . etlJobDate summary_locations_in_guppy = ( self . metadata_helper . get_existing_summary_locations ( ) ) for region in data : ( summary_location , summary_clinical ) = self . parse_region ( date , region ) self . summary_clinicals . append ( summary_clinical ) if summary_location [ "submitter_id" ] not in summary_locations_in_guppy : self . summary_locations . append ( summary_location )
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:
            latest_submitted_date (date): the date of latest available "summary_clinical" for project
            url (str): URL at which the JSON file is available
        """
self
latest_submitted_date
the date of latest available "summary_clinical" for project
the date of latest available " summary_clinical " for project
url
URL at which the JSON file is available
URL at which the JSON file is available