-
-
Save xcobar/ab04fca0c103b0dda7cd06883690f8dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rows = [] | |
data.each do |country| | |
rows << [ | |
country['country'], | |
country['cases'], | |
country['deaths'], | |
country['recovered'], | |
check_if_positve(country['todayCases']), | |
check_if_positve(country['todayDeaths']), | |
country['critical'], | |
country['casesPerOneMillion'] | |
] | |
end | |
## TOP VS BOTTOM | |
rows = data.map do |country| | |
[country.values_at('country', 'cases', 'deaths', 'recovered')].tap { |name, *| name.upcase! } | |
end |
havenwood
commented
Mar 24, 2020
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment