Skip to content
Proyek

OssamaRafique/Covid-19-Statistics-Dashboard-Angular-9

Lihat di GitHub

Tentang

🦠Corona Virus / Covid 19 Tracker Dashboard With Awesome UI + PWA + NodeJS Scraper

Pengembangan web dan aplikasi

Cara angka ini diukur

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
+1
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

(Unmaintained Repo) Welcome to 🦠 COVID-19/Corona Statistics Dashboard Angular šŸ‘‹

Version Version License: MIT Buy Me A Coffee Twitter: OssamaRafique

> ## āš ļø Demo purposes only — the data is not real > > This project is **no longer maintained**. It showed live COVID-19 figures while it was, but the API > behind it (`api.coronastatistics.live`) and the hosted site have both been retired. > > So that the dashboard still demonstrates what it does, it now ships with **randomly generated > sample data** — every number you see in the app is fabricated. These are **not real COVID-19 > statistics** and must not be cited, shared or used for anything. Search, sorting, the world map, > the charts and the per-country pages all work, they are just driven by a seeded generator > (`src/app/core/mock/demo-data.ts`) instead of a live API. > > Want real numbers? See [Using a real API](#using-a-real-api) below.Covid Stats Live Dashboard

The screenshot above and those below were taken while the project was live and showing real data.

šŸ  Homepage

✨ Demo — the hosted site has been retired, run it locally instead

✨ Join Discord Server For Help

Screenshots

Covid Stats Live Dashboard Screenshot 1 Covid Stats Live Dashboard Screenshot 2 Covid Stats Live Dashboard Screenshot 3 Covid Stats Live Dashboard Screenshot 4

Build the Angular project

npm install
ng build

Run the Angular Project

npm install
ng serve

It starts on the generated sample data, so there is nothing else to set up — no API key, no backend, no network. Remember that every figure on screen is fake; the dashboard shows a banner saying so.

Note: this is an Angular 9 project and its build toolchain needs Node 12 or 14. On a newer Node, npm install will fail while compiling node-sass.

Using a real API

Dummy data is controlled by a single flag in src/environments/environment.ts (and environment.prod.ts):

export const environment = {
  production: true,
  useDummyData: true,                            // set to false for live data
  apiHost: 'https://api.coronastatistics.live'   // and point this at your own deployment
};

Set useDummyData to false and apiHost to your own instance of the Node server in server/ (below). The app's HTTP calls are unchanged, and the demo banner disappears on its own.

Run the Node.js Project (open server folder)

Rename config.example.json to config.json and fill in the details

{
  "redis": {
    "host": "host",
    "password": "1234"
  },
  "keys": {
    "all": "coronastatistics:all",
    "countries": "coronastatistics:countries",
    "timeline": "coronastatistics:timeline",
    "timelineglobal": "coronastatistics:timelineglobal"
  },
  "interval": 600000
}
npm install
node server.js

Then set apiHost in src/environments/environment.ts to wherever you deployed it, as described in Using a real API.

API Endpoints

These endpoints are dead — api.coronastatistics.live no longer resolves. They are kept here as a description of the shape the app expects, which is what the sample data generator reproduces and what you would need to serve to run this against real data:

  • /all
  • /countries
  • /countries?sort={parameter}
  • /countries/{country_name}
  • /timeline
  • /timeline/global
  • /timeline/{country_name}

Author

šŸ‘¤ Ossama Rafique

Show your support

Give a ā­ļø if this project helped you!

ko-fi

Jelajahi proyek terkait

Memuat…