Skip to content

Instantly share code, notes, and snippets.

@vnegi10
Created August 1, 2020 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vnegi10/dfac471b2b7f1187e91ebadb0627317c to your computer and use it in GitHub Desktop.
Save vnegi10/dfac471b2b7f1187e91ebadb0627317c to your computer and use it in GitHub Desktop.
sort!(data_df_recovered,Symbol("7/31/20"),rev=true) # sort original DataFrame in descending order based on values in last column (latest date)
countries_sort_r = data_df_recovered[1:5,Symbol("Country/Region")] # list of top 5 countries
latest_recovered_cases = data_df_recovered[1:5,Symbol("7/31/20")] # number of recovered cases in top 5 countries
gr(size=(700,400))
display(bar(countries_sort_r, latest_recovered_cases,
orientation = :h,
xlabel = "Total number of recovered cases",
ylabel = "Countries",
legend = false,
color = collect(1:length(countries_sort_r)),
bar_width = 0.50,
linecolor = :match,
yflip=true,
grid = false,
framestyle=:semi,
formatter = :plain
))
savefig("Top_five_recovered.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment