ncov-3d-globe-api

Covid-19 ncov realtime 3d globe maps and position data api.

Current Support:

3d-globe

COVID data api

byState

Directory Structure:

├─back              //Flask
│  └─flask
│      ├─final      //globe data 
│      ├─mid        //mid-data
│      ├─static     //source data
│      ├─myvenv     //ubuntu virtual environment
│      ├─win-venv   //windows virtual environment
│      ├─main.py    //Flask main app
│      └─scraper.py //Scraper app
├─conf              //ubuntu configuration file
│  ├─init    
│  ├─ncov.service   //ubuntu service configuration( /etc/systemd/system)
│  └─nginx_conf     //ubuntu nginx configuration( /etc/nginx/sites-available)
└─front             //Front-end webgl globe

Back-end :

  • Flask
  • Python Scraper works every 2 hours. World data is from bing and Chinese data is from Dingxiangyuan.

Front-end :

  • webgl globe
  • javascript

Running the website locally (windows)

Open a bash terminal/command window and execute the following commands:

  1. cd <path-to-this-repo> # change to root of this repo
  2. cd back/flask
  3. source win-venv/Scripts/activate # activate the virtual encironment
  4. python3 run main.py # start back-end server

Start nginx (you shoud download the nginx before)

  1. cd <path-to-nginx>/conf # change to nginx conf directory
  2. edit this nginx.conf
	server {
		listen       8888; #port  
		server_name  localhost ; 
        location / {
			root   <path-to-this-repo>/front/webgl-globe-master;
            index  globe/index.html;
        }
    }
  1. cd <path-to-nginx>

  2. start nginx or nginx -s reload

GitHub