Key Topics


Summary


What is Data Visualization?

Definition

Data visualization is a technique to represent data through the creation of graphical and visual elements such as charts and graphs. By converting data into meaningful visuals, data visualization makes it easier for people to understand information, make informed decisions, and uncover hidden patterns or relationships within the data.

Since we aimed to make a Python-based dashboard that shows the statistics, we have learned some data visualization libraries such as Matplotlib and Plotly/Dash.

isaac-smith-6EnTPvPPL6I-unsplash.jpg

Examples

import pandas
import matplotlib.pyplot as plt
import seaborn as sns

data = pandas.read_csv("world_population2023.csv")
del data["Unnamed: 0"]
data = data.fillna(0)
data["current population"] = data["current population"].str.replace(",","")
data["population 2022"] = data["population 2022"].str.replace(",","")
data["growth rate"] = data["growth rate"].str.replace("%","")
data["world percentage"] = data["world percentage"].str.replace("%","")
data["density"] = data["density"].str.replace(",","")
data["area"] = data["area"].str.replace(".","")
data["area"] = data["area"].str.replace("M","000000")
data["area"] = data["area"].str.replace("K","000")
data["area"] = data["area"].str.replace("<","")
data = data.astype({'current population':'int', 'population 2022':'int', 'world percentage':'float', 
                    'growth rate':'float', 'density':'float', 'area':'int'})
data.sort_values(by=["current population","area"],ascending=False)