├── .all-contributorsrc
├── .babelrc
├── .gitignore
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── _redirects
├── assets
├── images
│ ├── add_to_hs
│ │ ├── android-icon-144x144.png
│ │ ├── android-icon-192x192.png
│ │ ├── android-icon-36x36.png
│ │ ├── android-icon-48x48.png
│ │ ├── android-icon-72x72.png
│ │ ├── android-icon-96x96.png
│ │ ├── apple-icon-114x114.png
│ │ ├── apple-icon-120x120.png
│ │ ├── apple-icon-144x144.png
│ │ ├── apple-icon-152x152.png
│ │ ├── apple-icon-180x180.png
│ │ ├── apple-icon-57x57.png
│ │ ├── apple-icon-60x60.png
│ │ ├── apple-icon-72x72.png
│ │ ├── apple-icon-76x76.png
│ │ ├── apple-icon-precomposed.png
│ │ ├── apple-icon.png
│ │ ├── browserconfig.xml
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ ├── favicon-96x96.png
│ │ ├── favicon.ico
│ │ ├── manifest.json
│ │ ├── ms-icon-144x144.png
│ │ ├── ms-icon-150x150.png
│ │ ├── ms-icon-310x310.png
│ │ └── ms-icon-70x70.png
│ ├── covid.png
│ ├── github.png
│ ├── up_green_arrow.png
│ ├── up_red_arrow.png
│ └── world.png
└── styles
│ └── sass
│ └── styles.scss
├── config
└── copy-to-dist.js
├── package.json
├── postcss.config.js
├── src
├── index.html
└── js
│ ├── About.js
│ ├── App.js
│ ├── Countries.js
│ ├── Country.js
│ ├── CountrySelector.js
│ ├── GitHub.js
│ ├── Home.js
│ ├── HomePageSelctor.js
│ ├── IndiaDistrict.js
│ ├── IndiaState.js
│ ├── IndiaStateCharts.js
│ ├── Information.js
│ ├── News.js
│ ├── NotFoundPage.js
│ ├── Notification.js
│ ├── World.js
│ ├── actions
│ ├── covidAction.js
│ └── timeseriesAction.js
│ ├── charts
│ └── RadarCovidChart.js
│ ├── covid-all
│ ├── CompareWidget.js
│ ├── CountryCasesWidget.js
│ ├── CountryTestCase.js
│ ├── OverAllWidget.js
│ ├── StateIndiaMostConfirmed.js
│ ├── StateIndiaMostDeaths.js
│ ├── StateIndiaMostRadialSpreads.js
│ ├── StateIndiaRecoveryProgress.js
│ ├── TopNDeathWidget.js
│ ├── TopNRecoveredWidget.js
│ └── TopNTodayDeath.js
│ ├── index.js
│ ├── reducers
│ ├── covid19Reducer.js
│ ├── index.js
│ └── timeseriesReducer.js
│ ├── store
│ ├── index.js
│ └── store.js
│ ├── time-series
│ ├── FetchTimeSeries.js
│ ├── IndiaDistrictTrend.js
│ ├── TimeSeries.js
│ ├── TimeSeriesBroken.js
│ └── TimeSeriesPercentage.js
│ ├── useFetch.js
│ └── utils
│ ├── color_codes.js
│ ├── country_code.js
│ ├── india_state_codes.js
│ ├── top-headlines.json
│ └── url.js
├── webpack.config.js
└── yarn.lock
/.all-contributorsrc:
--------------------------------------------------------------------------------
1 | {
2 | "files": [
3 | "README.md"
4 | ],
5 | "imageSize": 100,
6 | "commit": false,
7 | "contributors": [
8 | {
9 | "login": "atapas",
10 | "name": "Tapas Adhikary",
11 | "avatar_url": "https://avatars1.githubusercontent.com/u/3633137?v=4",
12 | "profile": "https://tapasadhikary.com",
13 | "contributions": [
14 | "code"
15 | ]
16 | },
17 | {
18 | "login": "nirmalkc",
19 | "name": "Nirmal Kumar",
20 | "avatar_url": "https://avatars1.githubusercontent.com/u/6359059?v=4",
21 | "profile": "https://github.com/nirmalkc",
22 | "contributions": [
23 | "bug"
24 | ]
25 | },
26 | {
27 | "login": "SauravKanchan",
28 | "name": "Saurav Kanchan",
29 | "avatar_url": "https://avatars3.githubusercontent.com/u/21256638?v=4",
30 | "profile": "https://saurav.tech/",
31 | "contributions": [
32 | "code"
33 | ]
34 | },
35 | {
36 | "login": "NagarjunShroff",
37 | "name": "NagarjunShroff",
38 | "avatar_url": "https://avatars1.githubusercontent.com/u/37444771?v=4",
39 | "profile": "https://github.com/NagarjunShroff",
40 | "contributions": [
41 | "code"
42 | ]
43 | }
44 | ],
45 | "contributorsPerLine": 7,
46 | "projectName": "covid-19",
47 | "projectOwner": "atapas",
48 | "repoType": "github",
49 | "repoHost": "https://github.com",
50 | "skipCi": true
51 | }
52 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "@babel/preset-env",
4 | "@babel/preset-react"
5 | ],
6 | "plugins": [
7 | ["@babel/transform-runtime"]
8 | ]
9 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | # Runtime data
9 | pids
10 | *.pid
11 | *.seed
12 | *.pid.lock
13 |
14 | # Directory for instrumented libs generated by jscoverage/JSCover
15 | lib-cov
16 |
17 | # Coverage directory used by tools like istanbul
18 | coverage
19 |
20 | # nyc test coverage
21 | .nyc_output
22 |
23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24 | .grunt
25 |
26 | # Bower dependency directory (https://bower.io/)
27 | bower_components
28 |
29 | # node-waf configuration
30 | .lock-wscript
31 |
32 | # Compiled binary addons (https://nodejs.org/api/addons.html)
33 | build/Release
34 | dist
35 |
36 | # Dependency directories
37 | node_modules/
38 | jspm_packages/
39 |
40 | # TypeScript v1 declaration files
41 | typings/
42 |
43 | # Optional npm cache directory
44 | .npm
45 |
46 | # Optional eslint cache
47 | .eslintcache
48 |
49 | # Optional REPL history
50 | .node_repl_history
51 |
52 | # Output of 'npm pack'
53 | *.tgz
54 |
55 | # Yarn Integrity file
56 | .yarn-integrity
57 |
58 | # dotenv environment variables file
59 | .env
60 |
61 | # next.js build output
62 | .next
63 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at tapas.adhikary@gmail.com. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72 |
73 | [homepage]: https://www.contributor-covenant.org
74 |
75 | For answers to common questions about this code of conduct, see
76 | https://www.contributor-covenant.org/faq
77 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Tapas Adhikary
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # COVID-19 World
2 |
3 | [](#contributors-)
4 |
5 |
6 | COVID-19 is the infectious disease caused by the most recently discovered coronavirus. This new virus and disease were unknown before the outbreak began in Wuhan, China, in December 2019.
7 |
8 | With the oubreak world-wide and increasing number of active patients, there are many efforts to project the data in some form for people to follow and understand.
9 |
10 | `COVID-19 World` is yet another Project to build a Dashboard like app to showcase the data related to the COVID-19(Corona Virus).
11 |
12 | # See it Running
13 |
14 | `COVID-19 World` app is running as a website hosted on [](https://app.netlify.com/sites/covid-19-world/deploys)
15 | [](https://app.fossa.io/projects/git%2Bgithub.com%2Fatapas%2Fcovid-19?ref=badge_shield)
16 |
17 | 👉 [https://covid-19-world.netlify.com/](https://covid-19-world.netlify.com/)
18 |
19 | # Many Thanks to all the `Stargazers` who has supported this project with stars(⭐)
20 |
21 | [](https://github.com/atapas/covid-19/stargazers)
22 |
23 | # Analytics
24 |
25 | `COVID-19 World` provides some basic but useful analytics to understand the depth and gravity of the situation.
26 |
27 | ## Home Page [🔗](https://covid-19-world.netlify.com/home)
28 |
29 | `Home` page provides the statistics on the data from country `India`, i.e, my Country.
30 |
31 | - Total Number of Confirmed Cases
32 | - Total Number of Active Cases
33 | - Total Number of Recoverd Cases
34 | - Total Number of Deaths
35 | - Trends
36 | - Number of New Cases Found per Day
37 | - New Cases Trends - % Changes Per day
38 | - Trends Change of Confirmed vs Active vs Recovered vs Deaths
39 | - State Data Break-ups
40 | - State: Most Affected
41 | - State: Most Recovered
42 | - District Wise Data Breakups for a State
43 |
44 | ## World Page [🔗](https://covid-19-world.netlify.com/world)
45 |
46 | `World` page provides the rich features and stats about the Countries affected by the virus:
47 |
48 | - Compare Countries over the Weeks: Compare the Spreads by Selecting the Countries of your choice. The selection also gets persisted into the localstorage of the browser so that, you can montor those over times.
49 | - Countries with Overall Death Impact
50 | - Countries Recovering Well
51 | - Total Cases and Splits
52 | - Countries with maximum Deaths Today
53 | - Major Country Spreads
54 |
55 | ## Countries Page [🔗](https://covid-19-world.netlify.com/countries)
56 |
57 | `Countries` page list down all the countries affected by the Virus today. This page allows to:
58 |
59 | - Find a Specific Country by type-down search.
60 | - Select a Country to drill down on the details.
61 | - Sort the Countries based on, total cases, active cases, deaths and recovery.
62 |
63 | ## Information Page [🔗](https://covid-19-world.netlify.com/information)
64 |
65 | `Information` page provides general information about COVID-19.
66 |
67 | ## News Page [🔗](https://covid-19-world.netlify.com/news)
68 |
69 | `News` page shows the curated news about COVID-19 and Health from different publications over the globe.
70 |
71 |
72 | # To Run from the Source
73 |
74 | `COVID-19 World` is a ReactJS based project uses API from various sources to visualize and analyse the data to represent in most useful manner. Once you clone/fork the repo, you should be able to run it locally.
75 |
76 | Make sure, you have NodeJS installed. Preffered Version of nodeJs is >=12.7.0
77 |
78 | With Yarn, Do the followings:
79 |
80 | - `yarn install`: Install the Projcect Dependencies
81 | - `yarn start`: Start the app in dev mode. The app will be available on [https://localhost:4000](https://localhost:4000)
82 | - `yarn build`: Build the app for production.
83 |
84 | With NPM, Do the followings:
85 |
86 | - `npm install`: Install the Projcect Dependencies
87 | - `npm run start`: Start the app in dev mode. The app will be available on [https://localhost:4000](https://localhost:4000)
88 | - `npm run build`: Build the app for production.
89 |
90 | # Credits and Motivations
91 |
92 | Only motivation behind building this app was to kill time at home over a Long Weekend. 😏
93 |
94 | My sincere thanks to followings 👍:
95 |
96 | - [Coronavirus NovelCOVID API](https://github.com/NovelCOVID/API)
97 | - [COVID Time-Series API(Pomber)](https://github.com/pomber/COVID19)
98 | - Corona State Data(India)
99 | - [API for News](https://newsapi.org/)
100 |
101 | # Technologies
102 |
103 | This app is built from the scratch using following User Interface Technologies:
104 |
105 | - [ReactJs](https://reactjs.org/)
106 | - [Bootstrap](https://react-bootstrap.netlify.com/)
107 | - [Recharts](http://recharts.org/en-US/)
108 |
109 | # License
110 |
111 | [](https://app.fossa.io/reports/970db5be-b904-4b5c-acea-1c708a0e92b8)
112 |
113 | # 🙏 Stay Home, Stay Safe! 🙏
114 |
115 | Contact [https://www.tapasadhikary.com](https://www.tapasadhikary.com) for any further queries.
116 |
117 | ## Contributors ✨
118 |
119 | Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
120 |
121 |
122 |
123 |
124 |
32 | Initially, the only motivation behind building this app was to kill time at home over a weekend 😏.
33 | As the days passed, I started realizing that, it takes lot to provide some information to clearly understand what
34 | is going on!
35 |
36 | Hence the effort started to put some data analytics together from various data sources to present
37 | meaningful information.
38 |
64 | Coronaviruses are a large family of viruses which may cause illness in animals or humans. In humans,
65 | several coronaviruses are known to cause respiratory infections ranging from the common cold to
66 | more severe diseases such as Middle East Respiratory Syndrome (MERS) and Severe Acute Respiratory
67 | Syndrome (SARS). The most recently discovered coronavirus causes coronavirus disease COVID-19.
68 |
69 |
70 | COVID-19 is the infectious disease caused by the most recently discovered coronavirus. This new virus
71 | and disease were unknown before the outbreak began in Wuhan, China, in December 2019.
72 |
73 |
74 |
75 |
76 |
77 |
👉 Difference with SARS-COV-2
78 |
79 | The virus that causes COVID-19 and the one that caused the outbreak of Severe Acute Respiratory Syndrome (SARS) in 2003 are related to each other genetically, but the diseases they cause are quite different.
80 |
81 |
82 | SARS was more deadly but much less infectious than COVID-19. There have been no outbreaks of SARS anywhere in the world since 2003.
83 |
84 |
85 |
86 |
87 |
88 |
👉 Symptoms
89 |
90 | The most common symptoms of COVID-19 are fever, tiredness, and dry cough.
91 |
92 |
93 | Some patients may have aches and pains, nasal congestion, runny nose, sore throat or diarrhoea. These symptoms are usually mild and begin gradually. Some people become infected but don’t develop any symptoms and don't feel unwell. Most people (about 80%) recover from the disease without needing special treatment. Around 1 out of every 6 people who gets COVID-19 becomes seriously ill and develops difficulty breathing. Older people, and those with underlying medical problems like high blood pressure, heart problems or diabetes, are more likely to develop serious illness.
94 | People with fever, cough and difficulty breathing should seek medical attention.
95 |
96 |
97 |
98 |
99 |
100 |
👉 Spreading
101 |
102 | People can catch COVID-19 from others who have the virus. The disease can spread from person to person through small droplets from the nose or mouth which are spread when a person with COVID-19 coughs or exhales. These droplets land on objects and surfaces around the person. Other people then catch COVID-19 by touching these objects or surfaces, then touching their eyes, nose or mouth.
103 |
104 |
105 | People can also catch COVID-19 if they breathe in droplets from a person with COVID-19 who coughs out or exhales droplets. This is why it is important to stay more than 1 meter (3 feet) away from a person who is sick.
106 |
107 |
108 |
109 |
110 |
111 |
👉 Risk
112 |
113 | The risk depends on where you are - and more specifically, whether there is a COVID-19 outbreak unfolding there.
114 |
115 |
116 | There are several places around the world (cities or areas) where the disease is spreading. For people living in, or visiting, these areas the risk of catching COVID-19 is higher. Governments and health authorities are taking vigorous action every time a new case of COVID-19 is identified. Be sure to comply with any local restrictions on travel, movement or large gatherings. Cooperating with disease control efforts will reduce your risk of catching or spreading COVID-19.
117 |
118 |
119 | COVID-19 outbreaks can be contained and transmission stopped, as has been shown in China and some other countries. Unfortunately, new outbreaks can emerge rapidly. It’s important to be aware of the situation where you are or intend to go.
120 |
121 |
122 |
123 |
124 |
125 |
👉 Protection
126 |
127 | Many countries around the world have seen cases of COVID-19 and several have seen outbreaks. Authorities in China and some other countries have succeeded in slowing or stopping their outbreaks. However, the situation is unpredictable so check regularly for the latest and authentic news.
128 |
129 |
130 | You can reduce your chances of being infected or spreading COVID-19 by taking some simple precautions:
131 |
132 |
133 | Regularly and thoroughly clean your hands with an alcohol-based hand rub or wash them with soap and water. Washing your hands with soap and water or using alcohol-based hand rub kills viruses that may be on your hands.
134 |
135 |
136 | Maintain at least 1 metre (3 feet) distance between yourself and anyone who is coughing or sneezing. When someone coughs or sneezes, they spray small liquid droplets from their nose or mouth which may contain virus. If you are too close, you can breathe in the droplets, including the COVID-19 virus if the person coughing has the disease.
137 |
138 |
139 | Avoid touching eyes, nose and mouth. Hands touch many surfaces and can pick up viruses. Once contaminated, hands can transfer the virus to your eyes, nose or mouth. From there, the virus can enter your body and can make you sick.
140 |
141 |
142 | Make sure you, and the people around you, follow good respiratory hygiene. This means covering your mouth and nose with your bent elbow or tissue when you cough or sneeze. Then dispose of the used tissue immediately. Droplets spread virus. By following good respiratory hygiene, you protect the people around you from viruses such as cold, flu and COVID-19.
143 |
144 |
145 | Stay home if you feel unwell. If you have a fever, cough and difficulty breathing, seek medical attention and call in advance. Follow the directions of your local health authority. National and local authorities will have the most up to date information on the situation in your area. Calling in advance will allow your health care provider to quickly direct you to the right health facility. This will also protect you and help prevent spread of viruses and other infections.
146 |
147 |
148 | Keep up to date on the latest COVID-19 hotspots (cities or local areas where COVID-19 is spreading widely). If possible, avoid traveling to places – especially if you are an older person or have diabetes, heart or lung disease. You have a higher chance of catching COVID-19 in one of these areas.
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 | )
157 | };
158 |
159 | export default Information;
--------------------------------------------------------------------------------
/src/js/News.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created on Sun Apr 12 2020
3 | *
4 | * Copyright (c) 2020 https://tapasadhikary.com
5 | */
6 |
7 | import React from 'react';
8 | import Container from 'react-bootstrap/Container';
9 | import Row from 'react-bootstrap/Row';
10 | import Col from 'react-bootstrap/Col';
11 | import Card from 'react-bootstrap/Card'
12 | import CardColumns from 'react-bootstrap/CardColumns';
13 |
14 | import covid_image from '../../assets/images/covid.png';
15 |
16 | import {useFetch} from "./useFetch";
17 | import Loader from "react-loader-spinner";
18 |
19 | const Information = () => {
20 | let data = [];
21 | const [topHeadlines, loadingTopHeadlines] = useFetch("https://saurav.tech/NewsAPI/top-headlines/category/health/in.json")
22 |
23 | if (!loadingTopHeadlines) {
24 | data = topHeadlines.articles
25 | }
26 | return (
27 |
60 |
61 | )
62 | };
63 |
64 | export default TimeSeriesPercentage;
--------------------------------------------------------------------------------
/src/js/useFetch.js:
--------------------------------------------------------------------------------
1 | import React, {useState, useEffect} from 'react';
2 | /*
3 | * Created on Sun Apr 12 2020
4 | *
5 | * Copyright (c) 2020 https://tapasadhikary.com
6 | */
7 |
8 | const useFetch = (inputURL) => {
9 | const [data, setData] = useState({});
10 | const [loading, setLoading] = useState(true);
11 | const [url, setUrl] = useState(inputURL);
12 |
13 | async function fetchURL() {
14 | const response = await fetch(url);
15 | const json = await response.json();
16 |
17 | setData(json);
18 | setLoading(false);
19 | }
20 |
21 | useEffect(() => {
22 | fetchURL();
23 | }, [url]);
24 |
25 | return [ data, loading ];
26 | };
27 |
28 | export { useFetch };
--------------------------------------------------------------------------------
/src/js/utils/color_codes.js:
--------------------------------------------------------------------------------
1 |
2 | const COLOR_CODES = {
3 | 'CATEGORIES': {
4 | 'CONFIRMED': '#17A2B8',
5 | 'ACTIVE': '#FFC107',
6 | 'RECOVERED': '#28A745',
7 | 'DEATHS': '#DC3545'
8 | },
9 | 'LOADER': '#00BFFF',
10 | 'RANDOM': {
11 | 'BLACK': '#000000',
12 | 'WHITE': '#FFFFFF',
13 | 'TEAL_LIKE': '#17A2B8',
14 | 'YELLOW_ORANGE': '#FFC107',
15 | 'GREEN_LIKE': '#28A745',
16 | 'RED_LIKE': '#DC3545',
17 | 'DARK_GREY': '#626567',
18 | 'BROWN_LIKE': '#BA4A00',
19 | 'DARK_GREEN_LIKE': '#0E6655',
20 | 'ORANGE_LIKE': '#FF5833',
21 | 'DARK_PURPLE': '#200A3D',
22 | 'ORANGE_LIKE_VARIANT': '#FFB433'
23 | }
24 | };
25 |
26 | export default COLOR_CODES;
--------------------------------------------------------------------------------
/src/js/utils/india_state_codes.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Created on Sun Apr 12 2020
3 | *
4 | * Copyright (c) 2020 https://tapasadhikary.com
5 | */
6 |
7 | const INDIA_STATE_CODES = {
8 | "Maharashtra": "MH",
9 | "Kerala": "KL",
10 | "Karnataka": "KA",
11 | "Telangana": "TG",
12 | "Gujarat": "GJ",
13 | "Uttar Pradesh": "UP",
14 | "Rajasthan": "RJ",
15 | "Delhi": "DL",
16 | "Haryana": "HR",
17 | "Punjab": "PB",
18 | "Tamil Nadu": "TN",
19 | "Madhya Pradesh": "MP",
20 | "Ladakh": "LD",
21 | "Jammu and Kashmir": "JK",
22 | "Andhra Pradesh": "AP",
23 | "West Bengal": "WB",
24 | "Chandigarh": "CH",
25 | "Uttarakhand": "UK",
26 | "Bihar": "BR",
27 | "Himachal Pradesh": "HP",
28 | "Chhattisgarh": "CT",
29 | "Goa": "GA",
30 | "Odisha": "OR",
31 | "Puducherry": "PY",
32 | "Manipur": "MN",
33 | "Mizoram": "MZ",
34 | "Andaman and Nicobar Islands": "AN",
35 | "Assam": "AS",
36 | "Meghalaya": "ML",
37 | "Tripura": "TR",
38 | "Arunachal Pradesh": "AR",
39 | "Jharkhand": "JH",
40 | "Nagaland": "NL",
41 | "Sikkim": "SK",
42 | "Dadra and Nagar Haveli": "DN",
43 | "Daman and Diu": "DD",
44 | "Lakshadweep": "LD",
45 | "Dadra and Nagar Haveli and Daman and Diu": "DN",
46 | "State Unassigned": "SU"
47 | };
48 |
49 | export default INDIA_STATE_CODES;
--------------------------------------------------------------------------------
/src/js/utils/top-headlines.json:
--------------------------------------------------------------------------------
1 | {"status":"ok","totalResults":70,"articles":[{"source":{"id":null,"name":"Deccanherald.com"},"author":"Suraksha P","title":"Will do whatever it takes to ensure that all of us come out of this, says recovered Bengaluru COVID-19 patient - Deccan Herald","description":"Karnataka Medical Education Minister Dr K Sudhakar and Health Minister B Sriramulu symbolically launched the clinical trials for convalescent plasma therapy here on Saturday at Victoria Hospital in Bengaluru. Two patients from the state who have recovered fr…","url":"https://www.deccanherald.com/city/top-bengaluru-stories/will-do-whatever-it-takes-to-ensure-that-all-of-us-come-out-of-this-says-recovered-bengaluru-covid-19-patient-829762.html","urlToImage":null,"publishedAt":"2020-04-25T10:07:38Z","content":"Karnataka Medical Education Minister Dr K Sudhakar and Health Minister B Sriramulu symbolically launched the clinical trials for convalescent plasma therapy here on Saturday at Victoria Hospital in Bengaluru. \r\nTwo patients from the state who have recovered f… [+2654 chars]"},{"source":{"id":"reuters","name":"Reuters"},"author":"Reuters Editorial","title":"'No evidence' yet that recovered COVID patients cannot be reinfected: WHO - Reuters India","description":"The World Health Organization (WHO) said on Saturday that there was currently \"no evidence\" that people who have recovered from COVID-19 and have antibodies are protected from a second coronavirus infection.","url":"https://in.reuters.com/article/health-coronavirus-who-idINKCN2270F9","urlToImage":null,"publishedAt":"2020-04-25T09:53:00Z","content":"GENEVA (Reuters) - The World Health Organization (WHO) said on Saturday that there was currently “no evidence” that people who have recovered from COVID-19 and have antibodies are protected from a second coronavirus infection. \r\nIn a scientific brief, the Uni… [+1753 chars]"},{"source":{"id":null,"name":"Ibtimes.co.in"},"author":"Nirmal Narayanan","title":"Is coronavirus sexually transmitted? Medical expert answers - International Business Times, India Edition","description":"A previous study report had suggested that men are more prone to the severity of coronavirus infection due to the presence of testicles in their body.","url":"https://www.ibtimes.co.in/coronavirus-sexually-transmitted-medical-expert-answers-818377","urlToImage":null,"publishedAt":"2020-04-25T09:40:27Z","content":"Top US vaccine expert was 'fired'\r\nThe novel coronavirus that originated in a Wuhan seafood market has been spreading chaos all across the globe for the past four months. With death toll nearing 2,00,000, Covid-19 has affected people in all countries irrespec… [+1912 chars]"},{"source":{"id":null,"name":"Livemint.com"},"author":"Bloomberg","title":"Why Europe’s capital has world’s highest virus death rate - Livemint","description":"Despite having only 11 million people, the country has reported more deaths from the disease than China.With some 57 fatalities per 100,000 inhabitants, it has the highest per-capita death rate in the world","url":"https://www.livemint.com/news/world/why-europe-s-capital-has-world-s-highest-virus-death-rate-11587806581013.html","urlToImage":null,"publishedAt":"2020-04-25T09:33:43Z","content":"In an art-deco building in the heart of Brussels, Belgiums leading scientists gather daily to announce the countrys coronavirus toll. Its been grim reading.Despite having only 11 million people, the country has reported more deaths from the disease than China… [+4515 chars]"},{"source":{"id":"google-news","name":"Google News"},"author":null,"title":"Cotton, natural silk, chiffon make best materials for homemade masks against COVID-19: Study - The Financial Express","description":null,"url":"https://news.google.com/__i/rss/rd/articles/CBMilAFodHRwczovL3d3dy5maW5hbmNpYWxleHByZXNzLmNvbS9saWZlc3R5bGUvaGVhbHRoL2NvdHRvbi1uYXR1cmFsLXNpbGstY2hpZmZvbi1tYWtlLWJlc3QtbWF0ZXJpYWxzLWZvci1ob21lbWFkZS1tYXNrcy1hZ2FpbnN0LWNvdmlkLTE5LXN0dWR5LzE5Mzk0NDYv0gGZAWh0dHBzOi8vd3d3LmZpbmFuY2lhbGV4cHJlc3MuY29tL2xpZmVzdHlsZS9oZWFsdGgvY290dG9uLW5hdHVyYWwtc2lsay1jaGlmZm9uLW1ha2UtYmVzdC1tYXRlcmlhbHMtZm9yLWhvbWVtYWRlLW1hc2tzLWFnYWluc3QtY292aWQtMTktc3R1ZHkvMTkzOTQ0Ni9saXRlLw?oc=5","urlToImage":null,"publishedAt":"2020-04-25T09:04:27Z","content":null},{"source":{"id":null,"name":"Youtube.com"},"author":null,"title":"Health workers are on the frontline of the COVID-19 pandemic - eNCA","description":"Health workers are on the frontline of the covid-19 pandemic, some get infected and even succumb to the virus. Retshidisitswe Kotane, who recently graduated,...","url":"https://www.youtube.com/watch?v=8ZrrAJkQu2w","urlToImage":null,"publishedAt":"2020-04-25T08:34:11Z","content":null},{"source":{"id":null,"name":"Thehealthsite.com"},"author":"Jahnavi Sarma","title":"Delhi enters stage 2 of COVID-19 transmission: Can we avoid stage 3? - TheHealthSite","description":"Though officials say that the situation is under control Delhi health minister says that the state is now in stage 2 of COVID-19 transmission.","url":"https://www.thehealthsite.com/news/delhi-enters-stage-2-of-covid-19-transmission-can-we-avoid-stage-3-741725/","urlToImage":null,"publishedAt":"2020-04-25T08:06:40Z","content":"The COVID-19 pandemic is claiming more and more victims in India and cases in the National capital has seen a surge with more than 1,500 people testing positive to the virus. The deadly contagion has so far claimed 53 victims in Delhi as far official reports.… [+3202 chars]"},{"source":{"id":null,"name":"Gulfnews.com"},"author":"AFP","title":"COVID-19: Does sunlight rapidly destroy the coronavirus? | Americas - Gulf News","description":"Experts urge caution after US department of homeland security makes claim","url":"https://gulfnews.com/world/americas/covid-19-does-sunlight-rapidly-destroy-the-coronavirus-1.1587801920020","urlToImage":null,"publishedAt":"2020-04-25T08:02:36Z","content":"Generic image used for illustrative purposes\r\n Image Credit: Pixabay\r\nWashington: Does sunlight rapidly destroy the coronavirus? A White House presentation on a mysterious government study says so - but some scientists have called for caution as we await mor… [+4257 chars]"},{"source":{"id":null,"name":"Indiatoday.in"},"author":null,"title":"World Malaria Day 2020: Date, theme, history, slogans and quotes - India Today","description":"World Malaria Day or WMD is observed on April 25 every year. The day aimed at taking urgent action in the control of the deadly disease. The theme of World Malaria Day 2020 is \"Zero malaria starts with me.\"","url":"https://www.indiatoday.in/information/story/world-malaria-day-2020-date-theme-history-facts-slogans-and-quotes-1670910-2020-04-25","urlToImage":null,"publishedAt":"2020-04-25T07:21:55Z","content":"Malaria is a life-threatening disease which is caused by the bites of infected mosquitoes. It is the Female Anopheles mosquitoes who spread the Plasmodium parasite through their saliva, which causes malaria.\r\nHowever, it is a preventable and treatable infecti… [+4230 chars]"},{"source":{"id":null,"name":"Livemint.com"},"author":"ANI","title":"106-year-old woman who survived Spanish Flu, now beats coronavirus too - Livemint","description":"Ana del Valle is the oldest survivor of the pandemic outbreaks in Spain.Ana was born in October 1913 and in less than six months she will turn 107","url":"https://www.livemint.com/news/world/106-year-old-woman-who-survived-spanish-flu-now-beats-coronavirus-too-11587798144700.html","urlToImage":null,"publishedAt":"2020-04-25T07:15:52Z","content":"Madrid: We may have all heard that miracles do happen, but sadly not all of us have the chance to witness them in our daily lives, especially during a pandemic today which brings the world to a standstill.Citing a similar story of survival, The Olive Press, a… [+2495 chars]"},{"source":{"id":null,"name":"Indiatoday.in"},"author":null,"title":"e-Agenda AajTak: Not just stay at home but also do yoga at home, says Ramdev - India Today","description":"e-Agenda Aaj Tak: Yoga guru Ramdev said people should not just stay and work at home, but they must also perform yoga at home.","url":"https://www.indiatoday.in/india/story/e-agenda-aajtak-yoga-ramdev-coronavirus-pandemic-lockdown-1670908-2020-04-25","urlToImage":null,"publishedAt":"2020-04-25T06:56:14Z","content":"In the wake of the coronavirus pandemic and the nationwide lockdown, people should not just stay and work at home, but they must also perform yoga at home, said yoga guru Ramdev on Saturday.\r\nRamdev was speaking at a special session at the e-Agenda Aaj Tak.\r\n… [+1005 chars]"},{"source":{"id":null,"name":"Expresshealthcare.in"},"author":"Sanjiv Das","title":"Experts stress on radiology preparedness for COVID 19 - Express Healthcare","description":"Like any other health professionals, radiologists are doing their bit to safeguard their patients with limited resources. It’s time they get ready to set protocol for preparedness during and post epidemicIn the wake of the global health crisis due t","url":"https://www.expresshealthcare.in/covid19-updates/experts-stress-on-radiology-preparedness-for-covid-19/419329/","urlToImage":null,"publishedAt":"2020-04-25T06:20:00Z","content":"Like any other health professionals, radiologists are doing their bit to safeguard their patients with limited resources. Its time they get ready to set protocol for preparedness during and post epidemic\r\nIn the wake of the global health crisis due to COVID-… [+13798 chars]"},{"source":{"id":null,"name":"Firstpost.com"},"author":null,"title":"World Malaria Day 2020: WHO's anti-malaria campaign and target to eliminate malaria from 35 more... - Firstpost","description":"According to WHO reports, malaria affected more than 228 million people in the world in 2018 and killed about 405,000 people globally in the same year.","url":"https://www.firstpost.com/health/world-malaria-day-2020-whos-anti-malaria-campaign-and-target-to-eliminate-malaria-from-35-more-countries-by-2030-8298691.html","urlToImage":null,"publishedAt":"2020-04-25T06:06:06Z","content":null},{"source":{"id":null,"name":"Yourtango.com"},"author":"https://www.yourtango.com/users/nicole-pomarico","title":"Covid-19 Strokes: Coronavirus Is Causing Strokes In Young Adults, Doctors Warn - YourTango","description":"This is a pretty scary possible side effect of the virus.","url":"https://www.yourtango.com/2020333481/covid-19-strokes-in-young-adults","urlToImage":null,"publishedAt":"2020-04-25T05:43:17Z","content":"This is a pretty scary possible side effect of the virus.\r\nSo far, doctors have believed that coronavirus has had a more mild impact on young adults, but now, they've learned new information that could change that belief.\r\nNow that we're a few months into the… [+3510 chars]"},{"source":{"id":null,"name":"Youtube.com"},"author":null,"title":"World leaders to launch COVID-19 drugs, vaccine plan: WHO - ARIRANG NEWS","description":"WHO \"코로나19 치료제•백신 개발 협력안 제시\" World leaders have pledged to work together in a landmark collaboration, to speed up the development of drugs, tests and vaccine...","url":"https://www.youtube.com/watch?v=XC4JHNYFmk0","urlToImage":null,"publishedAt":"2020-04-25T04:57:01Z","content":"WHO \"19 \"\r\nWorld leaders have pledged to work together in a landmark collaboration, to speed up the development of drugs, tests and vaccines to diagnose and treat COVID-19.According to the World Health Organization on Friday, world leaders including French Pr… [+495 chars]"},{"source":{"id":null,"name":"Youtube.com"},"author":null,"title":"Paris: Sewers tested for COVID-19 concentration | France Coronavirus | World News - WION","description":"Paris: Sewers tested for COVID-19 concentration | France Coronavirus | World News In France, traces of the novel coronavirus were discovered in 4 out of 27 s...","url":"https://www.youtube.com/watch?v=4ZJVtFYyA58","urlToImage":null,"publishedAt":"2020-04-25T04:35:19Z","content":"Paris: Sewers tested for COVID-19 concentration | France Coronavirus | World News\r\nIn France, traces of the novel coronavirus were discovered in 4 out of 27 samples of the non-potable water, which is supplied in Paris.\r\n#ParisCoronavirus#FranceCoronavirusDeat… [+1130 chars]"},{"source":{"id":"the-hindu","name":"The Hindu"},"author":"Aswathi Pacha","title":"Stop villainising bats, say scientists and conservationists - The Hindu","description":"The mammals do not spread COVID-19, they say","url":"https://www.thehindu.com/sci-tech/energy-and-environment/stop-villainising-bats-say-scientists-and-conservationists/article31429962.ece","urlToImage":null,"publishedAt":"2020-04-25T04:24:55Z","content":"Unverified news and social media posts linking bats to the COVID-19 outbreak have led to widespread antipathy and there have been increasing incidents of the public destroying bat roosts and smoking them out. To raise awareness, 64 chiropterologists (those wh… [+2199 chars]"},{"source":{"id":null,"name":"News18.com"},"author":"News18","title":"Coronavirus Detected on Air Pollution Particles That May Carry It Over Long Distances, Scientists Warn - News18","description":"Leonardo Setti at the University of Bologna in Italy said it was imperative to investigate if the the coronavirus could be transported through air pollution.","url":"https://www.news18.com/news/world/coronavirus-detected-on-air-pollution-particles-that-may-carry-it-over-long-distances-scientists-warn-2591919.html","urlToImage":null,"publishedAt":"2020-04-25T03:39:15Z","content":"The novel coronavirus has been found on air pollution particles by scientists who are studying if this could allow the virus to advance longer distances, resulting in more number of people contracting it, The Guardian reported.\r\nThe work is still in the initi… [+2716 chars]"},{"source":{"id":null,"name":"Hindustantimes.com"},"author":"Hindustan Times","title":"A month in lockdown, vaccines in human trials give hope: Covid-19 news today - Hindustan Times","description":"A preview of the important Covid-19 news from India and world today","url":"https://www.hindustantimes.com/india-news/a-month-in-lockdown-vaccines-in-human-trials-give-hope-covid-19-news-today/story-Y9XTbYJNVJFRhle8ubkTEL.html","urlToImage":null,"publishedAt":"2020-04-25T02:27:49Z","content":"India completes a month in lockdown on Saturday. In this period, the country has slowed the spread of the coronavirus disease (Covid-19) though many challenges still remain. Meanwhile, human trials of a vaccine developed by Oxford University has begun. An Ind… [+5596 chars]"},{"source":{"id":null,"name":"Ourbitcoinnews.com"},"author":null,"title":"Covid19, Second Wave of Corona May Hit India During Rainy Season – Corona Crisis: Second wave of Corona might hit India throughout monsoon - OBN","description":", , New Delhi Updated Sat, 25 Apr 2020 06:36 AM IST Listen to the information Even although India has restricted the affect of the…","url":"https://ourbitcoinnews.com/covid19-second-wave-of-corona-may-hit-india-during-rainy-season-corona-crisis-second-wave-of-corona-may-hit-india-during-monsoon/","urlToImage":null,"publishedAt":"2020-04-25T01:22:00Z","content":"Even although India has restricted the affect of the Corona virus epidemic thats wreaking havoc on a worldwide scale, the Indians might must face the second wave of the epidemic within the upcoming monsoon. Scientists have warned {that a} sudden enhance withi… [+1740 chars]"}]}
--------------------------------------------------------------------------------
/src/js/utils/url.js:
--------------------------------------------------------------------------------
1 |
2 | const URL_INDIA_DISTRICT_DAILY = 'https://api.covid19india.org/districts_daily.json';
3 |
4 | export { URL_INDIA_DISTRICT_DAILY };
5 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | const HtmlWebPackPlugin = require("html-webpack-plugin");
4 | const MiniCssExtractPlugin = require("mini-css-extract-plugin");
5 |
6 | module.exports = {
7 | entry: './src/js/index.js',
8 | output: {
9 | filename: 'bundle.js',
10 | path: path.resolve(__dirname, 'dist'),
11 | publicPath: '/'
12 | },
13 |
14 | devtool: 'source-map',
15 |
16 | module: {
17 | rules: [
18 | {
19 | test: /\.js$/,
20 | exclude: /node_modules/,
21 | use: {
22 | loader: "babel-loader"
23 | }
24 | },
25 | {
26 | test: /\.html$/,
27 | use: [
28 | {
29 | loader: "html-loader",
30 | options: { minimize: true }
31 | }
32 | ]
33 | },
34 | {
35 | // Apply rule for .sass, .scss or .css files
36 | test: /\.(sa|sc|c)ss$/,
37 | // Set loaders to transform files.
38 | // Loaders are applying from right to left(!)
39 | // The first loader will be applied after others
40 | use: [
41 | {
42 | // After all CSS loaders we use plugin to do his work.
43 | // It gets all transformed CSS and extracts it into separate
44 | // single bundled file
45 | loader: MiniCssExtractPlugin.loader
46 | },
47 | {
48 | // This loader resolves url() and @imports inside CSS
49 | loader: "css-loader",
50 | },
51 | {
52 | // Then we apply postCSS fixes like autoprefixer and minifying
53 | loader: "postcss-loader"
54 | },
55 | {
56 | // First we transform SASS to standard CSS
57 | loader: "sass-loader"
58 | }
59 | ]
60 | },
61 | {
62 | test: /\.(png|svg|jpg|gif)$/,
63 | use: [
64 | 'file-loader'
65 | ]
66 | },
67 | {
68 | // Apply rule for fonts files
69 | test: /\.(woff|woff2|ttf|otf|eot)$/,
70 | use: [
71 | {
72 | // Using file-loader too
73 | loader: "file-loader",
74 | options: {
75 | outputPath: 'fonts'
76 | }
77 | }
78 | ]
79 | }
80 | ]
81 | },
82 | plugins: [
83 | new HtmlWebPackPlugin({
84 | template: "./src/index.html",
85 | favicon: './assets/images/add_to_hs/favicon.ico',
86 | filename: "./index.html"
87 | }),
88 | new MiniCssExtractPlugin({
89 | filename: "[name].css",
90 | chunkFilename: "[id].css"
91 | })
92 | ],
93 | devServer: {
94 | historyApiFallback: true,
95 | contentBase: path.join(__dirname, "dist"),
96 | compress: true,
97 | port: 4000,
98 | proxy: {
99 | '/api': {
100 | target: 'http://localhost:1337',
101 | secure: false
102 | }
103 | }
104 | }
105 | };
--------------------------------------------------------------------------------