From 1aa1203ee91aa64816f379e36eb0f3d42b2b0cd8 Mon Sep 17 00:00:00 2001 From: Parth Sabale <98326728+ParthSabale@users.noreply.github.com> Date: Mon, 3 Oct 2022 16:22:57 +0530 Subject: [PATCH] Create 9-Electricity Consumption Worldwide --- projects/9-Electricity Consumption Worldwide | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 projects/9-Electricity Consumption Worldwide diff --git a/projects/9-Electricity Consumption Worldwide b/projects/9-Electricity Consumption Worldwide new file mode 100644 index 000000000..05b3758c9 --- /dev/null +++ b/projects/9-Electricity Consumption Worldwide @@ -0,0 +1,31 @@ +#Electricity Consumption Worldwide +import numpy as np +import pandas as pd +import seaborn as sns +import matplotlib.pyplot as plt + +#Importing Data +data = pd.read_csv("World_Per_Capita_Electricity_Consumption.csv") +data.info() + +#Data Preprocessing +data.describe() +data.isnull().sum() +data['Entity'].unique() +len(data['Entity'].unique()) +data['Entity'].value_counts() + +#Here we take Example of India +india_electricity_consumption = data[data['Entity']=='India'] +india_electricity_consumption.head() +india_electricity_consumption.tail() + +#Mathermatical Model & Visulization +plt.figure(figsize = (10,7)) +sns.barplot(x = 'Year', +y = 'Per capita electricity (kWh)', +hue = 'Entity', +data = india_electricity_consumption) +plt.xticks(rotation = 90) +plt.title("India Electricity Consumption") +plt.show()