Skip to content
๐Ÿฆ  A CLI to fetch and compare the 2019 coronavirus pandemic statistics. It also fetches historical data and attempts to draw histograms of it to visualise the rate of infections.
Ruby Shell
Branch: master
Clone or download

Latest commit

Latest commit d7f5f84 Apr 5, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Rubocop Apr 2, 2020
exe Rubocop Apr 2, 2020
lib Differentiate rows (#97) Apr 5, 2020
spec Allow for all US state comparison and fix specified state comparison (#โ€ฆ Apr 5, 2020
.gitignore Basic functionality Mar 21, 2020
.rspec Initial commit Mar 20, 2020
.travis.yml Initial commit Mar 20, 2020
CODE_OF_CONDUCT.md Initial commit Mar 20, 2020
Gemfile Rubocop Apr 2, 2020
Gemfile.lock Differentiate rows (#97) Apr 5, 2020
LICENSE.txt Initial commit Mar 20, 2020
README.md Allow for all US state comparison and fix specified state comparison (#โ€ฆ Apr 5, 2020
Rakefile Rubocop Apr 2, 2020
kovid.gemspec Bump version (#93) Apr 3, 2020

README.md

Gem Version Open Source Helpers

If you're looking to consume this in your Ruby-based application, you might want to check Sarskov out. Sarskov returns statistics in a JSON format.

๐Ÿฆ  Kovid

Kovid is a small CLI app to fetch data surrounding the coronavirus pandemic of 2019. I found myself checking Wikipedia constantly for information so I thought I'd build this to provide info directly in the terminal. It's where some of us spend time more.

Code contribution and ideas welcome.

โš™๏ธ Installation

To install:

  • ๏ธ Wash your hands with soap and water for at least 20 seconds.

  • Run gem install kovid.

It's recommended you update often with gem update kovid.

โš’๏ธ Usage

You can run kovid --help to see the full list of available commands.

Commands Overview

๐Ÿ˜ท Fetching

  • kovid check COUNTRY aliased as kovid country COUNTRY.
  • kovid check COUNTRY -f aliased as kovid country COUNTRY --full.

You can get continental information with the following commands:

  • kovid africa.
  • kovid europe.
  • kovid eu. (The European Union)
  • kovid sa. (South America)
  • kovid asia.
  • kovid world. (Worldwide Statistics)

๐Ÿ‡บ๐Ÿ‡ธ๐Ÿ‡บ๐Ÿ‡ธ๐Ÿ‡บ๐Ÿ‡ธ

You can fetch US state-specific data:

  • kovid state STATE OR kovid state "STATE NAME".
  • kovid aus for data on all US states.

Provinces

You can fetch province specific data:

  • kovid province PROVINCE or kovid province "PROVINCE NAME".

๐Ÿ˜ท Comparing

  • kovid compare FOO BAR (sorts by cases DESC).
  • kovid compare FOO BAR -f OR kovid compare FOO BAR --full (sorts by cases DESC).

Where FOO and BAR are different countries.

You can compare as many countries as you want; kovid compare FOO BAR BAZ OR kovid compare FOO BAR BAZ -f

๐Ÿ‡บ๐Ÿ‡ธ๐Ÿ‡บ๐Ÿ‡ธ๐Ÿ‡บ๐Ÿ‡ธ

You can compare US states with:

  • kovid states STATE STATE Example: kovid states illinois "new york" california

You can compare provicnes with:

  • kovid provinces PROVINCE PROVINCE Example: kovid provinces ontario manitoba

๐Ÿ˜ท History

  • kovid history COUNTRY (full history).
  • kovid history COUNTRY N (history in the last N days).

NOTE: If you find it irritating to have to type kovid state STATE, covid state STATE works as well.

Histogram (Experimental) ๐Ÿงช

kovid histogram COUNTRY M.YY (draws a histogram of cases in the given month M and years YY) (If the histogram appears messy, you might want to resize your window.)

Commands Details

To fetch basic data on a country run:

kovid check ghana. If the location contains spaces: kovid check "Diamond Princess"

kovid

For full table info on a country:

kovid check italy -f OR kovid check italy --full

kovid

To compare country stats:

kovid compare germany poland spain

kovid

To compare a countries stats with a full table:

kovid compare poland italy usa china -f OR kovid compare poland italy usa china --full

kovid

To fetch state-specific data run:

kovid state colorado OR kovid state "north carolina"

kovid

To fetch EU data run:

kovid eu

kovid

To fetch data on Africa:

kovid africa

kovid

You can check historical statistics by running

kovid history italy 7 eg:

kovid

To check for total figures:

kovid world

kovid

๐Ÿ‘ฉ๐Ÿพโ€๐Ÿ”ฌ Experimental Feature

kovid histogram italy 3.20 tries to build a histogram on number of cases. In the example here 3.20 is date in the format of M.YY. If you can please play with it and report issues on how this could be improved.

kovid

Data Source

JHU CSSE GISand Data and https://www.worldometers.info/coronavirus/ via NovelCOVID/API

๐Ÿ‘จโ€๐Ÿ’ป Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

๐Ÿคฒ Contributing

There are multiple areas in this repo that can be improved or use some refactoring(there's a lot to be refactored in fact!). For that reason, bug reports and pull requests are welcome! This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

๐Ÿ”– License

The gem is available as open-source under the terms of the MIT License.

โค๏ธ Code of Conduct

Everyone interacting in the Kovid project's codebases and issue trackers is expected to follow the code of conduct.

You canโ€™t perform that action at this time.