Covid-19, Analysis, Visualization, Prediction
xxxxxxxxxx
Author: Zhuofei, Zhou
xxxxxxxxxx
Introduction
Covid-19
Novel Coronavirus 2019, on 12 January 2020, WHO officially named it 2019-NCOV. Coronaviruses are a large family of viruses known to cause colds and more serious illnesses such as Middle East Respiratory syndrome (MERS) and severe acute respiratory syndrome (SARS). Novel Coronavirus is a novel coronavirus strain that has never been found in humans before. More information is available.百度百科
data
Data from COVID-19 Data Repository by the Center for Systems Science and Engineering (CSSE) at Johns Hopkins University.link
time series covid19 confirmed global.csv.(github link).
time series covid19 deaths global.csv.(github link)
time serise covid19 recoverd global.csv(github link)
cases contry.csv.(github link)
cases time.csv. (github link)
download here:
xxxxxxxxxx
import some packages in julia:
xxxxxxxxxx
xxxxxxxxxx
using DataFrames
xxxxxxxxxx
using CSV
xxxxxxxxxx
using DelimitedFiles
xxxxxxxxxx
using BenchmarkTools
xxxxxxxxxx
using Queryverse
xxxxxxxxxx
using Dates
xxxxxxxxxx
using Plots
xxxxxxxxxx
pgfplotsx()
xxxxxxxxxx
import Plots.plot
xxxxxxxxxx
import PlotlyJS
xxxxxxxxxx
using Flux
xxxxxxxxxx
using Flux:
xxxxxxxxxx
using IterTools: ncycle
xxxxxxxxxx
using Parameters:
xxxxxxxxxx
using WebIO
xxxxxxxxxx
266 rows × 259 columns (omitted printing of 253 columns)
Province/State | Country/Region | Lat | Long | 1/22/20 | 1/23/20 | |
---|---|---|---|---|---|---|
String | String | Float64 | Float64 | Int64 | Int64 | |
1 | Afghanistan | 33.9391 | 67.71 | 0 | 0 | |
2 | Albania | 41.1533 | 20.1683 | 0 | 0 | |
3 | Algeria | 28.0339 | 1.6596 | 0 | 0 | |
4 | Andorra | 42.5063 | 1.5218 | 0 | 0 | |
5 | Angola | -11.2027 | 17.8739 | 0 | 0 | |
6 | Antigua and Barbuda | 17.0608 | -61.7964 | 0 | 0 | |
7 | Argentina | -38.4161 | -63.6167 | 0 | 0 | |
8 | Armenia | 40.0691 | 45.0382 | 0 | 0 | |
9 | Australian Capital Territory | Australia | -35.4735 | 149.012 | 0 | 0 |
10 | New South Wales | Australia | -33.8688 | 151.209 | 0 | 0 |
11 | Northern Territory | Australia | -12.4634 | 130.846 | 0 | 0 |
12 | Queensland | Australia | -27.4698 | 153.025 | 0 | 0 |
13 | South Australia | Australia | -34.9285 | 138.601 | 0 | 0 |
14 | Tasmania | Australia | -42.8821 | 147.327 | 0 | 0 |
15 | Victoria | Australia | -37.8136 | 144.963 | 0 | 0 |
16 | Western Australia | Australia | -31.9505 | 115.861 | 0 | 0 |
17 | Austria | 47.5162 | 14.5501 | 0 | 0 | |
18 | Azerbaijan | 40.1431 | 47.5769 | 0 | 0 | |
⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
xxxxxxxxxx
comfirmed = load("../datasets/time_series_covid19_comfirmed_global.csv") |> DataFrame
266×259 Array{Any,2}: "" "Afghanistan" 33.9391 … 39233 39254 39268 39285 39290 "" "Albania" 41.1533 13391 13518 13649 13806 13965 "" "Algeria" 28.0339 51213 51368 51530 51690 51847 "" "Andorra" 42.5063 1966 1966 2050 2050 2110 "" "Angola" -11.2027 4797 4905 4972 5114 5211 "" "Antigua and Barbuda" 17.0608 … 101 101 101 101 106 "" "Argentina" -38.4161 723132 736609 751001 765002 779689 ⋮ ⋱ ⋮ "" "Vietnam" 14.0583 … 1077 1094 1094 1095 1096 "" "West Bank and Gaza" 31.9522 39121 39541 39899 40322 40766 "" "Western Sahara" 24.2155 10 10 10 10 10 "" "Yemen" 15.5527 2031 2031 2034 2039 2040 "" "Zambia" -13.1339 14660 14715 14759 14802 14830 "" "Zimbabwe" -19.0154 … 7816 7837 7838 7850 7858
1×259 Array{AbstractString,2}: "Province/State" "Country/Region" "Lat" … "9/30/20" "10/1/20" "10/2/20"
xxxxxxxxxx
dt, Header = readdlm("../datasets/time_series_covid19_comfirmed_global.csv", ',', header=true)
266×259 Array{Any,2}: "" "Afghanistan" 33.9391 67.71 … 1455 1458 1458 1458 1458 "" "Albania" 41.1533 20.1683 380 384 387 388 389 "" "Algeria" 28.0339 1.6596 1719 1726 1736 1741 1749 "" "Andorra" 42.5063 1.5218 53 53 53 53 53 "" "Angola" -11.2027 17.8739 176 179 183 185 189 "" "Antigua and Barbuda" 17.0608 -61.7964 … 3 3 3 3 3 "" "Argentina" -38.4161 -63.6167 16113 16519 16937 20288 20599 ⋮ ⋱ ⋮ "" "Vietnam" 14.0583 108.277 … 35 35 35 35 35 "" "West Bank and Gaza" 31.9522 35.2332 299 306 311 318 321 "" "Western Sahara" 24.2155 -12.8858 1 1 1 1 1 "" "Yemen" 15.5527 48.5164 587 587 587 587 589 "" "Zambia" -13.1339 27.8493 332 332 332 333 333 "" "Zimbabwe" -19.0154 29.1549 … 228 228 228 228 228
1×259 Array{AbstractString,2}: "Province/State" "Country/Region" "Lat" … "9/30/20" "10/1/20" "10/2/20"
xxxxxxxxxx
dt_deaths, Header_deaths = readdlm("../datasets/time_series_covid19_deaths_global.csv", ',', header=true)
253×259 Array{Any,2}: "" "Afghanistan" 33.9391 … 32642 32746 32789 32842 32842 "" "Albania" 41.1533 7629 7732 7847 8077 8342 "" "Algeria" 28.0339 35962 36063 36174 36282 36385 "" "Andorra" 42.5063 1265 1265 1432 1432 1540 "" "Angola" -11.2027 1813 1833 1941 2082 2215 "" "Antigua and Barbuda" 17.0608 … 92 92 92 92 94 "" "Argentina" -38.4161 576715 585857 594645 603140 614515 ⋮ ⋱ ⋮ "" "Vietnam" 14.0583 999 1007 1010 1010 1020 "" "West Bank and Gaza" 31.9522 30220 31047 31743 32577 32944 "" "Western Sahara" 24.2155 8 8 8 8 8 "" "Yemen" 15.5527 … 1266 1275 1286 1297 1307 "" "Zambia" -13.1339 13821 13937 13959 13961 13980 "" "Zimbabwe" -19.0154 6112 6122 6303 6312 6322
1×259 Array{AbstractString,2}: "Province/State" "Country/Region" "Lat" … "9/30/20" "10/1/20" "10/2/20"
xxxxxxxxxx
dt_recover,Header_recov = readdlm("../datasets/time_series_covid19_recovered_global.csv",',',header=true)
Analysis
Analysis Global Data
Now, we just use the data to rebuild a new dataframe to store the Global data. I create a new dataframe named as Global_num to store the number of deaths and comfirmed numbers,time from 2020-01-22 to 2020-10-02.
Data Operate
operating as folows:
xxxxxxxxxx
2020-01-22
2020-01-23
2020-01-24
2020-01-25
2020-01-26
2020-01-27
2020-01-28
2020-01-29
2020-01-30
2020-01-31
2020-02-01
2020-02-02
2020-02-03
2020-02-04
2020-02-05
2020-02-06
2020-02-07
2020-02-08
2020-02-09
2020-02-10
2020-02-11
2020-02-12
2020-02-13
2020-02-14
2020-02-15
2020-02-16
2020-02-17
2020-02-18
2020-02-19
2020-02-20
2020-02-21
2020-02-22
2020-02-23
2020-02-24
2020-02-25
2020-02-26
2020-02-27
2020-02-28
2020-02-29
2020-03-01
2020-09-23
2020-09-24
2020-09-25
2020-09-26
2020-09-27
2020-09-28
2020-09-29
2020-09-30
2020-10-01
2020-10-02
xxxxxxxxxx
begin
confirmed_num = []
deaths_num = []
recovered_num = []
for i in 5:259
push!(confirmed_num, sum(dt[:, i]))
push!(deaths_num, sum(dt_deaths[:, i]))
push!(recovered_num, sum(dt_recover[:,i]))
end
dates = Date(2020, 1, 22):Day(1):Date(2020, 10, 2)
end
255 rows × 4 columns
Date | confirmed_num | deaths_num | recovered_num | |
---|---|---|---|---|
Date… | Any | Any | Any | |
1 | 2020-01-22 | 555 | 17 | 28 |
2 | 2020-01-23 | 654 | 18 | 30 |
3 | 2020-01-24 | 941 | 26 | 36 |
4 | 2020-01-25 | 1434 | 42 | 39 |
5 | 2020-01-26 | 2118 | 56 | 52 |
6 | 2020-01-27 | 2927 | 82 | 61 |
7 | 2020-01-28 | 5578 | 131 | 107 |
8 | 2020-01-29 | 6167 | 133 | 126 |
9 | 2020-01-30 | 8235 | 171 | 143 |
10 | 2020-01-31 | 9927 | 213 | 222 |
11 | 2020-02-01 | 12038 | 259 | 284 |
12 | 2020-02-02 | 16787 | 362 | 472 |
13 | 2020-02-03 | 19887 | 426 | 623 |
14 | 2020-02-04 | 23898 | 492 | 852 |
15 | 2020-02-05 | 27643 | 564 | 1124 |
16 | 2020-02-06 | 30803 | 634 | 1487 |
17 | 2020-02-07 | 34396 | 719 | 2011 |
18 | 2020-02-08 | 37130 | 806 | 2616 |
⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
xxxxxxxxxx
Global_num = DataFrame(Date=dates, confirmed_num=confirmed_num, deaths_num=deaths_num, recovered_num=recovered_num)
0.0504505
0.0458716
0.0382572
0.0271967
0.0245515
0.0208405
0.0191825
0.0204313
0.0173649
0.0223633
0.023592
0.028117
0.031327
0.0356515
0.0406613
0.0482745
0.0584661
0.0704552
0.0807769
0.0922631
0.104506
0.113865
0.104253
0.120432
0.136059
0.152523
0.171735
0.190973
0.213094
0.238506
0.245832
0.291163
0.296194
0.317137
0.347081
0.373378
0.402207
0.436407
0.462506
0.483229
0.689543
0.689722
0.690084
0.691662
0.693059
0.694079
0.695173
0.695864
0.695817
0.694844
xxxxxxxxxx
begin
n, = size(confirmed_num)
new_confirmed = []
new_death = []
new_recovered = []
death_rate = deaths_num ./ confirmed_num
recover_rate = recovered_num ./ confirmed_num
for i in 2:n
push!(new_confirmed, confirmed_num[i]-confirmed_num[i-1])
push!(new_death, deaths_num[i] - deaths_num[i-1])
push!(new_recovered, recovered_num[i]-recovered_num[i-1])
end
Global_num.death_rate = death_rate
Global_num.recover_rate = recover_rate
end
Plot show
Then i plot the number of comfirmed cases and deaths cases over time.
As we can see, the number of comfirmed cases continues to increase exponentially. But the number of deaths cases seems to increase linearly.
xxxxxxxxxx
xxxxxxxxxx
p1 = plot(dates, confirmed_num, legend=:none, ylabel="Numbers", xlabel="Date", title="Global comfirmed numbers")
xxxxxxxxxx
p2 = plot(dates, deaths_num, legend=:none, linecolor=:red, ylabel="Numbers", xlabel="Date", title="Global Deaths numbers")
xxxxxxxxxx
xxxxxxxxxx
begin
p3 = plot(dates, [confirmed_num deaths_num recovered_num], label=["Confirmed" "Deaths" "recovered"], legend=:topleft)
l = ([a [b;c;d]])
plot(p3, p1, p2,p_re, layout=l,xticks = [Date(2020, 1, 22), Date(2020,10,2)],size=(700,400), ylabel="Numbers", xlabel="Date", titlefontsize=10, xaxis=(font(8)))
end
Now, start calculate the New cases every day,and the deaths rate.
xxxxxxxxxx
xxxxxxxxxx
p4 = plot(Date(2020, 1, 23):Day(1):Date(2020, 10, 2),new_confirmed,shape=:circle, legend=:topleft, label="new case", xlabel="Date", ylabel="Numbers", title="new cases every day")
xxxxxxxxxx
p5 = plot(Date(2020,1,23):Day(1):Date(2020,10,2), new_death,linecolor=:red,shape=:circle, legend=:topleft, label="new death", xlabel="Date", ylabel="Numbers", title="New death every day")
xxxxxxxxxx
p6 = plot(Date(2020,1,23):Day(1):Date(2020,10,2), new_recovered,shape=:circle,linecolor=:green, legend=:topleft, label="new recovered", xlabel="Date", ylabel="Numbers", title="New recoverd every day")
1 rows × 6 columns
Date | confirmed_num | deaths_num | recovered_num | death_rate | recover_rate | |
---|---|---|---|---|---|---|
Date… | Any | Any | Any | Float64 | Float64 | |
1 | 2020-04-29 | 3190735 | 230657 | 948318 | 0.0722896 | 0.29721 |
xxxxxxxxxx
Global_num[Global_num.death_rate .== maximum(Global_num.death_rate), :]
xxxxxxxxxx
begin
plot(Date(2020, 1, 22):Day(1):Date(2020, 10, 2),death_rate, linecolor=:red, title="Death rate", xlabel="date", ylabel="Numbers", legend=:none, ylims=(0,0.08))
plot!([Date(2020,1,22),Date(2020,4,29),Date(2020,4,29)], [maximum(Global_num.death_rate),maximum(Global_num.death_rate), 0],
line=:dot, linecolor=:black, annotations=[(Date(2020,4,29), 0.075, text("max death rate: 0.0723", 10))])
end
xxxxxxxxxx
the maximum death rate in 2020-4-29
So, the new comfirmed cases continues to rise, the death rate is already falling.
xxxxxxxxxx
Prediction
Global Trend:
It is useful to understand the global trend of an increase in the number of cases over time. There is always a pattern in any data, but the concern is how strongly data follows a pattern. COVID-19 spreads exponentially.
i think of some ways to estimate the curve:
Numerical Analysis: ❎
linear regression, after transmission: ✅
neural network: ✅
So, we first focus on comfirmed case:
do
xxxxxxxxxx
xxxxxxxxxx
begin
#transition
x = 0:n-1
y = Global_num.confirmed_num
y₁ = sqrt.(y)
X = [x ones(n)]
β = inv(X'*X)*X'*y₁
ŷ = (X*β).^2
plot(dates,Global_num.confirmed_num, label="real")
plot!(dates, ŷ, label="predict", annotations=[(Date(2020,4,22), 30000000, text("predict function: y=(24.77t - 584.29)²", 10))])
end
Other ways: Neural Network
import Flux
to do meachine learning.
the all code here:
using Flux, Statistics
using Flux.Data: DataLoader
using Flux: throttle
using Parameters: @with_kw
using DelimitedFiles
using IterTools: ncycle
using Dates
using DataFrames
using CSV
using Plots
@with_kw mutable struct Args
η::Float64 = 0.001
batchsize::Int = 1
epochs::Int = 1000
end
cd(@__DIR__)
pwd()
#read data:
dt, Header = readdlm("time_series_covid19_comfirmed_global.csv", ',', header=true)
dt_deaths, Header_deaths = readdlm("time_series_covid19_deaths_global.csv", ',', header=true)
dt_recover,Header_recov = readdlm("time_series_covid19_recovered_global.csv",',',header=true)
#create a new datafram to store datum
comfirmed_num = []
deaths_num = []
recovered_num = []
for i in 5:259
push!(comfirmed_num, sum(dt[:, i]))
push!(deaths_num, sum(dt_deaths[:, i]))
push!(recovered_num, sum(dt_recover[:,i]))
end
dates = Date(2020, 1, 22):Day(1):Date(2020, 10, 2)
Global_num = DataFrame(Date=dates,
comfirmed_num=comfirmed_num,
deaths_num=deaths_num,
recovered_num=recovered_num)
#read train_data
n, = size(comfirmed_num)
x = 0:n-1
y = Global_num.comfirmed_num
args = Args()
train_data = DataLoader((Array(x), Float64.(y)), batchsize=args.batchsize)
# define leaky relu
Lelu(x, α=100) = (x ≥ 0 ? x : x/α)
#define Model
m = Chain(
Dense(1, 40, Lelu),
Dense(40, 40, Lelu),
Dense(40, 40, Lelu),
Dense(40, 1, Lelu)
)
#define loss function
loss(x, y) = Flux.mse(m(x), y)
#define parameters
ps = Flux.params(m)
#define Opt
opt = ADAM(args.η)
#train model
Flux.train!(loss, ps, ncycle(train_data, args.epochs), opt)
#visualize
flux_y = []
for i in Array(x)
push!(flux_y, Array(m([i]))[1])
end
flux_y = Float64.(flux_y)
plot(dates, [flux_y Float64.(y)],
label=["predict" "real"], xlabel="date", ylabel="Numbers", size=(900, 600))
xxxxxxxxxx
md"""
Other ways: _**Neural Network**_
`import Flux` to do meachine learning.
the all code here:
```julia
using Flux, Statistics
using Flux.Data: DataLoader
using Flux: throttle
using Parameters: @with_kw
using DelimitedFiles
using IterTools: ncycle
using Dates
using DataFrames
using CSV
using Plots
@with_kw mutable struct Args
η::Float64 = 0.001
batchsize::Int = 1
epochs::Int = 1000
end
cd(@__DIR__)
pwd()
#read data:
dt, Header = readdlm("time_series_covid19_comfirmed_global.csv", ',', header=true)
dt_deaths, Header_deaths = readdlm("time_series_covid19_deaths_global.csv", ',', header=true)
dt_recover,Header_recov = readdlm("time_series_covid19_recovered_global.csv",',',header=true)
#create a new datafram to store datum
comfirmed_num = []
deaths_num = []
recovered_num = []
for i in 5:259
push!(comfirmed_num, sum(dt[:, i]))
push!(deaths_num, sum(dt_deaths[:, i]))
push!(recovered_num, sum(dt_recover[:,i]))
end
dates = Date(2020, 1, 22):Day(1):Date(2020, 10, 2)
Global_num = DataFrame(Date=dates,
comfirmed_num=comfirmed_num,
deaths_num=deaths_num,
recovered_num=recovered_num)
#read train_data
n, = size(comfirmed_num)
x = 0:n-1
y = Global_num.comfirmed_num
args = Args()
train_data = DataLoader((Array(x), Float64.(y)), batchsize=args.batchsize)
# define leaky relu
Lelu(x, α=100) = (x ≥ 0 ? x : x/α)
#define Model
m = Chain(
Dense(1, 40, Lelu),
Dense(40, 40, Lelu),
Dense(40, 40, Lelu),
Dense(40, 1, Lelu)
)
#define loss function
loss(x, y) = Flux.mse(m(x), y)
#define parameters
ps = Flux.params(m)
#define Opt
opt = ADAM(args.η)
#train model
Flux.train!(loss, ps, ncycle(train_data, args.epochs), opt)
#visualize
flux_y = []
for i in Array(x)
push!(flux_y, Array(m([i]))[1])
end
flux_y = Float64.(flux_y)
plot(dates, [flux_y Float64.(y)],
label=["predict" "real"], xlabel="date", ylabel="Numbers", size=(900, 600))
```
"""
predict_curve (generic function with 4 methods)
xxxxxxxxxx
#write a function
function predict_curve(x, y, η::Float64=0.001, epochs::Int=1000, batchsize::Int=1)
dates = Date(2020, 1, 22):Day(1):Date(2020, 10, 2)
#prepare data
train_data = Flux.Data.DataLoader((x, y), batchsize=batchsize)
#define leaky relu
Lelu(x, α=100) = (x ≥ 0 ? x : x/α)
#define model
m = Chain(
Dense(1, 40, Lelu),
Dense(40, 40, Lelu),
Dense(40, 40, Lelu),
Dense(40, 1, Lelu))
#define mse
loss(x, y) = Flux.mse(m(x), y)
#parameters
ps = Flux.params(m)
opt = ADAM(η)
Flux.train!(loss, ps, ncycle(train_data, epochs), opt)
flux_y = []
for i in Array(x)
push!(flux_y, Array(m([i]))[1])
end
plot(dates, [Float64.(flux_y) Float64.(y)],label=["predict" "real"], xlabel="date", ylabel="Numbers", legend=:topleft)
end
xxxxxxxxxx
predict_curve(Array(0:254), Float64.(Global_num.confirmed_num))
xxxxxxxxxx
predict_curve(Array(0:254), Float64.(Global_num.deaths_num))
xxxxxxxxxx
predict_curve(Array(0:254), Float64.(Global_num.recovered_num))
Analysis country data
consider analyzing the situation in different countries.
xxxxxxxxxx
md"
### Analysis country data
consider analyzing the situation in different countries.
"
188 rows × 14 columns (omitted printing of 7 columns)
Country_Region | Last_Update | Lat | Long_ | Confirmed | Deaths | Recovered | |
---|---|---|---|---|---|---|---|
String | String | Float64? | Float64? | Float64 | Float64 | Int64? | |
1 | Afghanistan | 2020-10-04 04:23:44 | 33.9391 | 67.71 | 39297.0 | 1462.0 | 32842 |
2 | Albania | 2020-10-04 04:23:44 | 41.1533 | 20.1683 | 14117.0 | 392.0 | 8536 |
3 | Algeria | 2020-10-04 04:23:44 | 28.0339 | 1.6596 | 51995.0 | 1756.0 | 36482 |
4 | Andorra | 2020-10-04 04:23:44 | 42.5063 | 1.5218 | 2110.0 | 53.0 | 1540 |
5 | Angola | 2020-10-04 04:23:44 | -11.2027 | 17.8739 | 5370.0 | 193.0 | 2436 |
6 | Antigua and Barbuda | 2020-10-04 04:23:44 | 17.0608 | -61.7964 | 107.0 | 3.0 | 96 |
7 | Argentina | 2020-10-04 04:23:44 | -38.4161 | -63.6167 | 790818.0 | 20795.0 | 626114 |
8 | Armenia | 2020-10-04 04:23:44 | 40.0691 | 45.0382 | 51925.0 | 972.0 | 44583 |
9 | Australia | 2020-10-04 04:23:44 | -25.0 | 133.0 | 27135.0 | 894.0 | 24864 |
10 | Austria | 2020-10-04 04:23:44 | 47.5162 | 14.5501 | 47432.0 | 809.0 | 38045 |
11 | Azerbaijan | 2020-10-04 04:23:44 | 40.1431 | 47.5769 | 40561.0 | 595.0 | 38354 |
12 | Bahamas | 2020-10-04 04:23:44 | 25.0259 | -78.0359 | 4332.0 | 96.0 | 2375 |
13 | Bahrain | 2020-10-04 04:23:44 | 26.0275 | 50.55 | 72310.0 | 258.0 | 66813 |
14 | Bangladesh | 2020-10-04 04:23:44 | 23.685 | 90.3563 | 367565.0 | 5325.0 | 280069 |
15 | Barbados | 2020-10-04 04:23:44 | 13.1939 | -59.5432 | 196.0 | 7.0 | 182 |
16 | Belarus | 2020-10-04 04:23:44 | 53.7098 | 27.9534 | 79852.0 | 851.0 | 75148 |
17 | Belgium | 2020-10-04 04:23:44 | 50.8333 | 4.46994 | 127623.0 | 10044.0 | 19645 |
18 | Belize | 2020-10-04 04:23:44 | 17.1899 | -88.4976 | 2080.0 | 28.0 | 1290 |
⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
xxxxxxxxxx
dt_country = CSV.read("../datasets/cases_country.csv")
188 rows × 14 columns (omitted printing of 9 columns)
Country_Region | Last_Update | Lat | Long_ | Confirmed | |
---|---|---|---|---|---|
String | String | Float64? | Float64? | Float64 | |
1 | US | 2020-10-04 04:23:44 | 40.0 | -100.0 | 7.38219e6 |
2 | India | 2020-10-04 04:23:44 | 20.5937 | 78.9629 | 6.47354e6 |
3 | Brazil | 2020-10-04 04:23:44 | -14.235 | -51.9253 | 4.90683e6 |
4 | Russia | 2020-10-04 04:23:44 | 61.524 | 105.319 | 1.19866e6 |
5 | Colombia | 2020-10-04 04:23:44 | 4.5709 | -74.2973 | 848147.0 |
6 | Peru | 2020-10-04 04:23:44 | -9.19 | -75.0152 | 821564.0 |
7 | Argentina | 2020-10-04 04:23:44 | -38.4161 | -63.6167 | 790818.0 |
8 | Spain | 2020-10-04 04:23:44 | 40.4637 | -3.74922 | 789932.0 |
9 | Mexico | 2020-10-04 04:23:44 | 23.6345 | -102.553 | 757953.0 |
10 | South Africa | 2020-10-04 04:23:44 | -30.5595 | 22.9375 | 679716.0 |
11 | France | 2020-10-04 04:23:44 | 46.2276 | 2.2137 | 629509.0 |
12 | United Kingdom | 2020-10-04 04:23:44 | 55.0 | -3.0 | 482654.0 |
13 | Chile | 2020-10-04 04:23:44 | -35.6751 | -71.543 | 468471.0 |
14 | Iran | 2020-10-04 04:23:44 | 32.4279 | 53.688 | 468119.0 |
15 | Iraq | 2020-10-04 04:23:44 | 33.2232 | 43.6793 | 375931.0 |
16 | Bangladesh | 2020-10-04 04:23:44 | 23.685 | 90.3563 | 367565.0 |
17 | Saudi Arabia | 2020-10-04 04:23:44 | 23.8859 | 45.0792 | 335997.0 |
18 | Turkey | 2020-10-04 04:23:44 | 38.9637 | 35.2433 | 323014.0 |
⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
xxxxxxxxxx
sort(dt_country, [:Confirmed], rev=true)
188 rows × 14 columns (omitted printing of 9 columns)
Country_Region | Last_Update | Lat | Long_ | Confirmed | |
---|---|---|---|---|---|
String | String | Float64? | Float64? | Float64 | |
1 | US | 2020-10-04 04:23:44 | 40.0 | -100.0 | 7.38219e6 |
2 | India | 2020-10-04 04:23:44 | 20.5937 | 78.9629 | 6.47354e6 |
3 | Brazil | 2020-10-04 04:23:44 | -14.235 | -51.9253 | 4.90683e6 |
4 | Russia | 2020-10-04 04:23:44 | 61.524 | 105.319 | 1.19866e6 |
5 | Colombia | 2020-10-04 04:23:44 | 4.5709 | -74.2973 | 848147.0 |
6 | Peru | 2020-10-04 04:23:44 | -9.19 | -75.0152 | 821564.0 |
7 | Argentina | 2020-10-04 04:23:44 | -38.4161 | -63.6167 | 790818.0 |
8 | Spain | 2020-10-04 04:23:44 | 40.4637 | -3.74922 | 789932.0 |
9 | Mexico | 2020-10-04 04:23:44 | 23.6345 | -102.553 | 757953.0 |
10 | South Africa | 2020-10-04 04:23:44 | -30.5595 | 22.9375 | 679716.0 |
11 | France | 2020-10-04 04:23:44 | 46.2276 | 2.2137 | 629509.0 |
12 | United Kingdom | 2020-10-04 04:23:44 | 55.0 | -3.0 | 482654.0 |
13 | Chile | 2020-10-04 04:23:44 | -35.6751 | -71.543 | 468471.0 |
14 | Iran | 2020-10-04 04:23:44 | 32.4279 | 53.688 | 468119.0 |
15 | Iraq | 2020-10-04 04:23:44 | 33.2232 | 43.6793 | 375931.0 |
16 | Bangladesh | 2020-10-04 04:23:44 | 23.685 | 90.3563 | 367565.0 |
17 | Saudi Arabia | 2020-10-04 04:23:44 | 23.8859 | 45.0792 | 335997.0 |
18 | Turkey | 2020-10-04 04:23:44 | 38.9637 | 35.2433 | 323014.0 |
⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
xxxxxxxxxx
dt_country