본문 바로가기
Programming

Coronavirus(COVID-19) in the US Prediction after 2 weeks and 1 month with Java(3rd 2020-06-12)

by WelcomeBro 2020. 6. 12.
반응형

Hey global~! 


World will beat Corona Virus! Cheer up! World!

 

2020-05-27  ->  2020-06-10 


World Confirmed : 5588299.0  ->  7237093.0 
World Confirmed increase : 1648794.0 
World Confirmed increase rate : 29.50% 


US Confirmed : 1680625.0  ->  1979089.0 
US Confirmed increase : 298464.0 
US Confirmed increase rate: 17.76% 


World Death : 350423.0  ->  411177.0 
World Death increase : 60754.0 
World Death increase rate : 17.34% 


US Death : 98902.0  ->  111979.0 
US Death increase : 13077.0 
US Death increase rate : 13.22% 

 

In this speed,

 

After 2 weeks

2020-06-24(Prediction)

World Confirmed : 9,372,035

US Confirmed : 23330575

World Death : 482,475

US Death : 126,782

 

After 1 month

2020-07-08(Prediction)

World Confirmed : 12,136,785

US Confirmed : 2,745,184

World Death : 566,136

US Death : 143,542

 

******************comparison******************


2020-06-12  ->  2020-06-24(Prediction)


World Confirmed : 7514473.0  ->  9372035.0
World Confirmed increase : 1857562.0

 

US Confirmed : 2023385.0  ->  2333057.0
US Confirmed increase : 309672.0

 

World Death : 421032.0  ->  482475.0
World Death increase : 61443.0

 

US Death : 113818.0  ->  126782.0
US Death increase : 12964.0

******************comparison******************


2020-06-12  ->  2020-07-08(Prediction)


World Confirmed : 7514473.0  ->  1.2136785E7
World Confirmed increase : 4622312.0

 

US Confirmed : 2023385.0  ->  2745184.0
US Confirmed increase : 721799.0

 

World Death : 421032.0  ->  566136.0
World Death increase : 145104.0

 

US Death : 113818.0  ->  143542.0
US Death increase : 29724.0

 

There are lots of mathematical error.

 

Data 2020-05-27 are here!

https://heyglobal.tistory.com/10

Data 2020-06-10 are here!

https://heyglobal.tistory.com/11

 

Numbers are from https://coronavirus.jhu.edu/map.html

 

COVID-19 Map

Coronavirus COVID-19 Global Cases by the Center for Systems Science and Engineering (CSSE) at Johns Hopkins University (JHU)

coronavirus.jhu.edu

Comment anything! I want to discuss with you!

 

Here is the code!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
public class CoronaVirus {
 
    public static void main(String[] args) {
//        date d0527 = new date("2020-05-27", 5588299, 1680625,350423,98902);
        date d0610 = new date("2020-06-10"72370931979089,411177,111979);
        date d0612 = new date("2020-06-12"75144732023385,421032,113818);
        date p0624 = new date("2020-06-24(Prediction)"93720352333057482475126782);
        date p0708 = new date("2020-07-08(Prediction)"121367852745184566136143542);
        
        d0612.print();
        d0612.comparison(d0612, p0624);
        d0610.comparison(d0612, p0708);
        
    }
 
}
 
class date {
    double WorldConfirmed;
    double USConfirmed;
    double WorldDeath;
    double USDeath;
    String today;
    double DeathWithoutUS;
    double ConfirmedWithoutUS;
 
    date(String today, double WorldConfirmed, double USConfirmed, double WorldDeath, double USDeath) {
        this.today = today;
        this.WorldConfirmed = WorldConfirmed;
        this.USConfirmed = USConfirmed;
        this.WorldDeath = WorldDeath;
        this.USDeath = USDeath;
        this.DeathWithoutUS = WorldDeath - USDeath;
        this.ConfirmedWithoutUS = WorldConfirmed - USConfirmed;
    }
    
    void print() {
        System.out.println(today);
        System.out.println("World total confirmed : " + WorldConfirmed);
        System.out.println("US total confirmed : " + USConfirmed);
        System.out.println("Total confirmed without US  : " + ConfirmedWithoutUS);
        System.out.println("US confirmed/World confirmed  : "
                + String.format("%,.2f", (USConfirmed / WorldConfirmed) * 100+ "%");
        System.out.println("Total confirmed without US/World confirmed : "
                + String.format("%,.2f", (ConfirmedWithoutUS / WorldConfirmed) * 100+ "%");
        System.out.println("Global Deaths : " + WorldDeath);
        System.out.println("US Deaths : " + USDeath);
        System.out.println("Global Deaths without US : " + DeathWithoutUS);
        System.out.println(
                "Death rate of US : " + String.format("%,.2f", (USDeath / USConfirmed) * 100+ "%");
        System.out.println("Death rate of Global without US : "
                + String.format("%,.2f", (DeathWithoutUS / ConfirmedWithoutUS) * 100+ "%");
        System.out.println(
                "Death rate of Global : " + String.format("%,.2f", (WorldDeath / WorldConfirmed) * 100+ "%");
    }
    void comparison(date a, date b) {
        System.out.println("******************comparison******************");
        System.out.println(a.today+"  ->  "+b.today);
        System.out.println("World Confirmed : " + a.WorldConfirmed + "  ->  " + b.WorldConfirmed);
        System.out.println("World Confirmed increase : " + (b.WorldConfirmed - a.WorldConfirmed));
        System.out.println("World Confirmed increase rate : "
                + String.format("%,.2f", ((((b.WorldConfirmed - a.WorldConfirmed) / a.WorldConfirmed))) * 100)
                + "%");
        System.out.println("US Confirmed : " + a.USConfirmed + "  ->  " + b.USConfirmed);
        System.out.println("US Confirmed increase : " + (b.USConfirmed - a.USConfirmed));
        System.out.println("US Confirmed increase rate: "
                + String.format("%,.2f", (((b.USConfirmed - a.USConfirmed) / a.USConfirmed)) * 100)
                + "%");
        System.out.println("World Death : " + a.WorldDeath + "  ->  " + b.WorldDeath);
        System.out.println("World Death increase : " + (b.WorldDeath - a.WorldDeath));
        System.out.println("World Death increase rate : "
                + String.format("%,.2f", (((b.WorldDeath - a.WorldDeath) / a.WorldDeath)) * 100+ "%");
        System.out.println("US Death : " + a.USDeath + "  ->  " + b.USDeath);
        
        System.out.println("US Death increase : " + (b.USDeath - a.USDeath));
        System.out.println("US Death increase rate : "
                + String.format("%,.2f", (((b.USDeath - a.USDeath) / a.USDeath)) * 100+ "%");
        System.out.println(
                "Death rate of World : " + String.format("%,.2f", (a.WorldDeath / a.WorldConfirmed) * 100+ "%"+"  ->  "+String.format("%,.2f", (b.WorldDeath / b.WorldConfirmed) * 100+ "%");
        System.out.println(
                "Death rate of US : " + String.format("%,.2f", (a.USDeath / a.USConfirmed) * 100+ "%"+"  ->  "+String.format("%,.2f", (b.USDeath / b.USConfirmed) * 100+ "%");
    }
 
}
cs
반응형