def analisi_nazione(self, file_nazionale, output_base, show=None, store=None): print(f'Generazione grafici nazionali al {self.__time_str}') if self.__data_nazionale is None: self.__data_nazionale = DataManager.nazionale_data(file_nazionale) self.__nazionale_linear(self.__data_nazionale, output_base=output_base, show=show, store=store) self.__nazionale_log(self.__data_nazionale, output_base=output_base, show=show, store=store) self.__nazionale_increment(self.__data_nazionale, output_base=output_base, use_percentage=False, show=show, store=store) self.__nazionale_increment(self.__data_nazionale, output_base=output_base, use_percentage=True, show=show, store=store) self.__nazionale_dettaglio(self.__data_nazionale, output_base=output_base, use_percentage=False, show=show, store=store)
def tabelle(self, file_nazionale, file_regioni, output_base, show=None, store=None): print(f'Generazione tabelle riepilogative al {self.__time_str}') if self.__data_nazionale is None: self.__data_nazionale = DataManager.nazionale_data(file_nazionale) if self.__data_regionale is None: self.__data_regionale, self.__codici_regione = DataManager.regioni_data( file_regioni) self.__table_rapporto_tamponi_contagi( data_nazionale=self.__data_nazionale, data_regionale=self.__data_regionale, output_base=output_base, show=show, store=store)
def __init__(self, file_nazionale, file_regioni, file_province, show=False, store=True, color_map=None, time_str=None, max_days=0): self.__showGraph = show self.__storeGraph = store self.__max_days = max_days self.__data_nazionale = DataManager.nazionale_data( file_nazionale, max_days=self.__max_days) max_data = self.__data_nazionale.data.max() self.__time_str = time_str if time_str is not None else max_data[:10].replace( "-", "") self.__data_regionale, self.__codici_regione = DataManager.regioni_data( file_regioni, max_days=self.__max_days) self.__data_provinciale = DataManager.province_data( file_province, max_days=self.__max_days) self.__color_map = self.__color_map if color_map is None else color_map