How to make a data chart!
Here is tutorial about how to make a simple data chart using
First, you need to know what the data charts you will do(like OS market share, iOS version popularity,etc.), in this post, I will make the data chart of the OS market share.
2.Install the data chart
1.Open a new tab on your browser and search for <Thing> market share, when
<Thing> is the thing(like software, hardware,etc.) you like.
2.Then, choose a random website, and when click on that website, you should see a data chart and some other things for decoration and edit the data chart.
3.Next, you will see a button that help you to edit the chart, this depends on the website. When you click on that, you will some settings(like Chart Type, Period, Regions,etc.). For the chart type, I recommend you to choose
Bar as the chart type.
6.When the file is installed, open your OS's file manager, then click on
Downloads and you will see the data chart file.
7.(Optional) Rename the file to make it easier to remember.
3.Prepare the project
Now, we are done for the data chart, let's prepare the project!
1.Create a new repl project(Or a new project if you are using a text editor or an IDE), then choose programming language as
2.Then, click on
Package button on your IDE or text editor or repl project.
pandas and click on the first one.
4.Click on the
+ button in repl(Or
Install if you are using text editor or IDE), because I have install
pandas before so you will see the
7.If you are using a text editor or an IDE, just move the data chart file to the project folder.
Now, it's time for code! This is the easiest part when you just need to type 3 Python codes and you will finished the program.
1.Type this command to import the
pandas package as
immport pandas as pd
DataChart = pd.read_csv("OSMarketShare.csv")
In the code, DataChart will contains the content of the data chart file(which is
OSMarketShare.csv because I renamed it).
The code will print the DataChart var which contains the content of the data chart file.
4.This is all the code in the program:
5.Now, run the program and you should see the output somewhat like this(sorry for the pic is kinda sucks):
And that's the end of this tutorial! Upvote it if you like it! :D
Have any problem or like it or want to give me a suggest? Just comment down below!