Merge branch 'dev'
This commit is contained in:
commit
035da24647
|
@ -2,9 +2,15 @@
|
|||
|
||||
This is a COVID-19 tracker for Linux, allowing you to track, review and save statistics for your country, others or worldwide.
|
||||
|
||||
I wrote this application mostly to get as much data about the COVID-19 outbreak as possible and try to present it in a clean manner. I hope you'll enjoy using it too.
|
||||
|
||||
#### Stats accuracy
|
||||
|
||||
The data files are retrieved from corona.lmao.ninja which in turn receives its data from the Johns Hopkins University over at [GitHub](https://github.com/CSSEGISandData/COVID-19). Basically every application uses these, and I am also cross-verifying this. So far all the data appears consistent, although the stats from this program are more detailed than most others.
|
||||
|
||||
I wrote this application mostly to get as much data about the COVID-19 outbreak as possible and try to present it in a clean manner. I hope you'll enjoy using it too.
|
||||
Over time there has been an inconsistency in Germany's stats however - most notably the new cases (on column 2) and the difference between the total cases (on column 3). Normally these should match exactly, and it's easy to see why. Column 3 on the Total stats is calculated from the difference between the total cases that day, and the day before. So basically the result is the stats that got added that day. This should normally be exactly the same as the new stats for that day (queried directly from the API), and for pretty much every other country it is. However, the new cases as reported by Germany do differ, sometimes going as low as double digits (which is insane for a country that large).
|
||||
|
||||
It's up to you to choose which stats you wish to go with, but personally I trust the calculated difference more. It also makes it apparent that Germany is not an exception in Western Europe, as much as the media tries to portray them as with their seemingly impressive stats. Not that the media is doing anything wrong there - the stats that Germany publishes do insinuate it. But they're most likely also a lie.
|
||||
|
||||
#### Dependencies
|
||||
|
||||
|
|
26
cv
26
cv
|
@ -1,11 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Variable declarations go here.
|
||||
w=14
|
||||
w=15
|
||||
dfmt="+%Y-%m-%d"
|
||||
data="$HOME/Documents/cv"
|
||||
country=$1
|
||||
[ ! -d "$data" ] && ex "mkdir -p $data"
|
||||
[ ! -d "$data" ] && mkdir -p "$data"
|
||||
[ -z $date ] && date=$(date $dfmt)
|
||||
[ -z $ydate ] && ydate=$(date -d yesterday $dfmt)
|
||||
|
||||
|
@ -17,12 +17,8 @@ then
|
|||
fi
|
||||
|
||||
# Functions go here.
|
||||
ex(){
|
||||
echo -e "> ${*}"
|
||||
$@
|
||||
}
|
||||
title(){
|
||||
local w=48
|
||||
local w=51
|
||||
printf "║ %-${w}s ║\n" "${*}"
|
||||
}
|
||||
|
||||
|
@ -36,7 +32,7 @@ get(){
|
|||
fi
|
||||
}
|
||||
getpm(){
|
||||
out "╰> Per 1M " "$(get $1) ($(echo "$(bc <<< "scale = 1; $(get $1) / 10000")%"))" ""
|
||||
out "╰> Per 1M " "$(get $1) ($(echo "$(bc <<< "scale = 1; $(get $1) / 10000")%"))" ""
|
||||
}
|
||||
yget(){
|
||||
date=$ydate
|
||||
|
@ -55,12 +51,12 @@ out(){
|
|||
}
|
||||
frame(){
|
||||
case "$1" in
|
||||
top) printf "╔══════════════════════════════════════════════════╗\n" ;;
|
||||
sep) printf "╟────────────────╫────────────────╫────────────────╢\n" ;;
|
||||
up) printf "╠════════════════╦════════════════╦════════════════╣\n" ;;
|
||||
down) printf "╚════════════════╩════════════════╩════════════════╝\n" ;;
|
||||
line) printf "╠════════════════╩════════════════╩════════════════╣\n" ;;
|
||||
bot) printf "╚══════════════════════════════════════════════════╝\n" ;;
|
||||
top) printf "╔ %-${w}s ═ %-${w}s ═ %-${w}s ╗\n" | sed "s/\ /═/g" ;;
|
||||
sep) printf "╟ %-${w}s ╫ %-${w}s ╫ %-${w}s ╢\n" | sed "s/\ /─/g" ;;
|
||||
up) printf "╠ %-${w}s ╦ %-${w}s ╦ %-${w}s ╣\n" | sed "s/\ /═/g" ;;
|
||||
down) printf "╚ %-${w}s ╩ %-${w}s ╩ %-${w}s ╝\n" | sed "s/\ /═/g" ;;
|
||||
line) printf "╠ %-${w}s ╩ %-${w}s ╩ %-${w}s ╣\n" | sed "s/\ /═/g" ;;
|
||||
bot) printf "╚ %-${w}s ═ %-${w}s ═ %-${w}s ╝\n" | sed "s/\ /═/g" ;;
|
||||
esac
|
||||
}
|
||||
result(){
|
||||
|
@ -85,7 +81,7 @@ result(){
|
|||
frame line
|
||||
if [ ! -f $data/$ydate-$country ]
|
||||
then
|
||||
title "Stats for $country appear new."
|
||||
title "Stats for $(get country) appear new."
|
||||
fi
|
||||
if [ $(get todayCases) == "0" ]
|
||||
then
|
||||
|
|
Reference in New Issue