Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Create Eye-Catching Country Rankings Using Python and Matplotlib

Member-only storyOscar LeoFollowTowards Data Science--1ShareHi, and welcome to this Tutorial, where I’ll teach you to create the chart above using Python and Matplotlib.What I like about this data visualization is its clean and beautiful way of showing how Countries rank compared to each other on a particular metric.The alternative to using a standard line chart showing the actual values get messy if some countries are close to each other or if some countries outperform others by a lot.If you want access to the code for this tutorial, you can find it in this GitHub repository.I’ve created a simple CSV containing GDP values for today’s ten largest economies for this tutorial.The data comes from the World Bank, and the full name of the indicator is “GDP (constant 2015 us$)”.If you want to know more about different ways of measuring GDP, you can look at this story, where I use the same type of data visualization.medium.datadriveninvestor.comLet’s get on with the tutorial.Step one is to rank the countries for each year in the dataset, which is easy to do with pandas.The resulting columns look like this.----1Towards Data Science👋 🗺️ Chartographer, entrepreneur, machine learning engineer, software developer, and writer.Oscar LeoinLevel Up Coding--13Bex T.inTowards Data Science--10Kenneth LeunginTowards Data Science--27Oscar LeoinLevel Up Coding--24Natassha SelvarajinTowards Data Science--9Geoinformatics--Tomas Pueyo--69Anmol TomarinCodeX--11Cornellius Yudha WijayainTowards AI--3The PyCoachinArtificial Corner--18HelpStatusWritersBlogCareersPrivacyTermsAboutText to speechTeams



This post first appeared on VedVyas Articles, please read the originial post: here

Share the post

How to Create Eye-Catching Country Rankings Using Python and Matplotlib

×

Subscribe to Vedvyas Articles

Get updates delivered right to your inbox!

Thank you for your subscription

×