-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstate_list.py
127 lines (106 loc) · 5.97 KB
/
state_list.py
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import flask
from flask_caching import Cache
import plotly.graph_objects as go
import plotly.express as px
import dash
import dash_table
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
from dash.dependencies import State, Input, Output
import dash_daq as daq
from utils import dash_reusable_components as drc
import numpy as np
import pandas as pd
import json
import os
import random
state_map = {
"IN": {"state": "India", "lat": 20.5937, "long": 78.9629, "zoom": 3},
"AN": {"state": "Andaman and Nicobar Islands", "lat": 12.698214530944824, "long": 92.85771179199219, "zoom": 5},
"AP": {"state": "Andhra Pradesh", "lat": 15.9240905, "long": 80.1863809, "zoom": 5},
"AR": {"state": "Arunachal Pradesh", "lat": 28.0937702, "long": 94.5921326, "zoom": 5.5},
"AS": {"state": "Assam", "lat": 26.4073841, "long": 93.2551303, "zoom": 5},
"BR": {"state": "Bihar", "lat": 25.6440845, "long": 85.906508, "zoom": 5.3},
"CG": {"state": "Chandigarh", "lat": 30.7334421, "long": 76.7797143, "zoom": 10},
"CT": {"state": "Chhattisgarh", "lat": 21.295132, "long": 81.828232, "zoom": 5.1},
"DN": {"state": "Dadra and Nagar Haveli and Daman and Diu", "lat": 20.7179857, "long": 70.9323992, "zoom": 5.5},
"DL": {"state": "Delhi", "lat": 28.6517178, "long": 77.2219388, "zoom": 8},
"GA": {"state": "Goa", "lat": 15.3004543, "long": 74.0855134, "zoom": 7},
"GJ": {"state": "Gujarat", "lat": 22.309425, "long": 72.136230, "zoom": 5},
"HR": {"state": "Haryana", "lat": 29.238478, "long": 76.431885, "zoom": 6},
"HP": {"state": "Himachal Pradesh", "lat": 32.084206, "long": 77.571167, "zoom": 6},
"JK": {"state": "Jammu and Kashmir", "lat": 33.5574473, "long": 75.06152, "zoom": 6.2},
"JH": {"state": "Jharkhand", "lat": 23.4559809, "long": 85.2557301, "zoom": 5.5},
"KA": {"state": "Karnataka", "lat": 15.317277, "long": 75.713890, "zoom": 5},
"KL": {"state": "Kerala", "lat": 10.850516, "long": 76.271080, "zoom": 5.3},
"LA": {"state": "Ladakh", "lat": 34.9456407, "long": 76.1568576, "zoom": 5},
"MP": {"state": "Madhya Pradesh", "lat": 23.473324, "long": 78.347998, "zoom": 4.8},
"MH": {"state": "Maharashtra", "lat": 19.601194, "long": 77.152979, "zoom": 4.8},
"MN": {"state": "Manipur", "lat": 24.7208818, "long": 93.9229386, "zoom": 5},
"ML": {"state": "Meghalaya", "lat": 25.5379432, "long": 91.2999102, "zoom": 6},
"MZ": {"state": "Mizoram", "lat": 23.2146169, "long": 92.8687612, "zoom": 6.5},
"NL": {"state": "Nagaland", "lat": 26.1630556, "long": 94.5884911, "zoom": 5},
"OR": {"state": "Odisha", "lat": 20.940920, "long": 84.803467, "zoom": 5},
"PY": {"state": "Puducherry", "lat": 11.941552, "long": 79.808289, "zoom": 8},
"PB": {"state": "Punjab", "lat": 31.147129, "long": 75.341217, "zoom": 6.2},
"RJ": {"state": "Rajasthan", "lat": 27.891277, "long": 74.432617, "zoom": 4.5},
"SK": {"state": "Sikkim", "lat": 27.606001, "long": 88.473167, "zoom": 5},
"TN": {"state": "Tamil Nadu", "lat": 11.059821, "long": 78.387451, "zoom": 5},
"TG": {"state": "Telangana", "lat": 17.123184, "long": 79.208824, "zoom": 5},
"TR": {"state": "Tripura", "lat": 23.745127, "long": 23.745127, "zoom": 5},
"UP": {"state": "Uttar Pradesh", "lat": 26.244156, "long": 92.537842, "zoom": 5},
"UT": {"state": "Uttarakhand", "lat": 30.379910, "long": 78.877386, "zoom": 6},
"WB": {"state": "West Bengal", "lat": 23.578624, "long": 87.747803, "zoom": 5},
}
with open('./data/states-and-districts.json') as dist_json:
state_districts_data = json.load(dist_json)
def get_state_map():
return state_map
def get_state_list():
return list(state_map.keys())
def get_state_districts_data():
return state_districts_data
# DATA
# Percentage Population Vaccinated
vaccinated = {
'Bengaluru (Bangalore) Urban_v0' : [403, 433, 417, 330, 310, 265, 289, 340, 316, 317, 344],
'Bengaluru (Bangalore) Urban_v1' : [403, 433, 417, 330, 310, 254, 279, 324, 302, 313, 323],
'Bengaluru (Bangalore) Urban_v3' : [329, 405, 348, 310, 263, 215, 266, 285, 263, 273, 284],
'Bengaluru (Bangalore) Urban_v5' : [63, 105, 72, 77, 80, 69, 75, 102, 66, 63, 68],
'Bengaluru (Bangalore) Urban_v9' : [0, 31, 7, 16, 38, 21, 26, 48, 12, 5, 4],
'Chittoor_v0' : [60, 46, 53, 44, 30, 27, 20, 22, 26, 24, 23],
'Chittoor_v1' : [64, 65, 56, 52, 52, 52, 53, 59, 51, 49, 46],
'Chittoor_v3' : [54, 45, 46, 42, 42, 42, 33, 36, 38, 39, 36],
'Chittoor_v5' : [48, 39, 31, 27, 26, 24, 25, 23, 23, 22, 23],
'Chittoor_v9' : [42, 41, 42, 35, 31, 30, 28, 22, 20, 18, 15]
}
# Next 10 day recover / new
recover = {
'KA_10' : [347763.0 ,347555.0 ,347608.0 ,346345.0 ,347555.0 ,347555.0 ,347555.0 ,347555.0 ,347555.0 ,347555.0 ],
'AP_10' : [52.0, 40.0, 30.0, 100.0, 120.0, 57.0, 130.0, 100.0, 80.0],
'KA_30' : [351497, 354004, 358553, 359801, 360724, 362231, 363807, 364787, 365578, 366445,
366888, 368502, 368992, 369701, 370386, 371081, 371879, 372479, 372970, 373724,
374378, 375221, 375985, 376835, 377443, 377906, 378208, 378936, 378936],
'AP_30' : [97, 65, 102, 102, 99, 111, 37, 107, 81, 142, 95, 85, 110, 35, 70, 74, 64, 82, 31, 127, 41, 75, 86, 66, 49, 54, 92, 29]
}
new = {
'KA_10' : [234.0 ,206.0 ,335.0 ,219.0 ,210.0 ,206.0 ,155.0 ,119.0 ,100.0 ,75.0],
# 'AP_10' : [51.0 ,54.0 ,55.0 ,55.0 ,53.0 ,53.0 ,52.0 ,52.0 ,52.0 ,52.0],
'AP_10' : [61.0 ,44.0 ,65.0 ,55.0 ,53.0 ,33.0 ,42.0 ,32.0 ,32.0 ,42.0],
'KA_30' : [638, 728, 701, 659, 606, 672, 369, 673, 676, 689, 687, 586, 659, 363,
585, 550, 642, 578, 471, 542, 309, 370, 554, 554, 464, 343, 464, 298,
300],
'AP_30' : [ 76, 76, 95, 108, 89, 104, 43, 88, 89, 130, 98, 87, 80, 46,
86, 64, 54, 81, 39, 105, 42, 52, 50, 65, 44, 59, 56, 21,
82]
}
vaccine_list = ['CoVaxin', 'CoviShield']
def get_new():
return new
def get_recover():
return recover
def get_vaccinated():
return vaccinated
def get_vaccine_list():
return vaccine_list