Dashboard Design of Carbon Dioxide Emission and Its Effect with Population in Different Countries
Abstract
Human pursuit of comfort through industrialization and resource consumption leads to significant CO2 emissions, harming the planet and health. This study explores how different countries generate CO2 and compares their environmental impact. Using World Bank data, the research analyzes various sources like fuel types and industries, addresses data cleaning for missing values, and examines the relationship between emissions and factors like GDP and population.
Full text
Dashboard Design of Carbon Dioxide Emission and Its Effect with Population in Different Countries Md Julhas Hossain School of Science, Engineering and Environment University of Salford, Manchester, United Kingdom [email protected] ORCID: 0009-0009-4372-2269 CONTENTS I Introduction 2 II Background Research 2 II-A Interactivedesignofdashboards ........................................ 2 II-B The methodology of design / development of a dashboard system . . . . . . . . . . . . . . . . . . . . . . 2 II-C Singlescreendashboardreview......................................... 3 II-D WorldMap.................................................... 3 II-E HorizontalBars ................................................. 3 II-F PackedBubbles ................................................. 3 II-G PieChart..................................................... 3 II-H Box-and-whiskerplots.............................................. 4 II-I Side-By-SideBar ................................................ 4 III Exploration of Data Set 4 III-A DataCleaning .................................................. 4 III-A1 Step1 ................................................ 5 III-A2 Step2 ................................................ 5 III-A3 Step3 ................................................ 5 III-A4 Step4 ................................................ 5 III-A5 Step5 ................................................ 5 III-A6 Step6 ................................................ 5 III-A7 Step7 ................................................ 6 III-A8 Step8 ................................................ 6 III-A9 Step9 ................................................ 6 III-A10 Step10 ............................................... 6 III-A11 Step11 ............................................... 6 III-A12 Step12 ............................................... 7 III-A13 Step13 ............................................... 7 IV Investigation of Data Workflows & Proposal for Design of Dashboard 7 IV-A DataFrameDiagram .............................................. 7 IV-B DataWorkflows ................................................. 8 IV-C Dashboard One Diagram and Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 IV-D Dashboard Two Diagram and Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 V Discussion 9 VI Conclusions 9 References 9
1 LIST OF FIGURES 1 FullStoryBoard...................................................... 3 2 CO2emissionplots .................................................... 3 3 FlowofStoryBoard ................................................... 3 4 worldmapvisualize.................................................... 3 5 HorizontalBars ...................................................... 3 6 PackedBubbles ...................................................... 4 7 PieChart.......................................................... 4 8 Box-and-whiskerplots................................................... 4 9 Side-By-SideBar ..................................................... 4 10 Loadinglibrary ...................................................... 5 11 renametheheaders .................................................... 5 12 droppingemptyrows ................................................... 5 13 replacingwithNaNvalues ................................................ 5 14 missingvaluecolumns .................................................. 5 15 Identitycolumn ...................................................... 5 16 Valuecolumn ....................................................... 6 17 normalizationlamdamethod ............................................... 6 18 merging(identity+value) ................................................ 6 19 randomimputation..................................................... 6 20 missingvalueresolved .................................................. 6 21 removingmissingvaluecolumn ............................................. 6 22 afterremovingmissingvalues .............................................. 6 23 datadescription ...................................................... 7 24 yearsumvaluecolumn .................................................. 7 25 newcolumntotalvalue.................................................. 7 26 convertingtoexcelfile .................................................. 7 27 DataFrameDiagram ................................................... 7 28 relationofyearandvalue................................................. 8 29 DataWorkflowsdiagram ................................................. 8 30 DashboardOneDiagramandConnection ........................................ 8 31 DashboardTwoDiagramandConnection ........................................ 9 LIST OF TABLES
2 Dashboard Design of Carbon Dioxide Emission and Its Effect with Population in Different Countries Abstract—Human pursuit of comfort through industrialization and resource consumption leads to significant CO2 emissions, harming the planet and health. This study explores how different countries generate CO2 and compares their environmental impact. Using World Bank data, the research analyzes various sources like fuel types and industries, addresses data cleaning for missing values, and examines the relationship between emissions and factors like GDP and population. I. INTRODUCTION In this contemporary world, people are busy for searching there comfortable life. However, for making life comfortable people hampering our world. They are making a lot of industries to build comfortable products as well as they are using natural resource of the earth for making life better. Electricity and other items like car, market, warehouse and other necessary things are making each and everyday by human being. Now the main point is that, for making life easier people generating a lot of carbon-dioxide(CO2). People don’t know how much they are generating but this carbon-dioxide (CO2) damaging our earth and peoples healthy life.In this research, we will find out how people generating carbondioxide (CO2) and impacts in many different countries and also some analysis on it. We will compare how different country damaging our earth. However, we will see some graphs and charts to analyze the carbon-dioxide (CO2) emission in different countries. On the other hand, there some missing values in our world bank data. How the researcher deal with missing values and cleared it. Therefore, In this research, we will deal with many important points of different countries like gaseous fuel, liquid fuel, manufacturing industries, construction,public service, residential buildings, solid fuel consumption, transport, intensity,connection with GDP and the population versus carbon-dioxide (CO2) emission. II. BACKGROUND RESEARCH The researcher tried to find out many categories of CO2 emission of different countries. In our dataset, there are about 34 countries, 19 series and 13 different year values.However, we used the software called Tableau for making the Data Visualization. Here in our dataset, as the researcher mentioned earlier, we have about 19 series. Each series basically represents each concept of the data. Below the series list are given: •CO2 emission (kg per 2015 US$ of GDP) •CO2 emissions (kg per 2017 PPP $ of GDP) •CO2 emissions (kg per PPP $ of GDP) •CO2 emissions (kt) •CO2 emissions (metric tons per capita) •CO2 emissions from electricity and heat production, total (% of total fuel combustion) •CO2 emissions from gaseous fuel consumption (% of total) •CO2 emissions from gaseous fuel consumption (kt) •CO2 emissions from liquid fuel consumption (% of total) •CO2 emissions from liquid fuel consumption (kt) •CO2 emissions from manufacturing industries and construction (% of total fuel combustion) •CO2 intensity (kg per kg of oil equivalent energy use) •CO2 emissions from transport (% of total fuel combustion) •CO2 emissions from solid fuel consumption (kt) •CO2 emissions from solid fuel consumption (% of total) •CO2 emissions from residential buildings and commercial and public services (% of total fuel combustion) •CO2 emissions from other sectors, excluding residential buildings and commercial and public services (% of total fuel combustion) •GDP growth (annual %) •Population, total However, we compare the series data to separate those countries. At first, we have to calculate the total value with series and country wise for all years (1960-2020) A. Interactive design of dashboards For dashboard work, we will use the tableau software for our data visualization work. However, there are 19 series and lot of concepts into the dataset. There are lot of building tools already created into the Tableau software. We can import our data to the software and then we can use those tools to make the dashboard (Fig 1). This software has some intelligence in it. As a result, It can suggest interactive data visualization design on the help of dataset concept.Some concept help us a lot to build the visualization work so easily in tableau. Therefore, In this project, the researcher made two dashboard using tableau (Fig 2) [2]. B. The methodology of design / development of a dashboard system The main method for making a dashboard is depends on the small design. Suppose, there are lot of separate concept of our data which is holding many separate visualization. When we merge all those visualization to only one place. Then it becomes a dashboard. On the other hand, when we make many dashboard then we join all of those dashboard to call it as a Storyboard (Fig 3).
3 Fig. 1. Full Story Board Fig. 2. CO2 emission plots Fig. 3. Flow of Story Board C. Single screen dashboard review In this section, we are going to describe the all individual screen which is called single screen board. However, each single screen board will tell us the concept of CO2 emission data in various matters. Therefore, our dataset’s series values basically holding the idea behind our analysis. So, for understanding the analysis with the visualization, each single screen will describe eash series CO2 emission concept. D. World Map Lets start with the world map visualization work. For this single screen dashboard, we used the tableau software to create this world map visualization. In tableau software there is a box on the right corner which always suggest us the visualization tools on the basis of the dataset. However, the researcher select the world map tools to visualize the data (Fig 4). Above picture shows us that Most of the CO2 emission is created by two country India and Norway based on our dataset. However, other country also playing the role but their amount is little among both of those two countries. Fig. 4. world map visualize E. Horizontal Bars Another visualization, we found from our dataset which is also related to CO2 emission but depends on three types of fuel such as gaseous, liquid and solid. However, we used the tableau Horizontal Bar to show this visualization (Fig 5). Fig. 5. Horizontal Bars From the picture above we can take decision that the country Austria has the most CO2 emission consumption on fuel. But it mostly use the liquid fuel consumption to produce CO2. On the contrary, We can see that Costa Rica has on the 2nd position on this fuel consumpsion CO2 emission. Costa Rica producing carbon dioxide using two different fuel consumpsion one is solid and another is liquid. Therefore, both of the emission value is equal for both fuel on that country. F. Packed Bubbles Into our dataset we have a series or category called total population of many different country. However, different country holding different number of population. In this case we are going to find out which country belongs the most population of our dataset. Here we used the Packed Bubbles Visualization from Tableau which going to help us to find out the expected result we want (Fig 6). Above figure shows us that India and China is the most populated country in the world. Our dataset also defining that United State, Bangladesh, Japan, Brazil and Pakistan also have a lot of people in their country. G. Pie Chart CO2 emission also depends on electricity and heat production too. However, In our dataset there is series data which is
4 Fig. 6. Packed Bubbles giving us the idea of electricity and heat production of each country (Fig 7). Fig. 7. Pie Chart Here into this pie chart we are getting that Denmark and Turkey is in the top position into this category. They are producing more carbon dioxide (CO2) than other countries by electricity and heat production. On the other hand, Brazil, China, Argentina and Austria they are on the second position of this category. H. Box-and-whisker plots In this box and whisker plots, we tryied to find out the country with the GDP data from our dataset. The series name we define in this section that is CO2 emission(kg per 2015 US$ of GDP), CO2 emission (kg per 2017 PPP $ of GDP) and the CO2 emission(kg per PPP $ of GDP) (Fig 8). Fig. 8. Box-and-whisker plots However, after doing the task in tableau software, we found the countries which had the highest GDP depending on carbon dioxide emission. Firstly, for 2015 GDP, we found that the Czech Republic on the highest position on GDP collection. On the other hand, for 2017 GDP, our dataset showed us Norway and Saudi Arabia on the top position on their GDP. Finally, for the all year category, Canada, Peru and United Arab Emirates gained their GDP by doing CO2 emission into the earth. I. Side-By-Side Bar There are other two important series name into our dataset first on is CO2 emission on the basis of residential building and public services and second one is CO2 emission without residential building and public service. Here we used the Side by Side bar to compare both sector to find out the perfect result (Fig 9). Fig. 9. Side-By-Side Bar Above figure showed us that CO2 emission with residential building Peru is on the top position and then Canada come into the second position. On the contrary, Our dataset gave us the information about CO2 emission without residential building that is Bangladesh, Germany and Netherlands are doing competition to win the top possiton. However, Pakistan is on the second position in this category. III. EXPLORATION OF DATA SET Most important thing for this research is the data. The university teacher referred a website link for downloading the data. The website called the ‘world bank data’. However, after selecting the data the researcher found out that there is some missing values into the Excel file. Also for the data visualization of that excel file, we need to organize the data into a simple way so that It should be clean and easy to read. On the other hand, data given by the world bank website is not so clean. As a result, we will use some technology which will help us to clean the data. The researcher preferred the Python programming language for cleaning this data excel file. A. Data Cleaning Now we will use python for cleaning our data. For doing this we need to installed python into our machine first. However, we will also need the python library manager to use its library.
5 Python library is called ‘pip’. Therefore, lets start with the first work. We need to install some package library with the help of ‘pip’. •‘pip install pandas‘ •‘pip install openpyxl‘ •‘pip install missingno‘ •‘pip install numpy‘ •‘pip install matplotlib‘ We need to create a python file and then we have to load our dataset into the python variable [1]. After getting the dataset, It was found there a lot of missing values. However, the researcher found out a solution that simple random imputation regression value can replace those missing filed easily. However, here for doing this cleaning work, we used another python process which is called ‘jupyter notebook’. 1) Step 1: we need to load all of the library for starting our work because that library will be used in future steps (Fig 10). Fig. 10. Loading library 2) Step 2: After that, we have to change the header name of the file. Because the file downloaded form the worldbank website is not organized and its header name has no naming convention. For making this easier naming convention we have to use python to change it (Fig 11). Fig. 11. rename the headers 3) Step 3: In our dataset there are some unnecessary rows which will create a problem in our data visualization work. As a result, we have to remove those rows from our dataset excel file (Fig 12). Fig. 12. dropping empty rows 4) Step 4: we have to replace the string two dot(..) from our excel file with the NAN value. Below code will help us to replace (Fig 13). Fig. 13. replacing with NaN values 5) Step 5: After replacing we have to check the column name and the missing value columns. To do that, we have to use missing-no library. It will show us a diagram which will help us to take decision which column or where our data is missing (Fig 14). Fig. 14. missing value columns From above figure we can see that our most of the year column has missing values. As a result we have to replace those missing value with some method or using some other techniques. 6) Step 6: Its best to do the data normalization work before doing any regression task for cleaning or filling the nan values. Here in our dataset we have 4 column which has no missing values and all of them are String type values. The first four column we need to separate before doing our normalization work. On the other hand, from year 1960 to year 2020 column are the value column of our dataset which is basically give us the pure idea about the dataset. As a result, we need to separate this two section into two different dataframe (Fig 15). Fig. 15. Identity column Here our first four column is stored into new dataset called ‘Describe Data’ and we name it as Identity Column.
6 On the other hand, Rest of the column we stored into another dataframe called ‘Value Data’. We divided our main dataset because we have to implement the normalization task only on our Value Column (Fig 16). Fig. 16. Value column Finally, now we can use python lambda function to do our normalization task for our dataset value column (Fig 17). Fig. 17. normalization lamda method In this lambda function, we can see that we used the ‘Linear Scaling’ Technique. After doing the normalization task we have to merge our two separated dataframe again into one dataset (Fig 18). Fig. 18. merging (identity + value) 7) Step 7: In this step, the data should be cleaned totally by doing regression task. Here we are going to develop a function called random imputation which will help us to fill up those NaN value filed with a numpy random data (Fig 19) In this dataset, we found that every year column have some missing values. However, we need to collect all of those missing value column or header name into a array variable. After that, we have to run a loop which will fill out all of the missing position of the dataset. Each loop iteration it will call a function called ‘random imputation’. Fig. 19. random imputation Importantly, In this regression function when it replacing the missing value with newly created value, it also creating a new column with adding word ‘imp’ with previous column. If we see that missing-no matrix figure again, It will be more understandable what this random imputation function finally did (Fig 20). Fig. 20. missing value resolved Here we can compare our cleaned data column and missing data columns after implementing the regression imputation method. 8) Step 8: We need to remove the column with the missing value because we already recovered our data into new column. If we remove those column, our dataset will be more nicer than before (Fig 21). Fig. 21. removing missing value column 9) Step 9: After removing missing values lets check the figure again for confirming that our value totally cleaned (Fig 22). Fig. 22. after removing missing values 10) Step 10: Lets see a overview of our data. Here we are going to find out number of column and row into our dataset after finishing all of the task. However, we will see the mean, std, min and max value too (Fig 23). 11) Step 11: In this step, we will calculate the total value of each row of our dataset and also we will store that value into new column in our dataset. This column name will be ‘total value’. This total value will help us a lot to make a interactive data visualization (Fig 24).
7 Fig. 23. data description Fig. 24. year sum value column 12)Step 12: If we call the missing-no library again we will see that there is another column called ‘total value’ added into our newly created dataset (Fig 25). Fig. 25. new column total value 13)Step 13: Lastly, after finishing all of the task we need to make another excel file where our dateset will stored. However, next time we can use that file into tableau or power bi software to do the data visualization work. Here we gave name of that file called ‘cleaned data co2.xlsx’ (Fig 26) [3]. Fig. 26. converting to excel file IV. INVESTIGATION OF DATA WORKFLOWS & PROPOSAL FOR DESIGN OF DASHBOARD To do the investigation for any king of work. At first, we need to think and do the planning how we will do the investigation. However, doing investigation for any research or analysis, it is important to follow the diagram. As a result, In this section we are going to design some diagram and describe it so that it can automatically detect all of our investigation. The work process I will follow to find out the investigation is given below: •Data frame diagram •Data Wrokflow •Dashboard one diagram •Dashboard two diagram Data frame diagram will investigate how our dataset are connected each other. Data workflow will find out how the researcher deal with the data. Finally, dashboard one and two diagram will show the total plan how they are connected and presented onto the dashboard. A. Data Frame Diagram Fig. 27. Data Frame Diagram The data frame diagram focuses on the connection of the dataset. In the above section, the researcher developed a diagram which is basically showing how the data table are connected with each other. The core element of our data is the country. However, everything on this coursework starts from the country data. After that, the country has some dependency called series names. All of those series belong to a specific country. Finally, all of the series names have a dependency on the year value. So the investigation from the data frame diagram is that we can not define any result for a single country without a series name. The same thing will happen if we select only series names from our dataset. On the other hand, for the year data, we can not say anything just by selecting a year column from our dataset. Year value has the dependency on to the series name. For an example, there can be multiple series name for a country but a country has no connection with countries (Fig 27). Technically we can say that, country has one to many relationship with the series name of our dataset. On the contrary, series name also has one to many relationship with the year value (Fig 28).
8 Fig. 28. relation of year and value Fig. 29. Data Workflows diagram B. Data Workflows Before doing any analysis it is recommended to prepare the data first. However, for this work, we downloaded the data from a online resource. Therefore, a lot of error was there into our dataset. In this section, we are going to describe the data workflow diagram to investigate our dataset. This investigation will find out how we prepare our data for future analysis work. Firstly, we collected our data into a excel file format. Therefore, into that file the first problem occur that is the header name of every column. The column name has no clean naming convention. As a result, the researcher fix that problem first. Secondly, after fixing column name, we found another problem that on our dataset there are some empty rows defined on the bottom position of our dataset. The researcher used the Python programming language and then removed those column from the file. Thirdly, into the excel file there are some row filed which has no value but just double dot mentioned there. As a result, we need to clean those dot position from our dataset. The researcher replaced those dot value by replacing NaN value there. Fourthly, another problem found by the researcher that all of the values of that excel file was not consistent some value is to high and some are too low. However, we used the normalization method to solve that problem from our dataset. Finally, we replace the NaN value from our dataset using a method called regression. This regression method used the python numpy library to used the random values to all of those NaN value places. Lastly, we made another excel file after doing all of the cleaning task. As a result, our dataset become ready for any kind of analysis (Fig 29). C. Dashboard One Diagram and Connection Fig. 30. Dashboard One Diagram and Connection After following data workflow, we have clean data in our hand. As a result, we developed dashboard one into tableau software. But the idea behind making that dashboard is that into our dataset series names CO2 emission, population, CO2 emission from heat and electricity and CO2 emission from gaseous, liquid, solid fuel holding the major part of our data information. On the other hand, they have a connection in between them. The middle connector is the country into the dashboard. The other four-part is also connected with the county. From the diagram, we can see that CO2 emission from electricity and heat production produced the pie chart by connecting with the country. However, CO2 emission from gaseous, liquid, and solid fuel also created a bar chart that showed how much a country produces CO2 from this fuel. On the other side, population and CO2 emission total have the major connection with the country value. Both of them made