def __generate_study_name(self):
        """
        When a study name is not given, generate one with the format of " author - site name - year "
        :return str study_name: generated study name
        """
        study_name = ""
        _exist = False
        try:
            if self.noaa_data_sorted["Top"]["Study_Name"]:
                _exist = True
        except KeyError:
            pass

        if not _exist:
            try:
                _site = self.noaa_data_sorted["Site_Information"]["properties"]["siteName"]
                _year = self.noaa_data_sorted["Publication"][0]["pubYear"]
                _author = self.noaa_data_sorted["Publication"][0]["author"]
                _author = self.__get_author_last_name(_author)
                study_name = "{}.{}.{}".format(_author, _site,  _year)
                study_name = study_name.replace(" ", "_").replace(",", "_")
            except (KeyError, Exception):
                pass
            self.noaa_data_sorted["Top"]["Study_Name"] = study_name
            self.noaa_data_sorted["Title"]["Study_Name"] = study_name
        return
def __generate_study_name ( self ) : study_name = "" _exist = False try : if self . noaa_data_sorted [ "Top" ] [ "Study_Name" ] : _exist = True except KeyError : pass if not _exist : try : _site = self . noaa_data_sorted [ "Site_Information" ] [ "properties" ] [ "siteName" ] _year = self . noaa_data_sorted [ "Publication" ] [ 0 ] [ "pubYear" ] _author = self . noaa_data_sorted [ "Publication" ] [ 0 ] [ "author" ] _author = self . __get_author_last_name ( _author ) study_name = "{}.{}.{}" . format ( _author , _site , _year ) study_name = study_name . replace ( " " , "_" ) . replace ( "," , "_" ) except ( KeyError , Exception ) : pass self . noaa_data_sorted [ "Top" ] [ "Study_Name" ] = study_name self . noaa_data_sorted [ "Title" ] [ "Study_Name" ] = study_name return
When a study name is not given, generate one with the format of " author - site name - year "
        :return str study_name: generated study name