from datetime import datetime from utils import read_batch_run, read_case_data, read_run, infection_rate from plot import comparison_plots #%% sns.set_style("whitegrid") sns.set_context("paper") sns.set_palette("deep") dateFormater = ConciseDateFormatter(AutoDateLocator()) #%% rki, hospital = read_case_data("berlin-cases.csv", "berlin-hospital.csv") #%% def infections(f): ev = pd.read_csv(f, sep="\t") no_inf = set(ev.infected).difference(set(ev.infector)) res = np.sort( np.concatenate( (ev['infector'].value_counts().array, np.zeros(len(no_inf))))) return pd.DataFrame(res)
""" #%% sns.set_style("whitegrid") sns.set_context("paper") sns.set_palette("deep") dateFormater = ConciseDateFormatter(AutoDateLocator()) palette = sns.color_palette() #%% rki, meldedatum, hospital = read_case_data("berlin-cases.csv", "berlin-cases-meldedatum.csv", "berlin-hospital.csv") #%% import zipfile z = zipfile.ZipFile( "../../../../../public-svn/matsim/scenarios/countries/de/episim/battery/2021-02-09/paperAggr/summaries/79.zip" ) with z.open("79.outdoorFraction.tsv") as f: df = pd.read_csv(f, delimiter="\t", index_col=0, parse_dates=[1],