<jupyter_start><jupyter_text>Loading libraries and data<jupyter_code>import pandas as pd
import numpy as np
from sklearn.linear_model import LinearRegression
# Load data from Github (2019 Novel Coronavirus COVID-19 (2019-nCoV) Data Repository by Johns Hopkins CSSE)
url = 'https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv'
df1 = pd.read_csv(url)
# create dataframe with data for Italy and Germany
start = 33 # index of start element in time series
df2 = df1.loc[df1["Country/Region"].isin(["Italy", "Germany"])].iloc[:,start:].T
df2 = df2.iloc[:-1,:] # no data update for 3/12/20
df2.columns = ["Germany","Italy"]
# Create third time series with shifted data from Germany for comparison
delta_t = 8 # offset of the time series for comparison
df2["Germany shifted 8 days"] = df2.Germany.shift(-delta_t)<jupyter_output><empty_output><jupyter_text>Plotting the data<jupyter_code>df2.plot(linewidth=0.5)<jupyter_output><empty_output><jupyter_text>Plotting the logarithm<jupyter_code>start_log = 9 # start with the more linear part of the log data
df2.iloc[start_log:,:].plot(linewidth=0.5,logy=True,grid=True)<jupyter_output><empty_output><jupyter_text>Seven day growth Growth of cases in Germany in the last seven days.<jupyter_code>df2.Germany[-1], df2.Germany[-8], df2.Germany[-1]/df2.Germany[-8]<jupyter_output><empty_output><jupyter_text>Growth of cases in Italy in the last seven days.<jupyter_code>df2.Italy[-1], df2.Italy[-8], df2.Italy[-1]/df2.Italy[-8]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12373737373737374, 'fraction_numerical': 0.03787878787878788, 'mean_word_length': 6.885572139303482, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '287035', 'license': 'MIT', 'n_tokens_mistral': 614, 'n_tokens_neox': 559, 'n_words': 129, 'path': 'Covid_19_(public).ipynb', 'repo_name': 'gittimos/covid-19', 'size': '1584'}