Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/607011/covid-19
Web application to visualize spread of SARS-CoV-2
https://github.com/607011/covid-19
covid-19 javascript json-files mobile-web novel-coronavirus python sars-cov-2 visualization web webapp
Last synced: about 5 hours ago
JSON representation
Web application to visualize spread of SARS-CoV-2
- Host: GitHub
- URL: https://github.com/607011/covid-19
- Owner: 607011
- License: gpl-3.0
- Created: 2020-03-28T13:14:08.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T16:39:08.000Z (almost 2 years ago)
- Last Synced: 2023-03-19T13:25:03.192Z (over 1 year ago)
- Topics: covid-19, javascript, json-files, mobile-web, novel-coronavirus, python, sars-cov-2, visualization, web, webapp
- Language: JavaScript
- Homepage: https://covid-19.ersatzworld.net/
- Size: 3.96 MB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# COVID-19
_Visualization of COVID-19 spread and predicted cases_
![COVID-19 web app](webapp-preview.png)
## Prerequisites
- Node.js ≥ 10
- Git ≥ 1.8
- Python ≥ 3.6
- a web server which can serve static files (no PHP or other server-side logic required)## Installation
The [code](https://github.com/ola-ct/COVID-19) for this web app is hosted on GitHub. To clone the repository and its submodules enter the following on a command-line:
```
git clone https://github.com/ola-ct/COVID-19.git
cd COVID-19
git submodule init
```## Deployment
The latest COVID-19 spread data is fetched from Johns Hopkins' Center for Systems Science and Engineering ([CSSE](https://coronavirus.jhu.edu/map.html)) [repository](https://github.com/CSSEGISandData/COVID-19). Type
```
git submodule update --remote
```to update the data residing in the two Git submodules.
Before deploying this app to a web server, some JSON files have to be generated from this data using bin/update-data.py. This script has some dependencies which you can resolve by executing
```
pip3 install pipenv
pipenv install
```After that you may run the script with
```
pipenv run bin/update-data.py
```This will generate the aforementioned JSON files containing the latest spread data for each country.
Now the data are prepared in folder dist/data/ you can prepare the code for deployment to a web server.
This app uses [webpack](https://webpack.js.org/) to bundle the files from src/ into the deployment directory dist/.
If you haven't done it already, install the necessary [Node](https://nodejs.org/) modules:
```
npm install --save-dev
```After that you can bundle the files for production use by running
```
npx webpack --mode="production" --no-watch
```or, alternatively to produce debug friendly code and let webpack watch and rebuild changed files
```
npm run build
```Now you can copy the files in dist/ to the web server of your choice. bin/deploy.sh contains a template for a script that copies the files via SSH to a remote directory:
```
DIST=dist
SERVER=
REMOTE_DIR=
tar -C ${DIST} -czf - . | ssh ${SERVER} "(tar -C ${REMOTE_DIR} -xzf - )"
```Feel free to modify it according to your enviroment.
## License
Copyright © 2020 [Oliver Lau](mailto:[email protected])
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
---
Dieses Programm ist freie Software. Sie können es unter den Bedingungen der [GNU General Public License](http://www.gnu.org/licenses/gpl-3.0), wie von der Free Software Foundation veröffentlicht, weitergeben und/oder modifizieren, entweder gemäß Version 3 der Lizenz oder (nach Ihrer Wahl) jeder späteren Version.