Giter VIP home page Giter VIP logo

covid19's Introduction

Covid19

WIP WARNING This is a work in progress. See the disclaimer below.

This app reads Covid19 dataset from Johns Hopkins CSSE repository, loads it to a database and displays the data in a dashboard made with Phoenix LiveView.

Big thanks goes to Johns Hopkins CSSE and by extension, people behind all those data sources for keeping us updated.

Other Branches and UI

As of right now, this branch (main) does not have any UI. UI is work in progress and will be updated soon.

There are two experimental UI branches:

  1. For ClojureScript + BulmaCSS
  2. For TailwindCSS

If you want to try out those branches, I'd suggest pull the data from the main branch following the instructions given here and then switch to those branches and compile. As the data syncing mechanism presented there are outdated and slow (30 minutes versus 3 minutes for global data sync)

Setup

To start your Phoenix server:

  • Pull the Covid19 dataset submodule with git submodule update --init --recursive --progress --depth 1
  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Install Node.js dependencies with cd assets && npm install
  • Start Phoenix endpoint with mix phx.server

Now that the system is setup, let's load some data.

To get the latest dataset from the repository, update the submodules with git submodule update --recursive --remote.

Now, fire up iex -S mix and in the REPL, type Covid19.Source.sync_all() to sync both global and US datasets. If you want to only sync US or Global datasets then you can type Covid19.Source.sync_all(:world) for world and Covid19.Source.sync_all(:us) for US data.

There are some sensible aliases in .iex.exs.copy file. If you wish you can append them in your own .iex.exs.

In order to keep the system updated, repeat the steps above.

Now you can visit localhost:4000 from your browser.

FAQ

Data Sync

TBD

Screenshots

Main Dashboard

TBA

Detail View (WIP)

TBA

Disclaimer

This app massages and displays based on curated datasets and does not attempt to produce or collect any beyond those sources. The datasets come with their own sets of "Terms and Conditions". I respect those and so should you!

This is my attempt to play with Phoenix LiveView and explore data, and by no means intended to be used by anything else, there can and will be wrong data, runtime errors, duplicates, and missing values compared to the data source. If you want to see actual data, google "Coronavirus Statistics" at your own risk, everyone seems to have a widget for it nowadays (Even those come with disclaimers, at least they should). I am doing this because I wanted to do learn some Phoenix LiveView, get less scared and more educated with Corona Virus (any, really) statistics, and convert some boredom (for now).

Thank You

covid19's People

Contributors

byte-chakra avatar code-shoily avatar dependabot[bot] avatar mafinar-cmb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

covid19's Issues

Feature request - add some mortality ratios to the front tables

The data is fascinating to see right now. Either there is something wrong with the numbers of say Mexico vs USA, or it's showing a HUGE difference in mortality/recovery? The deaths vs cases is just staggeringly different between them?

I suspect a line graph of some of these statistics would be super interesting as well (per country). I realise there is a long lead time between the mortality number and say the case numbers, but perhaps one could apply some (documented) offset for the sake of charting a recovery/mortality ratio line? I think we would see significant peaks and falls as the levels of virus ebb and return. I would be curious to see if there is an "elbow" where the shape of the graph suddenly climbs, eg once levels reach some high point, deaths tend to spike upwards as hospitals become overwhelmed?

I hope this isn't too ghoulish... Interesting times

Allow option to take "last n days" in load task

Currently mix covid19.load loads the whole dataset into database, which takes quite a long time. For people trying the app in a hurry or testing it out, there should be a way to load partial data so that the app can run without spemding 30 minutes loading data. Loading last n days can help with that. For example, mix covid19.load --days 10 should load data from 10 days ago till the day requested.

Something broken with the United Kingdom "recovered" numbers

Beautiful and incredible app!

The numbers of recovered look wrong on a few countries, for example the United Kingdom. Not checked the code, but I wonder if its related to fixups concerning region names or aggregations of country states to dependent countries, eg there are zero recovered in England, but UK shows the recovered as the sum of the remaining countries which do have numbers within that region?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.