Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
confirmed_cases = vec(convert(Array, last(y,1))) # convert last dataframe row into a 1-D array
recovered_cases = vec(convert(Array, last(y_r,1)))
deaths = vec(convert(Array, last(y_d,1)))
Y = Array{Float64,2}(undef, length(names(y_r)), 4) # 2-D array with number of confirmed, recovered and deaths
Y[:,1] = deaths
Y[:,2] = confirmed_cases
Y[:,3] = recovered_cases
Y[:,4] = Y[:,2] - (Y[:,3] + Y[:,1]) # number of currently infected = confirmed - (recovered + deaths)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.