Last active
July 26, 2020 13:28
-
-
Save vnegi10/b2def3f4da4d82a3b940208e680544d9 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
sort!(data_df,Symbol("7/24/20"),rev=true) # sort original DataFrame in descending order based on values in last column (latest date) | |
countries_sort = data_df[1:5,Symbol("Country/Region")] # list of top 5 countries | |
latest_reported_cases = data_df[1:5,Symbol("7/24/20")] # number of reported cases in top 5 countries | |
gr(size=(700,400)) | |
display(bar(countries_sort, latest_reported_cases, | |
orientation = :h, | |
xlabel = "Total number of confirmed cases", | |
ylabel = "Countries", | |
legend = false, | |
color = collect(1:length(countries_sort)), | |
bar_width = 0.50, | |
linecolor = :match, | |
yflip=true, | |
grid = false, | |
framestyle=:semi, | |
)) | |
savefig("Top_five.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment