Full text
Universidade do Minho Escola de Engenharia Guilherme Henrique Dourado da Cruz Soares Leveraging Apache Superset: A Business Intelligence Solution June 2023 Leveraging Apache Superset: A Business Intelligence Solution Guilherme Henrique Dourado da Cruz Soares UMinho | 2023
Guilherme Henrique Dourado da Cruz Soares Leveraging Apache Superset: A Business Intelligence Solution June 2023 Master’s Work Dissertation Report Integrated Master’s in Engineering and Management of Information Systems Work performed under the supervision of Prof. Miguel Abrunhosa de Brito
ii COPYRIGHT AND TERMS OF USE OF THE WORK BY THIRD PARTIES This is an academic work that can be used by third parties as long as the internationally accepted rules and good practices are respected, with regard to copyright and related rights. Thus, the present work can be used under the terms foreseen in the license indicated below. If the user needs permission to be able to use the work under conditions not provided for in the indicated licensing, he/she should contact the author, through the RepositóriUM of the University of Minho. Atribuição CC BY https://creativecommons.org/licenses/by/4.0/
iii ACKNOWLEDGEMENTS First and foremost, I would like to express my gratitude to the University of Minho and all the individuals who are part of its structure for welcoming me over the past five years, where I had the opportunity to learn and grow as a person. I would like to extend my gratitude to all the colleagues and professors who accompanied me throughout my academic journey. However, a special thank you goes to my advisor, Professor Miguel Abrunhosa de Brito, for guiding me throughout the development of this dissertation. I would also like to thank CGI and all my colleagues involved in the development of this BI solution for their constant support and attentiveness. I want to highlight the important role that my family and friends played over the past nine months, as they never ceased to support me and were always a great source of motivation. Finally, I want to thank my girlfriend for being my biggest supporter and for never having any doubts about my abilities. She is responsible for the existence of this dissertation because everything would be much more difficult without her.
iv STATEMENT OF INTEGRITY I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Code of Ethical Conduct of the University of Minho.
v ABSTRACT Leveraging Apache Superset: A Business Intelligence Solution This study aims to develop a Business Intelligence (BI) solution without the need for licenses, which can be presented as an alternative to existing paid solutions in the market. Firstly, an investigation was conducted based on the available literature on the most addressed topics when developing a BI platform. This study is built upon all this knowledge, as well as the knowledge acquired throughout the platform's development. Subsequently, the development of two dashboards in Apache Superset was carried out, based on two previously developed dashboards in Microsoft Power BI. Customization of Apache Superset was necessary to achieve the highest level of similarity between the two tools. After the development, it was concluded that Apache Superset can replace Microsoft Power BI, and with this tool, it is possible to provide cheaper BI solutions with the same level of performance. Keywords: Apache Superset; Microsoft Power BI; Business Intelligence.
vi RESUMO Potenciar o Apache Superset: Uma solução de Business Intelligence Este estudo tem como finalidade o desenvolvimento de uma solução de Business Intelligence (BI) sem o recurso a licenças e que consiga se apresentar como uma alternativa às soluções pagas existentes no mercado. Primeiramente deu-se lugar a uma investigação sob a literatura disponível sobre os tópicos mais abordados aquando do desenvolvimento de uma plataforma de BI e é sobre todo este conhecimento e aquele obtido ao longo do desenvolvimento da plataforma que este estudo se baseou. De seguida deu-se lugar ao desenvolvimento de duas dashboards em Apache Superset a partir de outras duas previamente desenvolvidas em Microsoft Power BI. Para tal foi necessária uma customização do Apache Superset para que se conseguisse atingir a maior taxa de similaridade entre as duas ferramentas. Após o desenvolvimento conseguiu-se chegar à conclusão de que o Apache Superset é capaz de substituir o Microsoft Power BI e que com esta ferramenta é possível fornecer soluções de BI mais baratas e com o mesmo nível de desempenho. Palavras-chave: Apache Superset; Microsoft Power BI; Business Intelligence.
vii INDEX Copyright and Terms of Use of the Work by Third Parties ..................................................................... ii Acknowledgements ............................................................................................................................. iii Statement of Integrity ......................................................................................................................... iv Abstract............................................................................................................................................... v Resumo.............................................................................................................................................. vi Index ................................................................................................................................................. vii List of Abbreviations and Acronyms ..................................................................................................... xi List of Figures .................................................................................................................................... xii List of Symbols ................................................................................................................................. xvii List of Tables ................................................................................................................................... xviii 1. Introduction .................................................................................................................................. 19 1.1 Background and Motivation .................................................................................................... 19 1.2 Objectives ............................................................................................................................. 19 1.3 Plan Activity ............................................................................................................................ 19 1.4 Methodology .......................................................................................................................... 20 1.5 Document Organization ......................................................................................................... 22 2. State-of-the-Art .............................................................................................................................. 23 2.1 Theoretical Framework ........................................................................................................... 23 2.2 Literature Review ................................................................................................................... 27 2.2.1 Business Intelligence Applications ................................................................................... 27 2.2.2 Business Intelligence implementation and development .................................................. 30 2.2.3 Data Visualization ........................................................................................................... 31 2.2.4 Business Intelligence & Dashboard Creation .................................................................... 34 2.2.5 Apache Superset ............................................................................................................ 36
xiv Figure 62: Code – Pivot Table (4) ..................................................................................................... 85 Figure 63: Code – Pivot Table (5) ..................................................................................................... 85 Figure 64: Code – Pivot Table (6) ..................................................................................................... 86 Figure 65: Code – Pivot Table (7) ..................................................................................................... 86 Figure 66: Code – Pivot Table (8) ..................................................................................................... 87 Figure 67: Code – Pivot Table (9) ..................................................................................................... 88 Figure 68: "Pivot Table" Query .......................................................................................................... 88 Figure 69: S.M.A. Section – Power BI................................................................................................ 90 Figure 70: S.M.A. Section – Apache Superset ................................................................................... 90 Figure 71: Advanced analytics Query B ............................................................................................. 91 Figure 72: "Tipologias de Clientes e Calibres" Section – Power BI ..................................................... 93 Figure 73: "Tipologias de Clientes e Calibres" Section – Apache Superset ......................................... 93 Figure 74: “Quantidade de Clientes X Tipo de Cliente” Customization ............................................... 94 Figure 75: "Calibre Instalado X Quantidade de Clientes” Customization ............................................. 95 Figure 78: "Geografia" Section – Power BI ........................................................................................ 96 Figure 79: "Geografia" Section – Apache Superset ............................................................................ 97 Figure 80: "Faturação" Filter Section – part 1 ................................................................................... 98 Figure 81: "Faturação" Filter Section – part 2 ................................................................................... 99 Figure 82: Model Creation – step 1 ................................................................................................. 103 Figure 83: Model Creation – step 2 ................................................................................................. 103 Figure 84: Model Creation – step 3 ................................................................................................. 103 Figure 85: Model Creation – step 4 ................................................................................................. 103 Figure 86: Model Creation – part of step 5 ...................................................................................... 104 Figure 87: Cube Creation – step 1 .................................................................................................. 104 Figure 88: Cube Creation – step 2 .................................................................................................. 104 Figure 89: Cube Creation – step 3 .................................................................................................. 105 Figure 90: Cube Creation – step 4 .................................................................................................. 105 Figure 91: Cube Creation – part of step 5 ....................................................................................... 106 Figure 92: Cube Creation – part of step 5 (1) .................................................................................. 106 Figure 93: Cube Creation – step 6 .................................................................................................. 106 Figure 94: Cube Creation – step 7 .................................................................................................. 107 Figure 95: CSS Code Dashboard "Faturação" – part 1 .................................................................... 109
xv Figure 96: CSS Code Dashboard "Faturação" – part 2 .................................................................... 109 Figure 97: CSS Code Dashboard "Faturação" – part 3 .................................................................... 110 Figure 98: CSS Code Dashboard "Faturação" – part 4 .................................................................... 110 Figure 99: CSS Code Dashboard "Faturação" – part 5 .................................................................... 110 Figure 100: CSS Code Dashboard “Faturação” – part 6 .................................................................. 111 Figure 101: CSS Code Dashboard “Faturação” – part 7 .................................................................. 112 Figure 102: "KPI's" Section – Power BI ........................................................................................... 114 Figure 103: "KPI's" Section – Apache Superset ............................................................................... 114 Figure 104: "Valor Total Faturado" Query using Jinja Templating ..................................................... 115 Figure 105: "Valor Médio Faturado" Query using Jinja Templating ................................................... 115 Figure 106: "Volume Total Faturado" Query using Jinja Templating – part 1 .................................... 116 Figure 107: "Volume Total Faturado" Query using Jinja Templating – part 2 .................................... 116 Figure 108: "Volume Médio Faturado" Query using Jinja Templating – part 1 .................................. 117 Figure 109: "Volume Médio Faturado" Query using Jinja Templating – part 2 .................................. 117 Figure 110: "Evoluções Temporais" Section – Power BI .................................................................. 118 Figure 111: "Evoluções Temporais" Section – Apache Superset ...................................................... 119 Figure 112: Dashboard Properties .................................................................................................. 120 Figure 113: "Valores Faturados" Section – Power BI ....................................................................... 121 Figure 114: "Valores Faturados" Section – Apache Superset ........................................................... 122 Figure 115: TrendLine Plugin – Code .............................................................................................. 123 Figure 116: "Quantidade de Documentos" Section – Power BI ....................................................... 124 Figure 117: "Quantidade de Documentos" Section – Apache Superset ............................................ 125 Figure 118: Query B using Jinja Templating – part 1 ....................................................................... 126 Figure 119: Query B using Jinja Templating – part 2 ....................................................................... 126 Figure 120: "#QTD DOC" and "#VOL" label colors .......................................................................... 127 Figure 121: "Documentos Faturados por Dia" Section – Power BI ................................................... 128 Figure 122: "Documentos Faturados por Dia" Section – Apache Superset ....................................... 128 Figure 123: "Análise por Dias Faturados" Section – Power BI .......................................................... 130 Figure 124: "Análise por Dias Faturados" Section – Apache Superset .............................................. 131 Figure 125: "Consumos 0 e >0 <2" Section – Power BI .................................................................. 132 Figure 126: "Consumos 0 e >0 <2" Section – Apache Superset ...................................................... 133 Figure 127: Query A Dimension ...................................................................................................... 133
xvi Figure 128: "Query B" Metric ......................................................................................................... 134 Figure 129: Query B Dimension ...................................................................................................... 134 Figure 130: "Top Consumidores" Section – Power BI ...................................................................... 136 Figure 131: "Top Consumidores" Section – Apache Superset .......................................................... 136 Figure 132: "Small Number" Plugin – Code .................................................................................... 136
xvii LIST OF SYMBOLS € Euro
xviii LIST OF TABLES Table 1 – Activity Schedule Plan ....................................................................................................... 20
19 1. INTRODUCTION 1.1 Background and Motivation This dissertation work will be developed within CGI. CGI is a Canadian multinational information technology consulting and software development company headquartered in Canada. Currently, CGI provides a Business Intelligence (BI) solution using Microsoft's Power BI tool. However, this BI solution involves the payment of licenses. The cost of licenses required for developing a BI solution represents a significant portion of the total value of the consulting service provided by CGI, meaning that the current BI solution is very expensive. Therefore, it was decided to develop a BI platform using the Apache Superset tool, as it is open-source and does not require license fees. Consequently, the aim is to replace Power BI with Apache Superset to offer a more cost-effective BI solution. 1.2 Objectives The main objective of this dissertation work is to replace Microsoft Power BI by Apache Superset and, in order to accomplish this, the following set of sub-objectives was defined: 1. Do the state of the art. 2. Explore the potential of Apache Superset. 3. Demonstrate the possibility of Apache Superset being an effective alternative to Microsoft Power BI. 4. Evaluate the viability of using Superset as a replacement for Microsoft Power BI. 1.3 Plan Activity In order to achieve the defined objectives and the needs of the stakeholders, a schedule was designed and a set of activities to be carried out. Activities: 1. Prepare a schedule.
20 2. Literature review on the existing research. 3. Theoretical Framework. 4. Study on the Apache Superset tool. 5. Design ETL processes and the treatment of the Data Warehouse. 6. Development of OLAP cubes. 7. Development of Charts. 8. Development of Dashboards. 9. Plugin development process. 10. Development of the dissertation document. 11. Validation of the work performed. Table 1 – Activity Schedule Plan The developed Activity Schedule Plan was accomplished leading to the successful finalization of the dissertation work. 1.4 Methodology The Design Science Research (DSR) methodology is used to tackle complicated issues and produce new concepts, systems, artifacts, or procedures. In order to create solutions that are both rigorously scientific and practically beneficial, it incorporates aspects from the natural and social sciences with design principles (Baskerville et al., 2018; Venable et al., 2016). The DSR methodology consists of 5 phases: Out Nov Dez Jan Fev Mar Abr Mai Jun 1 X 2 X X X X 3 X X X X 4 X X X 5 X X X X X 6 X X X X 7 X X X X 8 X X X X 9 X X X X 10 XXXXXXXXX 11 X Activities 2022 2023
21 1. Problem Identification: the first phase is responsible for identifying the problem and the perception of the stakeholders involved, this phase will be important to establish the requirements that will be essential for the development of the solution and its own design. 2. Solution Design: the second phase is responsible for the design of the solution, which implies that in this phase, the problem identified is attempted to be solved in order to meet the requirements gathered in the previous phase. 3. Implementation: the third phase oversees building a prototype that can illustrate the solution, and this prototype will be subject to analysis and testing in order to understand if the solution is really viable or not. 4. Evaluation: the fourth phase is responsible for an evaluation process of the designed and built solution, so that it can be sure that the solution created can really deal with the identified problem. 5. Reflection: the fifth phase is responsible for the reflection on the evaluation done and to decide if the solution is optimal or if it needs some design adjustments, and so repeat the phases from that point on. Therefore, the Design Science Research - DSR methodology was selected to serve as a roadmap for the development of the Business Intelligence - BI platform, because it is a methodology that performs in several scientific areas, including information systems. It can also be seen represented throughout this dissertation work marks the use of this methodology and for this, it will be possible to identify where the different phases of this methodology are integrated throughout the development process of the BI platform. In the topic "Background and Motivation" it is represented the phase - Problem Identification because it is in this topic that the problem intended to be solved is identified. The phase – Solution Design is presented in the topic "Get to know Apache Superset", where the solution is designed, and its development is decided. The phase – Implementation is illustrated in the topics "Contratos Dashboard" and "Faturação Dashboard" since these two dashboards will be the prototype of the Business Intelligence platform to be developed. The phase – Evaluation is present in the topic "Discussion of the Solution" where a critical analysis of the developed prototype is performed.
22 Finally, the phase – Reflection is inserted in the "Discussion of the Objectives" topic, where it is intended to reflect on the developed prototype and where a decision is made about the future of the solution designed and developed. 1.5 Document Organization The structure and content of this dissertation are structured in the following way: • Introduction: includes a brief introduction identifying the motivations and problems that triggered the need to develop a BI platform without paying for licenses, the objectives of the work, the activity plan responsible for organizing the work, the methodology used and the structuring of the document. • State-of-the-Art: includes the Theoretical Framework which presents a set of concepts and tools that will be addressed when developing the BI solution and a Literature Review which comprises a set of articles reviewed with the intention of building a theoretical basis before moving on to development. • Leveraging The Apache Superset Potential: includes the architecture of the solution, the installation of the tool locally so that the reader can understand how to access the tool, a brief tutorial of how to build a graph to familiarize the reader with Apache Superset and a test to see if Apache Superset can effectively replace Microsoft Power BI. • “Contratos” Dashboard: includes the development of the "Contratos" dashboard and all that it implies, this dashboard is the first part of the BI solution prototype. • “Faturação” Dashboard: includes the development of the "Faturação" dashboard and all that it implies, this dashboard is the second and final part of the BI solution prototype. • Conclusions and Discussions: includes the discussion of the methodology used, the discussion of the solution where the built prototype is evaluated, the discussion of the objectives to understand if they were effectively achieved and the future work.
23 2. STATE-OF-THE-ART 2.1 Theoretical Framework This topic will present some of the concepts that will be addressed during the development process of the Business Intelligence platform before moving on to the literature review itself. The aim is to be able to provide a knowledge base to help the reader better understand the development of the BI solution. Business intelligence (BI) is the process of using technology, applications, and data analysis to gain insights and make informed business decisions. It involves collecting, storing, and analyzing data to understand past performance and trends, as well as forecasting future performance. BI's objective is to give businesses the knowledge they require to enhance decision-making and performance. Also, Data warehousing, which is the act of gathering and storing massive volumes of data from numerous sources in a single area, is one of the essential elements of business intelligence. In contrast to data stored in silos, this enables businesses to access and analyze the data in new ways. Data visualization and reporting software can then be used to gain insights from the data, such as identifying patterns and trends. Data mining, which is the process of employing automated methods to find patterns and relationships in data, is another crucial component of business intelligence. This can be applied to find fresh opportunities as well as potential dangers and difficulties. Overall, BI is an important strategy that companies can use to gain a competitive advantage by making data-driven decisions and improving performance. However, as the development of a BI platform is being pursued, it is important to reflect on the steps that constitute the development process: 1. Identifying the business requirements: Creating a BI platform begins with this phase. It involves comprehending the organization's specific business requirements and identifying the data and insights essential to enable decision-making. 2. Data collection and preparation: Following the identification of the business requirements, the BI platform's data needs must be gathered and prepared. Data extraction from diverse sources, data cleansing and transformation, and data loading into a central repository are all included in
30 capabilities both have a big impact on the success of BI. Based on the study's findings, in order for organizations to succeed with BI, they must invest in both their technological foundation and the establishment of a favourable decision-making environment. In order to keep them in line with the organization's changing demands, the authors also advise enterprises to constantly assess and enhance their BI capabilities and decision environments. According to (Larson & Chang, 2016), the creation of more adaptable and agile BI systems is necessary given the corporate environment's growing complexity and dynamic nature. Future BI systems, according to the authors, need to be quick to adapt to shifting business requirements and also include data from many sources in real-time. The authors also emphasize the significance of data governance, security, and quality in assuring the success of BI programs. After closely considering each of the cited articles, it may be concluded that, despite the knowledge gathered about the practical applications of business intelligence solutions, further research into articles whose scope is similar to our own is necessary. 2.2.2 Business Intelligence implementation and development It was necessary to do a search based on the key words "business intelligence," "development," and "implementation" in order to find a collection of articles with a similar scope to our own. This study didn't require an organization method because it didn't turn up many articles and the selection procedure were the same as that used for the first research included in Topic 4.1. The problem identified in (Rado & Rodriguez, 2021) is that most organizations in the Electrical Industry do not have Business Intelligence solutions implemented in their business. Thus, this article aims to collect relevant information about the implementation of Business Intelligence tools through a literature review. The literature review serves to select a set of relevant articles that help substantiate the need to implement Business Intelligence tools in the Electrical Industry. According to Rado and Rodriguez it has been discovered that using georeferenced data, putting the database in the cloud, and cloud computing provide further benefits and that the electrical industry can profit from the use of business intelligence technologies because they present interesting ideas and benefits. In accordance with (Aguilar-Chávez et al., 2021) Ralph Kimball's methodology for business intelligence has been found to have a considerable impact on decision-making since it reduces report preparation time by an average of 82.10%. Additionally, there is a significant 41.74% average reduction
31 in decision-making time. With an average reliability percentage of 23.47%, there has been improvement. Additionally, the average proportion of losses on all the decisions made has decreased by 59.19%. Finally, a noticeable increase of 17.93% on average in the percentage accuracy of all decisions made, all applied from the post-test applied in the experimental group. Also advised that to have numerous data centers and platforms that are designed to meet the requirements of the business and provide greater protection to the processed information, it is advised to adopt cloud technologies in BI solutions in the future. In (Marques et al., 2020) there has been a development of a Business Intelligence platform using the Power BI tool to be able to process all data and generate information on the group's activity status. They conclude that the adoption of such a system improved not just data processing but also information quality and the speed at which it was communicated to decision-makers. It also gave various collaborators access to pertinent information and assisted their decision-making. In addition, with the implementation of this mechanism, processes such as table updates are no longer performed by employees and are now performed by Power BI, making these processes faster and, since employees no longer must do them, they have more time to do other tasks. This situation avoids wasting time and/or additional resources for the correction and/or verification of potentially flawed information. Finally, he indicates yet another benefit, that the status of the metrics may be quickly understood with the use of visual information management, and based on that, real-time action can be taken. After the analysis of this series of articles that are more familiar with the scope of our development, it can be said that the research is being established on the right track, however, there is a need to gather knowledge about the use of data visualization practices in a business intelligence context, because this will be addressed a lot during our development. 2.2.3 Data Visualization In way to perform a search that could return a set of articles related to the Data Visualization in a Business Intelligence environment the following keywords were used: "Business Intelligence" and "Data Visualization". The search was filtered so that only articles published after 2013 were available and was also ordered by the most cited articles in order to view the most relevant articles in the search itself. The method for choosing articles to include in the literature review followed the same steps as those outlined in topic 4.1.
32 According to (Sunkpho & Wipulanusat, 2020), a study is presented on the application of data analytics and visualization in understanding the patterns and trends of highway accidents. The authors looked at the use of data analytics and visualization to enhance the management of highway accidents and to offer insights into accident prevention. To accomplish this, they gathered accident data from a variety of sources, including the Department of Disaster Prevention and Mitigation, and used data visualization and analytics techniques to analyse the data. They discovered that these techniques can be used to identify patterns and trends in the data, such as the hours of the day and days of the week when accidents are more likely to occur, as well as the locations where accidents are most likely to occur. In conclusion, data analytics and visualization can help to better manage the management of highway accidents and to offer insights for accident avoidance. (J. Yang et al., 2022) intended to investigate how social media data analytics might be applied to business decision-making and to offer competitiveness-improving insights. They did this by gathering data from numerous social media networks and then analysing it using data analytics methods. They come to the conclusion that social media data analytics, by giving a clear picture of the data and making it easier to detect similarities and trends among the data, can be utilized to improve the performance of business decision making. (Choi et al., 2020) systematically examines the literature on business intelligence (BI) and social media analytics to comprehend how these technologies are applied and the advantages they offer. Has been found that social media analytics and BI are employed across a variety of industries, including marketing, customer service, and human resources, after reviewing a total of 100 articles that were published between 2010 and 2019. The key advantage of social media analytics is that it offers insights into consumer behaviour and preferences, whereas business intelligence (BI) offers insights into an organization's performance. Also was discovered that the availability and quality of data, as well as the absence of a competent personnel, are the biggest obstacles to the usage of social media analytics and BI. The authors come to the conclusion that social media analytics and business intelligence (BI) are essential for companies to remain competitive and to acquire a better understanding of their internal performance. To fully capitalize on the advantages of social media analytics and BI, they advise firms to make investments in the creation of a clear strategy, the installation of these tools, and the training of a professional personnel. (Griol-Barres et al., 2020) proposes a system implementation for text mining and natural language processing to detect weak indications of the future in the context of sustainable development.
33 The algorithm can successfully identify weak signals connected to sustainable development, such as emerging technology, shifting government regulations, and societal trends, according to the authors. Organizations can use the system's effective way to recognize and monitor these weak signals to keep on top of emerging trends and spot untapped chances for sustainable development. In end, the system implementation is a useful tool for spotting future weak signals, and it may be utilized by businesses to spot emerging trends and chances for sustainable development. To keep ahead of upcoming advancements and find fresh chances for sustainable development, they advise organizations to invest in the creation of similar systems. (Stadler et al., 2016) explores the advantages of adopting data visualization dashboards in the healthcare industry. The authors maintain that conventional approaches to data analysis in healthcare, such as spreadsheets and reports, can be employment and difficult to understand. Data visualization dashboards, on the other hand, give healthcare data a clear, interactive, and visually appealing representation. This makes it simpler for all involved parties administrators and healthcare workers—to swiftly comprehend and apply the information. The authors go on to say that using dashboards for data visualization can increase the effectiveness of data analysis in healthcare by enabling organizations to swiftly see trends and make wise choices. They underline how crucial this is given how quickly things change in the healthcare industry. (Bačić & Fadlalla, 2016) Provide an integrative framework for business data visualisation that explains the character indicators and features of visual intelligence. By enabling data to be presented in a way that is simple to understand and digest, visualization plays a crucial role in business intelligence and decision-making. This framework is designed to help businesses understand the various aspects of visual intelligence and how they can be used to improve decision-making. They claim that organizations could utilize visualization to understand sophisticated data and make smart decisions based on the data provided. In order to fully reap the advantages of visualization, the authors also stress the need for organizations to have a thorough awareness of the various traits and facets of visual intelligence. According to (Mohammed et al., 2015), the enormous amount of data being collected has made big data analytics and data visualization more crucial in the field of clinical laboratories. They propose that clinical laboratories can boost the standard of patient care by using the framework they developed to acquire insights from patient data. The authors also highlight the value of data visualization in assisting with the interpretation of complex data sets and the development of well-informed decisions based on the information provided.
34 After an analysis of the results generated by this research, there is still a need to address practical cases where the elaboration of dashboards in a business intelligence environment can be observed. This is because the creation of dashboards will be a relevant subject throughout our development. 2.2.4 Business Intelligence & Dashboard Creation In way to perform a search that could return a set of articles related to the creation of dashboards in a Business Intelligence environment the following keywords were used: "Business Intelligence", "Dashboard Creation" and "Dashboard". The search was ordered by the most cited articles so as to be able to view the most relevant articles in the search itself and also restricted so that only articles published after 2013 were available. The process of selecting articles to integrate the literature review was the same as described in topic 4.1. (Davy & Borycki, 2022) claims to have conducted a narrative literature evaluation on the application of business intelligence (BI) dashboards for patient safety and quality. The article's authors sought to investigate how BI dashboards are currently applied in the healthcare industry to assist patient safety and quality enhancement. They discovered that BI dashboards are being used to support a variety of patient safety and quality improvement activities, such as identifying and monitoring risks, tracking performance against quality indicators, and assisting in decision-making. They also highlighted the advantages of using BI dashboards in healthcare, such as the simplicity in which large amounts of data can be accessed and analysed, as well as the capacity to spot patterns and trends in the data. To improve data analyses and decision making, (Orlovskyi & Kopp, 2021) proposes a method for creating business intelligence (BI) dashboards. The researchers define the fundamental design guidelines for producing successful BI dashboards and offer suggestions for producing dashboards that may be utilized to assist data-driven decision making and proposed a design approach for creating BI dashboards that includes four key design principles: Contextualization, Navigation, Visualization, and Interaction. They recommended that these principles should be considered when creating BI dashboards to make sure that they are successful in assisting data-driven decision making. They also provided examples of how these design principles can be put into use in the real world and talked about the difficulties that organizations might encounter when putting BI dashboards into practice. (Pestana et al., 2020) explores the application of a productivity dashboard to hospital healthcare management. The administration of healthcare was improved by the productivity dashboard the authors created and used in a hospital context. The dashboard gave hospital personnel real-time information on
35 crucial performance metrics including patient flow and resource usage, enabling them to make better decisions. The dashboard, according to the authors, also helped staff members communicate better and detect and correct inefficiencies. The authors draw the conclusion that productivity dashboards have the potential to enhance hospital healthcare administration. (Khalid et al., 2020) discusses the creation of a business intelligence dashboard for fleet management that will track driver performance. The dashboard was created by the authors utilizing information from GPS and telematics technologies. Real-time information on important performance parameters, including speed, fuel consumption, and idling time, was provided through the dashboard. The dashboard gave management visibility into driver behaviour and enabled them to spot and rectify problematic driving practices, which the authors found helped to enhance driver performance. The dashboard, according to the authors, also helped to increase safety, minimize expenses, and consume less fuel. The authors come to the conclusion that business intelligence dashboards could enhance fleet management driver performance. (Martins et al., 2022) examines the design concepts that should be taken into account while creating business management dashboards. The authors perform a survey of the literature to establish the fundamental design concepts essential for producing successful dashboards. They discovered that dashboards should be made with the users in mind, giving them pertinent and useful information. Along with having a simple and uniform layout, they should also be simple to understand and utilize. The authors discovered that dashboards should be made flexible so that users can personalize them to suit their own demands. As a result, it is suggested that organizations invest in the creation of user-centred, flexible, and easy-to-use dashboards to enhance their management of their businesses. Effective dashboards are crucial for business management, and the design principles identified in this literature review should be considered when developing dashboards for business management. (Ramadhani et al., 2021) offers a data warehouse installation using the Kimball lifecycle approach and the PostgreSQL database for the creation of business intelligence dashboards. The creation of a data warehouse utilizing the PostgreSQL database and the Kimball lifecycle approach, according to the authors, is a successful strategy for creating business intelligence dashboards. They discovered that this strategy enables the effective integration and display of massive volumes of data, which can be used to enhance organizational decision-making. The creation of a data warehouse utilizing the PostgreSQL database and the Kimball lifecycle approach, according to the authors, is a successful strategy for creating business intelligence dashboards.
36 Now that knowledge has been gathered about both the creation of dashboards and all their surroundings, which is Data Visualization, only the gathering of knowledge about the platform that will be used to develop the business intelligence platform - Apache Superset, is needed. 2.2.5 Apache Superset In way to perform a search that could return a set of articles related to the use of the Apache Superset platform was used only one keyword: "Apache Superset". The search wasn’t ordered or restricted because didn't return many articles. (C. T. Yang et al., 2021) asserts that as technology has advanced, both the quantity and complexity of the data available have increased. A significant amount of data was also produced through the increased use of the Internet of Things and faster internet. Therefore, in the case of data usage in the electricity industry, the traditional architecture would not be able to support the challenges that come with Big Data, so it understood that the new design would contribute to the challenges of Big Data. So was proposed the implementation of data storage and analytic of big data lake in electricity usage using Spark. In the end it was possible to provides a completely open-source software architecture that incorporates only components from the Apache ecosystem. Apache Superset was chosen mainly because it is a tool from the Apache ecosystem and because it is an open-source tool, but also because it is very flexible and can support various power supplies. In agreement with (Michele et al., 2019), the Big Data platform DAF - Data Analytics Framework is a platform where it’s possible to transform the analysis of a large amount of data into simple visual representations with clear and effective language by all citizens. In this case the data visualization tool utilized was Apache Superset and the main reason for this choice in comparison with other data visualization tools, like Tableau and Microsoft Power BI, was that Superset is an open-source tool and it’s what this project was looking for, but on the other hand the Digital Transformation Team could have chosen other open-source data visualization tool, like Redash, however Superset has been chosen because of LDAP authentication, the high number of views, and the support of the Python Language. According to (Lau et al., 2021), where was develop the Research Computing Bazaar (RCB) software application for resource mapping and cost estimation, Apache Superset was used to study Slurm usage and AWS pricing trends based on the historical data, furthermore this tool provides daily, weekly, and monthly moving average of the time series data.
37 In line with (Bovkir & Aydinoglu, 2021), big and complicated data have been gathered through the Internet of Things (IoT), smart sensors, and wearable technology have entered our lives thanks to the concept of smart city, however, it can be difficult to extract meaningful information from large amounts of complicated data, there is the visual analytics techniques that offer a successful method for obtaining important information from massive data. In the end was concluded that data relationships can be made clear by data visualization, and flexible and creative bridges between human perception and computer systems can be constructed for a deeper understanding, furthermore dashboards are excellent tools for concentrating on the data generated by smart city installations and for making the data easier to grasp through dynamic representations. In this case study Apache Superset was chosen because with this integration, traffic density data located 250 m distant from the air quality data was integrated in PostGIS and sent to Superset. It allows connecting with other database environments, such as PostgreSQL. The Mapbox map tool is used to display stations, and OpenStreet satellite imagery served as the basemap. Additionally, bar graphs are used to display pollution value and average driving speed. Also in (Arif et al., 2019; Cui et al., 2019) as been used the Apache Superset visualization tool because their primary objective research wasn’t provide visualizations of their data or research results they needed to demonstrate it, so Apache Superset it’s the tool that fits perfect to resolve the problem because it is easy to use and intuitive, and it is open-source, which does not require the payment of expensive licenses. This is a paper that uses Machine Learning and Data Visualization to analyse the dark side and health risks caused by tobacco use. In agreement with (Guo, 2022), it is concluded that the use of visual data analysis techniques was fundamental to give meaning to the data and that it supports the measures that the state intends to implement to reduce tobacco consumption. As stated in (Ekie et al., 2021), the use of Apache Superset allowed MoHSA (Ministry of Health and Social Action) Authorities and stakeholders to evaluate the applicability and usability of this tool in a practical setting. Senegal's MoHSA has been able to efficiently utilize the enormous amount of data provided by RapidPro thanks to the creation of dashboards on daily, weekly, and monthly reporting on community-based diseases, particularly COVID-19, using REST-based service composition through mInfoSante. Additionally, it has given Senegal's government the ability to make decisions based on facts, which has greatly helped the country's efforts to combat the COVID-19 outbreak by creating and putting into action the appropriate preventative and therapeutic measures. In this case the data visualization tool
38 was chosen through a comparison process with other open-source tools, but the most suitable was Apache Superset. Another example of using Apache Superset can be seen in (Navarra et al., 2020), where the goal is to create a participatory risk management system that will enable urban residents to report information on site-specific extreme weather events, their effects, and suggestions for best-practice adaption strategies on a voluntary basis. In this example, Apache Superset was used because it can offer an environment where it is possible to create three visual dashboards, each built to assist activities based on the study scenario, and a collection of six visualization charts chosen to illustrate various features of the data, what means that the tool offers a great degree of flexibility for investigating spatial-temporal relationships in user-generated climate-related data. In (Chen et al., 2019), an architecture is presented that can efficiently import the previously existing energy data storage system into a big data platform with Data Lake, where the data visualization tool selected was Apache Superset because it has two fundamental functionalities: have a rich SQL IDE (Interactive Development Environment) enabling fast and flexible access of data and a Data Exploration Interface that converts data tables into rich visual insights, furthermore it is the best fit for the Apache ecosystem. After completing the literature review, it can be declared that there is an awareness of how the scientific community approaches projects like this and a familiarity with the latest innovations in this field of study, as well as the methods and methodologies employed. As a result, the knowledge basis necessary to proceed with the platform development, which was the purpose of the literature review, has been successfully established.
39 3. LEVERAGING THE APACHE SUPERSET POTENTIAL In this chapter, an exploration will be undertaken to examine the capabilities and potential uses of the Apache Superset tool. The purpose is to assess the tool's ability to present itself as a potential alternative to the already developed Business Intelligence platform in Microsoft Power BI. 3.1 Architecture Before moving forward with the exploration, it is important to comprehend the project's architecture, which is shown in Figure 1. In this architecture, all data transformation processes are taken into consideration, starting with the "Data Sources”, and ending with the business intelligence platform itself, which is to be developed. Figure 1: Architecture First, there is the set of "Data Sources" which come from CGI's clients. They supply this entire project, however these "Data Sources" only provide raw data, i.e., without any kind of treatment, so this same data will be submitted to an ETL - Extract Transform Load process, which will refine the data and then allocate them in the Data Warehouse. Currently, there is utilization of the Talend tool to carry out the ETL process, but the aim is to switch over to the Pentaho Data Integration - PDI tool in the future because it is an open-source solution and will make the project more affordable and client-accessible. The database engine is PostgreSQL and the DBeaver tool is used to access the database and perform querying.
46 Figure 8: Section 3 of the chart creation and customization window As a final step and to complete the instruction on creating a new chart, there is the window that will be displayed to us after clicking the "save" button. Here, the name of the chart can be chosen, and if desired, it can be added to an existing dashboard. Figure 9: Chart Recording Window
47 3.4 Get to know Apache Superset In an attempt to become more familiar with the tool, the decision was made to develop a dashboard based on a Microsoft Power BI dashboard that had already been created by a different team. Figure 10: Dasboard Pilote In order to replicate the dashboard developed in Microsoft Power BI, the first step was to ensure that the dashboard in Apache Superset had the same set of information available, and thus achieve the same goal. With regard to the information available, little or nothing differs, since the same database is used in the different cases. In Figure 10 can be noticed that it is intended to develop a set of graphics about the billing of the some company, where there is the visualization of the amount of active contracts - "Contratos", the amount of new contracts in a given period of time - "Novos", the amount of contract terminations in a certain period of time - "Rescisões", the balance between new contracts and existing terminations in a specified period of time - "Saldo" and the number of pending contracts - "Pendentes", in addition to all these indicators there are also an analysis adjacent to them, like MoM or YoY, that can change depending on the filters that are analyzed, as well as the indicators available. This dashboard provides two types of filters, a filter that defines the temporal period that will enable the analysis that are adjacent to the indicators and another filter that will refine all the available information in the dashboard so that the indicators and the respective analysis only show data related to the selected type of service. In other words, since the company is a water supply company, it presents three types of services: "Águas", "Saneamento" and "Resíduos", so these two filters will be essential to complement the analysis of all the data that feeds this dashboard and thereby generate relevant information for Company's business. However, in relation to the graphs and the way they present the information, some limitations of the platform are already visible, Figure 11.
48 However, to achieve the model dashboard the first obstacle identified was that the billing dataset did not have a temporal column, i.e., a column that presented the dates in a way that Apache Superset would recognize them. As a result, the "Big Number with Trendline" chart cannot be utilized for replication purposes because in order to build a "BigNumber with Trendline" chart, the dataset must have a time column. This plugin would have the same functionality as the ones used in the model dashboard. Hence, only the Big Number chart was utilized. To ensure the simultaneous display of both the indicator and the analysis side by side, a method was sought to combine both charts into a single representation. The solution was to use the dashboard editing "Edit CSS" feature where you could edit the page's CSS and customize the dashboard so that it would visually match the design of the sample dashboard. To be able to change the design of the dashboard shown in Figure 11 it seemed necessary to identify the classes responsible for the graphical elements presented in the dashboard and only after identifying it, the customization process could be initiated so that the graphical elements were presented in a way to replicate the design of the dashboard shown in Figure 10. The identification of the graphical elements was through the use of Google DevTools and part of the customization was also started on this feature presented by Google. The customization of the dashboard design through CSS code was through the Apache Superset - "CSS Editor" feature where code was written, part of it visible in Figure 13. The first group of code is responsible for defining the design of the upper charts and the third group of code is responsible for defining the design of the lower charts, finally the second group of code is for the design of the chart - "Pendentes". Figure 11: Dashboard replication without CSS changes
49 Figure 12 : Dashboard Definitions Window Figure 13 : CSS code
50 Even though through the solution identified above it was possible to replicate the model dashboard on Apache Superset it was concluded that this was not a viable option as the CSS code would have to be reproduced whenever required to achieve certain goals or even changed if the dashboard design was to be changed, i.e. the solution used to replicate the model dashboard was not viable even though it met the stakeholders' requirements. Therefore, in order to achieve the functionalities and design desired by the stakeholders it was then necessary to choose another path, and it was then that it was decided that the path to follow was to customize the graphics provided by Apache Superset, i.e., given that the Apache Superset platform is an open source platform, it was decided to access the source code of the platform and from there change the available code so that the graphics would comply with the functionalities presented in the model dashboard and its design. In conclusion, the development of the Business Intelligence platform in Apache Superset followed a systematic approach. Initially, there was a design phase where the solution was conceptualized. This was followed by the implementation of the solution. Subsequently, an evaluation of the solution took place, analyzing whether the intended goals were achieved. Finally, there was a reflection on the designed solution, leading to the realization that it needed to be redesigned. Figure 14: Dashboard replication with CSS changes
51 4. "CONTRATOS" DASHBOARD In this topic, will be addressed the development of the "Contratos" dashboard. This dashboard has already been developed in Microsoft Power BI. However, the goal is to produce a similar dashboard in Apache Superset. Will be discussed all relevant aspects of developing the "Contratos" dashboard, including the construction and configuration of charts, customization of existing plugins, creation and implementation of new plugins, CSS code development, and the creation of the data model and OLAP cube responsible for powering the dashboard. 4.1 Filter Section The "Contratos" dashboard features a left sidebar that provides filters to apply to the visualizations available on the dashboard. This collection of filters allows the user to view the desired dataset and perform various analyses, enabling them to gain insights from the provided information. In Figure 15 and Figure 16 are available the filters of “Contratos” dashboard. Figure 15: Filter Section – part 1
52 Figure 16: Filter Section – part 2 In the Figure 15 and Figure 16, it is possible to see the collection of available filters, which are divided into three categories: "Filtros Temporais" Filters, "Subproduto" Filters and "Tipologias" Filters. The "Filtros Temporais" Filters are used to configure temporal aspects of the data. There is the "Ano" filter, which defines the year for data analysis. There is also the "mês" filter, which defines the month for data analysis. The "Granularidade Temporal" filter determines the type of temporal analysis to be applied to the data. Lastly, the "Range Temporal" filter sets a time interval for the data, allowing for visualization of data within that specific range. The "Subproduto" Filters are used to configure which subproduct to visualize. For example, if the user wants to view data related to the subproduct "Água" they would select the "true" option. The same process applies to other subproducts. If the user wants to view the data for all subproducts, they will select "true" for all filters in this category. The "Tipologias" Filters are used to configure visualizations based on data typologies. The "Tipo de Cliente" filter restricts the data to one or more types of customers. The "Tipo de Calibre" filter restricts the data to one or more types of calibers.
53 Therefore, this collection of filters will be important for the user to analyze the data from various perspectives of their choice.
54 4.2 Dataset of "Contratos" Dashboard To supply the "Contratos" dashboard it was necessary to build the queries that would meet the requirements of the desired visualizations, by respecting the visualizations requirements. After building all the necessary queries and creating all the visualizations, it was noticed that the loading of the visualizations was very slow. When these visualizations were combined to form the "Contratos" dashboard, Apache Superset was unable to load all the visualizations efficiently, resulting in significant slowdowns and rendering the performance of the Business Intelligence platform lamentable. So as to achieve acceptable performance with Apache Superset, it was necessary to feed the Business Intelligence platform through OLAP cubes instead of having a direct connection between the Business Intelligence platform and the Data Warehouse. Therefore, it was decided to use the Apache Kylin tool for building the OLAP 2 cubes responsible for feeding the visualizations available in Apache Superset. This implementation is explained in detail in the chapter titled "Architecture," where the explanation of how this entire interface is connected and references to all the tools used for the development of this Business Intelligence platform are provided. Once inside Apache Kylin and before proceeding with the creation of the OLAP cube, it was necessary to first load the table present in the Data Warehouse, which would serve as the source for the cube. However, instead of creating a Hive table, Apache Scoop would perform the conversion by transferring the data from the existing table in the Data Warehouse to Apache Hive. After the cube is created, this Hive table would no longer be required and would be deleted. The Table that will be cloned from the Data Warehouse to Apache Kylin is "dwh_v_dm_contratov2". The table will not be represented as it is too large however the dimensions and metrics used will be addressed below in the construction of the data model. After loading the table, you proceeded to create the model that would serve as the basis for the OLAP cube. The creation of this model involved five steps: in the first step, "Model Info", you defined the name of the model; in the second step, "Data Model", you specified the fact table, which is "dwh_v_dm_contratov2", there was no need to define any dimensional tables in this case; in the third 2 For a better understanding of the process of creating the OLAP cube that will be responsible for feeding the dashboard - "Contratos" it is recommended to read the following links: https://kylin.apache.org/docs31/howto/howto_optimize_cubes.html and https://kylin.apache.org/docs31/tutorial/create_cube.html
55 step, "Dimensions", you defined the columns that would serve as dimensions in the cube, these dimensions included columns such as "cod_empresa", "dsc_tip_cliente", "dsc_tip_conta", "dsc_freguesia", "dsc_estado_contrato", "dsc_tip_contrato", "dsc_tarifa", "servico_agua", "servico_saneamento", "servico_residuos", "calibre_contratado", "data_", "ano", "last_day_month", "last_year_day", "mes", and "cod_estado_contrato"; in the fourth step, "Measures", you defined the columns that would serve as metrics in the cube, so these measures included columns such as "qtd", "qtd_novos", and "qtd_rescisoes", in the fifth step, "Settings", you specified the temporal column used for partitioning the table, which was "data_". By completing these five steps, you successfully defined the model that serves as the foundation for the OLAP cube, incorporating the appropriate dimensions, measures, and temporal partitioning for your analysis. This process is comprised in the following figures: Figure 17Figure 18Figure 19Figure 20 Figure 21. After creating the model, the next step is to create the cube. The cube creation process consists of seven steps: in the first step, "Cube Info", you established the name of the cube, the model to be used, and the email address to receive alerts regarding the cube's status; in the second step, "Dimensions", you indicated the dimensions of the cube, in this case all the dimensions from the previously created model are included; in the third step, "Measures", you defined the metrics for the cube, in this case the "SUM" expression was used for all the metrics in the model, making them part of the cube; in the fourth step, "Refresh Setting," no changes were made to the pre-defined settings; the fifth step, "Advanced Setting", allowed for more advanced configurations, here, was specified the columns "cod_empresa", "data_", "ano" and "mes" as mandatory columns and the columns "cod_estado_contrato" and "dsc_estado_contrato" were defined as "Joint Dimensions.", finally was also selected the "MapReduce" engine as the cube construction engine; in the sixth step, "Configuration Overwrites", no changes were made and in the final step, "Overview", was provided an overview of the cube's settings. So by following these seven steps, you successfully created the cube, defining its name, dimensions, measures, advanced settings, and reviewing the overall cube configuration. This process is comprised in the following figures: Figure 22Figure 23Figure 24Figure 25Figure 26Figure 27Figure 28Figure 29 Having said that, after creating the model and the cube, it was necessary to build the cube. The progress of cube creation can be monitored through the 'Monitor' window.
62 4.4 "KPI’s" Section This topic, "KPI’s" section, will provide a description and an explanation of the configuration process for this section. It will explain the creation of visualizations, the development of new plugins and the customization of existing plugins. 4.4.1 Description The "KPIs" section aims to provide a set of Key Performance Indicators, as the name suggests. In this section, each chart represents a specific KPI. The "Contratos" chart is responsible for displaying the quantity of active contracts for the specified period. The "Novos" chart displays the number of new contracts for the specified period. The "Rescisões" chart displays the number of contracts that were terminated during the specified period. The "Saldo" chart presents the balance of active contracts within a certain period, which is the result of subtracting the number of new contracts from the number of terminated contracts. The "Clientes Domiciliados" chart shows the number of clients with a domiciled account, while the "Clientes Conta Normal" chart displays the number of clients with a normal account. The "Fatura Eletrónica" chart provides the quantity of clients with electronic invoicing. Lastly, the "Pendentes" chart aims to display the quantity of contracts with a pending status of type "FAT" and "OS," while also presenting the total number of contracts in a pending state. This section allows the visualization of a set of KPIs and also provides a temporal analysis in seven out of the eight available charts. This enables the user to not only perceive the status of their KPI numbers but also understand their performance over time. Next, there is both the section produced in Microsoft Power BI – Figure 31 and in Apache Superset – Figure 32 available.
63 Figure 31: "KPI's" Section – Power BI Figure 32: "KPI's" Section - Apache Superset It is already possible to see that both sections show high levels of similarity. This is due to several factors such as CSS code production, the use of appropriate plugins, customization of existing plugins, the creation of new plugins, and chart configuration. 4.4.2 Configuration In order to achieve the highest level of similarity between Apache Superset and Microsoft Power BI, a set of customizations were necessary at both the code level of Apache Superset and through configuration settings within the platform.
64 Apache Superset was able to offer a plugin called "BigNumber with Trendline" that could present a KPI like in Power BI, Figure 33, however there was a lack of the analysis description and a similar design to be able to produce a section like the one presented in Power BI. It should be remembered that the "BigNumber with Trendline" plugin will be used because the problem of the lack of time column in the dataset has been overcome. Figure 33: "BigNumber with Trendline" before customization Therefore, it was necessary to customize the "BigNumber with Trendline" plugin, which in terms of functionality was able to perform at the same level as Microsoft Power BI. However, adjustments were needed in terms of design. Firstly, it became possible for the user to choose between monthly or annual time granularity. Depending on the selection, the legend of the KPI analysis would change to the respective acronym, either MoM (Month over Month) or YoY (Year over Year) - Figure 34. These and all other changes implemented in the Apache Superset code were developed using the available development server at "localhost:9000". Figure 34: Dynamic Configuration
65 In order to make the visualization of the analysis type dynamic based on the selected time granularity by the user, the following code was added to the “transformProps.ts” file located in the “BigNumberWithTrendline” folder. In this code - Figure 35, it is possible to see the creation of the variable "analysis" which will store the analysis description based on the conditions set for the "granularity" variable. Figure 35: Code – MoM & YoY However, in order to develop this code, it was necessary to determine the values that the "granularity" variable encompassed. Despite the "dropdown" presenting values such as "Month" and "Year," these were not the values stored in the variable. Therefore, it was necessary to search through the code to find the corresponding values that were assigned to "Month" and "Year". From the Figure 36, it is possible to see that the monthly granularity corresponds to the value "P1M" and the annual granularity corresponds to the value "P1Y". Dynamism was not developed for other granularities because there is no intention to analyze the data using those granularities, with the exception of the daily granularity, where the addition of a suffix to the analysis is not desired. Figure 36: Code – Granularity Values After implementing this first functionality in the "BigNumber with Trendline" plugin, a code modification was made to include the analysis acronym, the numerical difference compared to the previous period, and the percentage difference in the "subheader". To achieve this, the following modification was made as shown in the Figure 37.
66 Figure 37: Code – Subheader Finally, in the same "transformProps.ts" file, a customization of the code responsible for generating the trendline chart below the KPI was made. This customization was necessary to ensure that the trendline chart had the same design as the one presented in Microsoft Power BI, as is possible to see in Figure 38 and Figure 39.
67 Figure 38: Code – Trendline (1)
68 Figure 39: Code – Trendline (2) As a result of a series of customizations made to the Apache Superset code, a plugin has been successfully developed. The plugin now possesses a design and functionality similar to what is offered by Power BI, Figure 40. Figure 40: "BigNumber with Trendline" after Customizations
69 In order to achieve the final design shown in Figure 32, it was through the CSS code developed, code that was discussed in topic: CSS Code. This "BigNumber with Trendline" plugin was used to build the following charts: “Contratos”, “Novos”, “Baixas”, “Saldo”, “Clientes Domiciliados”, “Clientes Conta Normal” and “Fatura Eletrónica”. To build the "Contratos" chart in the "KPI's" section, modifications were made in both the "DATA" and "CUSTOMIZE" sections during the chart configuration. In the "DATA" section, the temporal column was set to "DATA_" – Figure 41. Additionally, a filter was defined – Figure 42, that modifies the database query based on the selected temporal granularity. For example, if the temporal granularity is set to monthly ("P1M"), the query is altered to include "LAST_DAY_MONTH is true AND". The same applies when visualizing with an annual granularity. Figure 41: Configuration - Time Column This filter was defined because the dataset that feeds this chart includes a column named "QTD" which provides the quantity of active contracts for each day. In order to perform a monthly analysis, it is only interesting in the active contracts at the end of each month. Therefore, the last day of each month was identified. By calculating the metric "SUM(QTD)" with the condition "LAST_DAY_MONTH is true AND" added to the query, only the quantity of active contracts at the end of each month will be displayed. This allows for a MoM – Month over Month or YoY – Year over Year analysis. Figure 42: Configuration - Filter Jinja Templating
70 Finally, in the "DATA" section also defined the filter – “COD_ESTADO_CONTRATO = 12” and the "COMPARISON PERIOD LAG" was set to "1" and the checkbox for displaying the "Trend Line" was enabled. This allows for the visualization of the KPI along with its temporal evolution over the defined period. In the "CUSTOMIZE" section, the "NUMBER FORMAT" was set to "Original value" - Figure 43, so that thousands are not replaced with "k" and millions with "M". This ensures that the user can view the information in the most accurate way possible. Figure 43: Configuration - Number Format The "Clientes Domiciliados" chart uses the metric "SUM(QTD)" and the following filter: "DSC_TIP_CONTA = 'Conta Domiciliada'". The rest of the configurations were the same as the "Contratos" chart. On the other hand, the "Clientes Conta Normal" chart differs only in the filter definition, where the following filter was set: "DSC_TIP_CONTA = 'Conta Normal'". The "Novos", "Baixas", and "Saldo" charts did not require the granularity filter from Figure 42. Instead, they used the following metrics: "SUM(QTD_NOVOS)", "SUM(QTD_RESCISOES)", and "SUM(QTD_NOVOS) - SUM(QTD_RESCISOES)" respectively. However, no additional filter was necessary, and the rest of the chart configuration was exactly the same as the "Contratos" chart. The "Fatura Eletrónica" chart uses dummy data because there are currently no suitable data available to populate the visualization. This is a temporary measure until a viable solution is found. The "Pendentes" chart is a "KPI CHART" type, which is a custom plugin created to achieve the highest level of similarity between Apache Superset and Microsoft Power BI. This was necessary because Apache Superset does not provide a built-in chart that can display multiple KPIs at the same time. The development process of the "KPI CHART" plugin involved duplicating the relevant files from the "Radar" plugin, as it was a plugin capable of displaying the results of multiple metrics simultaneously. Therefore, the first step was to identify which variables stored the results of the metrics in the Apache Superset code - Figure 44, and then create a visualization identical to the one presented in Microsoft Power BI.
71 Figure 44: Code – Metric Values After discovering that the values of the metrics were stored in the following array: "echartOptions.series.data.values[]", it was decided to store the value of each metric in a respective variable. This was done to simplify their usage during the construction of the visualization code, available in Figure 45, Figure 46 and Figure 47. Figure 45: Code – KPI Chart (1)
78 4.6 "Clientes Domiciliados" Section In this topic, it will be provided a description of the "Clientes Domiciliados" section and an explanation of the configuration process for this section. 4.6.1 Description The "Clientes Domiciliados" section aims to provide two visualizations that differentiate clients based on the type of account they have and the type of client they are for the organization. The "Evolução Temporal Clientes Domiciliados" chart is a visualization that analyzes the temporal evolution of the quantity of clients with a normal account, the temporal evolution of the quantity of clients with a domiciled account, the temporal evolution of the percentage of clients with a normal account relative to the total and the temporal evolution of the percentage of clients with a domiciled account relative to the total. In this chart, it is possible to track the temporal evolution of these four KPIs and make comparisons between them. There is a difference compared to the chart in Microsoft Power BI, as it does not display the percentage of clients with a normal account relative to the total and the quantity of clients with a domiciled account, in Apache Superset, these KPIs were added because they are deemed important for the analysis of the existing ones, especially for comparison purposes. The "Domiciliados vs Não Domiciliados" chart is a visualization that analyzes clients by both account type and client type, meaning it aims to visualize the quantity of clients of a certain type with a certain type of account over time. This chart is not similar to the one in Microsoft Power BI, mainly because Apache Superset does not offer a chart of the same type or an alternative that would allow for a similar visualization. Furthermore, the Apache Superset community does not currently provide any plugins that could serve as a solution for producing a similar visualization. It did not make sense for me or the team to invest time in developing a plugin for this purpose, however, the chart produced in Apache Superset provides the same information as the one available in Microsoft Power BI and enables the same analyses of the relevant information.
79 Figure 52: "Clientes Domiciliados" Section – Power BI Figure 53: "Clientes Domiciliados" Section – Apache Superset 4.6.2 Configuration For the construction of the "Evolução Temporal Clientes Domiciliados" chart, a "Mixed Time- Series" chart type was used. In the "Query A" section, the metric "SUM(QTD)" was used, and the description of the account type was set as a dimension of the defined metric, this means that the metric will be visualized for both clients with a "Conta Domiciliada" and clients with a "Conta Normal". In the "Query A" section, a filter "COD_ESTADO_CONTRATO = 12" was defined, along with the filter mentioned in the "KPI's" section using Jinja Templating. In the "Query B" section, a metric was defined to provide the percentage of the quantity of clients with a "Conta Normal" relative to the total, and the same for clients with a "Conta Domiciliada" - Figure 54. The "Query B" section only includes a different metric, while the filters and dimensions remain the same as defined in the "Query A" section.
80 Figure 54: Percentage Metric Regarding the configuration of this chart, it was chosen to use a bar chart visualization for the metric in "Query A" – Figure 55 and a line chart visualization for the metric in "Query B" – Figure 56. Additionally, the secondary Y-axis was defined for "Query B" and the primary Y-axis for "Query A" to achieve the final visualization. Figure 55: "Query A" customization
81 Figure 56: "Query B" customization The "Domiciliados vs Não Domiciliados" chart is a "Time-Series Bar Chart" type. The metric "SUM(QTD)" was defined, along with the filter "COD_ESTADO_CONTRATOS = '12'" and the filter using Jinja Templating mentioned in the "KPI's" section. The dimensions "DSC_TIP_CONTA" and "DSC_TIP_CLIENTE" were set to analyze the metric by different types of accounts and different types of clients. Additionally, the chart was customized by selecting the "SHOW VALUE" checkbox to display the metric values. The practical example of creating this section shows that while Apache Superset can be used as a Microsoft Power BI substitute, it falls short of meeting all of its requirements. Users will, however, continue to have concerns because it does not charge for software licensing.
82 4.7 "Pendentes" Section In this topic, it will be provided a description of the "Pendentes" section and an explanation of the configuration process for this section. 4.7.1 Description The "Pendentes" section includes only one chart, which is the "Ordens de Serviço" and does not include the corresponding "Faturação" chart due to the lack of data required for its construction – Figure 57 and Figure 58. The "Pendentes" chart aims to provide a visualization that gives an overview of the number of service orders of the types "Instalação Contador" or "Verificação Contador" and their respective statuses, such as "Gerada", "Programada", and "Em Progresso" Additionally, it is possible to also see how many days the oldest service order of a specific type and status has been in the system. For example, it is possible to observe that the oldest service order of the type "Instalação Contador" and status "Em Progresso" has been in the system for 5141 days. The purpose of this functionality is to alert users about service orders that have been in the system for a while. Figure 57: "Pendentes" Section – Power BI
83 Figure 58: "Pendentes" Section – Apache Superset 4.7.2 Configuration To build the "Pendentes" chart, it was necessary to develop the plugin, namely the "PIVOT TABLE" plugin. The development process began with replicating the files of the "Radar" plugin, which was previously used to build the "KPI Chart" plugin. This replication method was chosen because the goal was to leverage the way the plugin handles and uses data while modifying how it presents the data. Knowing the variable responsible for storing the metric values, the code was developed to generate a "Pivot Table" visualization. The code developed for this purpose will be provided in the following figures: Figure 59, Figure 60, Figure 61, Figure 62, Figure 63, Figure 64, Figure 65, Figure 66 and Figure 67. Figure 59: Code – Pivot Table (1)
84 Figure 60: Code – Pivot Table (2) Figure 61: Code – Pivot Table (3)
85 Figure 62: Code – Pivot Table (4) Figure 63: Code – Pivot Table (5)
86 Figure 64: Code – Pivot Table (6) Figure 65: Code – Pivot Table (7)
87 Figure 66: Code – Pivot Table (8)
94 Figure 74: “Quantidade de Clientes X Tipo de Cliente” Customization In the case of the visualization "Calibre Instalado X Quantidade de Clientes", since it uses a plugin imported from the community called "Waterfall", the configuration section is slightly different from the built-in Apache Superset plugins. In order to achieve the visualization, it was necessary to set the "XAXIS COLUMN" as the "CALIBRE_INSTALADO" column and the "PERIOD COLUMN" as the "year_month" column. Next, the metric was defined as "SUM(QTD)" to analyze the quantity of clients. Then, the filters were defined, including the filter responsible for the dynamic time granularities and the "COD_ESTADO_CONTRATO IN ('12')" filter to only visualize active contracts, Figure 75.
95 Figure 75: "Calibre Instalado X Quantidade de Clientes” Customization
96 4.10 "Geografia" Section In this topic, it will be provided a description of the "Geografia" section and an explanation of the configuration process for this section. 4.10.1 Description The “Geografia” section aims to analyze the quantity of active contracts per parish within a specific municipality. This analysis can be done using either a table or a map visualization, it is possible to see on Figure 76 and Figure 77. Figure 76: "Geografia" Section – Power BI
97 Figure 77: "Geografia" Section – Apache Superset 4.10.2 Configuration Since the data presented in the "Quantidade de Clientes X Freguesia" visualizations are dummy data, there won't be an explanation and demonstration of the configuration for the visualizations in this section. Even so, the plugin used for the left graph was "Table" and for the right graph was "deck.gl Polygon".
98 5. "FATURAÇÃO" DASHBOARD In this topic, it will be discussed the construction of the "Faturação" dashboard, which aims to serve as further proof that Apache Superset can be an alternative to paid business intelligence solutions. This development will be explained following the same structure as the "Contratos" dashboard for better understanding by the reader. 5.1 Filter Section The filter section of the "Faturação" dashboard, as it is possible to see in Figure 78 and Figure 79, consists of two categories: the first category, "Filtros Temporais", includes filters related to temporal aspects of the data. It includes a filter to select the calendar year – "Ano", a filter to select the calendar month – "Mês", and a filter to define the temporal granularity – "Granularidade Temporal". The second and last category, "SubProduto", includes three filters: "Serviço Água" (Water Service), "Serviço Saneamento" (Sanitation Service), and "Serviço Resíduos" (Waste Service). These three filters allow the user to select the specific services of the organization they want to analyze. Figure 78: "Faturação" Filter Section – part 1
99 Figure 79: "Faturação" Filter Section – part 2
100 5.2 Dataset of "Faturação" Dashboard For a better understanding, it will be followed the textual structure of the "Dataset of "Contratos" Dashboard" section to explain how the model and cube supporting the "Faturação" dashboard were constructed. To supply the "Faturação" dashboard and based on the previously created dashboard in Microsoft Power BI, it was necessary to build the queries that would meet the requirements of the desired visualizations, by respecting the visualizations requirements. After building all the necessary queries and creating all the visualizations, it was noticed that the loading of the visualizations was very slow. When these visualizations were combined to form the "Faturação" dashboard, Apache Superset was unable to load all the visualizations efficiently, resulting in significant slowdowns and rendering the performance of the Business Intelligence platform lamentable. So as to achieve acceptable performance with Apache Superset, it was necessary to feed the Business Intelligence platform through OLAP cubes instead of having a direct connection between the Business Intelligence platform and the Data Warehouse. Therefore, it was decided to use the Apache Kylin tool for building the OLAP 3 cubes responsible for feeding the visualizations available in Apache Superset. This implementation is explained in detail in the chapter titled "Architecture", where the explanation of how this entire interface is connected and references to all the tools used for the development of this Business Intelligence platform are provided. Once inside Apache Kylin and before proceeding with the creation of the OLAP cube, it was necessary to first load the table present in the Data Warehouse, which would serve as the source for the cube. However, instead of creating a Hive table, Apache Scoop would perform the conversion by transferring the data from the existing table in the Data Warehouse to Apache Hive. After the cube is created, this Hive table would no longer be required and would be deleted. After loading the table, you proceeded to create the model that would serve as the basis for the OLAP cube. The creation of this model involved five steps: in the first step, "Model Info", you defined the name of the model; in the second step, "Data Model", you specified the fact table, which is " 3 For a better understanding of the process of creating the OLAP cube that will be responsible for feeding the dashboard - "Contratos" it is recommended to read the following links https://kylin.apache.org/docs31/howto/howto_optimize_cubes.html and https://kylin.apache.org/docs31/tutorial/create_cube.html
101 dwh_v_f_recibo_escalao ", there was no need to define any dimensional tables in this case; in the third step, "Dimensions", you defined the columns that would serve as dimensions in the cube, these dimensions included columns such as “cod_empresa”, “cod_tip_fatura”, “cod_tip_cliente”, “consumo”, “cod_local_consumo”, “Servico Agua”, “Servico Saneamento”, “Servico de Residuos”, “ano”, “mês_desc_1” and “timestamp_date”; in the fourth step, "Measures", you defined the columns that would serve as metrics in the cube, so these measures included columns such as "AF_EUR_FAT", "SF_EUR_FAT", "RF_EUR_FAT", "AV_EUR_FAT", "SV_EUR_FAT", "RV_EUR_FAT", "Dias Fatura", "AV_1_ESC_M3_FAT", "AV_2_ESC_M3_FAT", "AV_3_ESC_M3_FAT", "AV_4_ESC_M3_FAT", "AV_5_ESC_M3_FAT", "AV_1_ESC_M3_DEV", "AV_2_ESC_M3_DEV", "AV_3_ESC_M3_DEV", "AV_4_ESC_M3_DEV", "AV_5_ESC_M3_DEV", "AV_1_ESC_EUR_FAT", "AV_2_ESC_EUR_FAT", "AV_3_ESC_EUR_FAT", "AV_4_ESC_EUR_FAT", "AV_5_ESC_EUR_FAT", "AV_1_ESC_EUR_DEV", "AV_2_ESC_EUR_DEV", "AV_3_ESC_EUR_DEV", "AV_4_ESC_EUR_DEV", "AV_5_ESC_EUR_DEV", "SV_1_ESC_M3_FAT", "SV_2_ESC_M3_FAT", "SV_3_ESC_M3_FAT", "SV_4_ESC_M3_FAT", "SV_5_ESC_M3_FAT", "SV_1_ESC_M3_DEV", "SV_2_ESC_M3_DEV", "SV_3_ESC_M3_DEV", "SV_4_ESC_M3_DEV", "SV_5_ESC_M3_DEV", "SV_1_ESC_EUR_FAT", "SV_2_ESC_EUR_FAT", "SV_3_ESC_EUR_FAT", "SV_4_ESC_EUR_FAT", "SV_5_ESC_EUR_FAT", "SV_1_ESC_EUR_DEV", "SV_2_ESC_EUR_DEV", "SV_3_ESC_EUR_DEV", "SV_4_ESC_EUR_DEV", "SV_5_ESC_EUR_DEV", "RV_1_ESC_M3_FAT", "RV_2_ESC_M3_FAT", "RV_3_ESC_M3_FAT", "RV_4_ESC_M3_FAT", "RV_5_ESC_M3_FAT", "RV_1_ESC_M3_DEV", "RV_2_ESC_M3_DEV", "RV_3_ESC_M3_DEV", "RV_4_ESC_M3_DEV", "RV_5_ESC_M3_DEV", "RV_1_ESC_EUR_FAT", "RV_2_ESC_EUR_FAT", "RV_3_ESC_EUR_FAT", "RV_4_ESC_EUR_FAT", "RV_5_ESC_EUR_FAT", "RV_1_ESC_EUR_DEV", "RV_2_ESC_EUR_DEV", "RV_3_ESC_EUR_DEV", "RV_4_ESC_EUR_DEV", "RV_5_ESC_EUR_DEV"; in the fifth step, "Settings", you specified the temporal column used for partitioning the table, which was "timestamp_date". By completing these five steps, you successfully defined the model that serves as the foundation for the OLAP cube, incorporating the appropriate dimensions, measures, and temporal partitioning for your analysis. After creating the model, the next step is to create the cube. The cube creation process consists of seven steps: in the first step, "Cube Info", you established the name of the cube, the model to be used, and the email address to receive alerts regarding the cube's status; in the second step, "Dimensions", you indicated the dimensions of the cube, in this case all the dimensions from the previously created model are included; in the third step, "Measures", you defined the metrics for the cube, in this case the
102 "SUM" expression was used for all the metrics in the model, making them part of the cube; in the fourth step, "Refresh Setting", no changes were made to the pre-defined settings; the fifth step, "Advanced Setting", allowed for more advanced configurations, here, was specified the column "cod_empresa" as mandatory column and the columns "ano" and "mês" were defined as "Hierarchical Dimensions", finally was also selected the "MapReduce" engine as the cube construction engine; in the sixth step, "Configuration Overwrites", no changes were made and in the final step, "Overview", was provided an overview of the cube's settings. So by following these seven steps, you successfully created the cube, defining its name, dimensions, measures, advanced settings, and reviewing the overall cube configuration. Having said that, after defining the model and the cube, it was necessary to build the cube for it to be created. The progress of cube creation can be monitored through the "Monitor" window. Below are the different phases of the cube creation process in Apache Kylin to provide a better understanding of the process itself.
103 5.2.1 Model Process Creation – "RECIBO_ESCALAO" Figure 80: Model Creation – step 1 Figure 81: Model Creation – step 2 Figure 82: Model Creation – step 3 Figure 83: Model Creation – step 4
110 Figure 95: CSS Code Dashboard "Faturação" – part 3 In the following Figure 96, you can see the code responsible for highlighting the borders of the visualizations whose identifiers are mentioned. Figure 96: CSS Code Dashboard "Faturação" – part 4 In the following Figure 97, you can see the code responsible for styling the titles of each section, which allows us to achieve a similar style to what is presented in Microsoft Power BI. Figure 97: CSS Code Dashboard "Faturação" – part 5 In the following Figure 98 and Figure 99, you can see the code responsible for making the "Top Consumidores" section as similar as possible to the section already developed in Microsoft Power BI.
111 Figure 98: CSS Code Dashboard “Faturação” – part 6
112 Figure 99: CSS Code Dashboard “Faturação” – part 7 As it is possible to see, the design of the "Faturação" dashboard developed in Apache Superset is very similar to the one presented in Microsoft Power BI. This is largely due to the CSS code developed and the functionality available in the dashboard editor to customize its properties. This functionality is a significant advantage of Apache Superset as it grants us the flexibility to customize the design of the dashboard and adjust the data presentation to meet the specific requirements or preferences of any client. Therefore, the same dashboard can be presented using various designs, which can be developed tailored to specific needs.
113 5.4 "KPI’s" Section In this topic, it will be provided a description of the "KPI’s" section and an explanation of the configuration process for this section. 5.4.1 Description The "KPI's" section in the "Faturação" dashboard was designed to present a set of eight KPIs with their temporal evolution, along with a temporal analysis that can be MoM – Month over Month, YoY – Year over Year, or daily. It ultimately has the same effect as the "KPI's" section in the "Contratos" dashboard, but the information presented differs as these dashboards are targeted towards different parts of the business. In this section, there is the following charts: "Clientes Faturados" which shows the number of billed customers, "Clientes Não Faturados" which displays the number of unbilled customers, "Valor Total Faturado (€)" where the total billed amount is visualized, "Valor Médio Faturado (€)" which presents the average billed amount, "Consumo 0 (m3)" where the number of customers with zero cubic meters of consumption is shown, "Consumo > 0 < 2 (m3)" representing customers with consumption between zero and two cubic meters, "Volume Total Faturado (m3)" which displays the total billed volume, and finally, there is the chart "Volume Médio Faturado (m3)" presenting the average billed volume. You can see these charts in the following Figure 100 and Figure 101. The values displayed in each chart can be subject to filters, which are responsible for defining the time period for analyzing the values and the type of analysis performed on each KPI. As mentioned in the section topic - "KPI's" of the "Contratos" dashboard, these visualizations are the result of customizing the Apache Superset code to make them similar to the visualizations produced in Microsoft Power BI.
114 Figure 100: "KPI's" Section – Power BI Figure 101: "KPI's" Section – Apache Superset 5.4.2 Configuration In terms of configurations, to produce the visualizations in this "KPI's" section, the same settings mentioned for the "KPI's" section of the "Contratos" dashboard were used. The only difference between these two sections is the data presented since they are targeted at different areas of the business. In order to display the "Clientes Faturados" visualization, the metric used was: "COUNT(0)", and it was filtered by: "COD_TIP_FATURA <> '39'", for the "Clientes Não Faturados" visualization dummy data was used as a solution for the lack of availability of this data. Next, there is the "Valor Total Faturado (€)" visualization, which uses the metric available in Figure 102, this metric was defined using Jinja
115 Templating to make it dynamic, and it also uses the filter: "COD_TIP_FATURA <> '39'", on the other hand, for the "Valor Media Faturado" chart, the metric is a little bit different, Figure 103, using the same filter as the previous chart. Figure 102: "Valor Total Faturado" Query using Jinja Templating Figure 103: "Valor Médio Faturado" Query using Jinja Templating Next, there is the "Consumo 0 (m3)" visualization, where the metric is defined as: "COUNT(0)", and the filters are: "COD_TIP_FATURA <> '39'" and "CONSUMO = 0", however, for the "Consumo > 0 < 2" visualization, the same metric as the previous chart is used, but the filters are: "COD_TIP_FATURA <> '39'", "CONSUMO > 0", and "CONSUMO < 2". Next, there is the "Volume Total Faturado (m3)" chart, which uses the metric shown in Figure 104 and Figure 105, this metric was defined using Jinja
116 Templating to make it dynamic, and the following filter: "COD_TIP_FATURA <> '39'". Finally, there is the "Volume Médio Faturado (m3)" visualization, which uses the metric a little bit different from the previous visualization, as it is possible to see in Figure 106 and Figure 107, and it uses the same filter. Figure 104: "Volume Total Faturado" Query using Jinja Templating – part 1 Figure 105: "Volume Total Faturado" Query using Jinja Templating – part 2
117 Figure 106: "Volume Médio Faturado" Query using Jinja Templating – part 1 Figure 107: "Volume Médio Faturado" Query using Jinja Templating – part 2
118 5.5 "Evoluções Temporais" Section In this topic, it will be provided a description of the "Evoluções Temporais" section and an explanation of the configuration process for this section. 5.5.1 Description The "Evoluções Temporais" section aims to provide a temporal analysis of the selected KPIs. In this case, there is the temporal evolution of the following KPIs: the quantity of customers billed with a fixed tariff and the quantity of customers billed with a variable tariff. However, for each KPI, there is the visualization categorized by the type of service used by the customer. That is, there is visualizations for customers using the water service – "AA", customers using the sanitation service – "AR" and customers using the waste service – "RU", as it is possible to see in Figure 108 and Figure 109. Figure 108: "Evoluções Temporais" Section – Power BI
119 Figure 109: "Evoluções Temporais" Section – Apache Superset 5.5.2 Configuration For the construction of this section, it was necessary to create six "Time-Series Line Chart" graphs, which differ in the metric used. The graph configurations are exactly the same for all six graphs. In terms of general configurations shared by the six graphs in this section, the "TIMESTAMP_DATE" column was used as the time column. For customization, the "SHOW VALUES" checkbox and the "AREA CHART" checkbox were selected, an opacity of "0.5" was also defined. The metric chosen for the "AA - Tarifa Fixa (AF)" visualization was "SUM(AF_EUR_FAT)". As for the "AR - Tarifa Fixa (SF)" and "RU - Tarifa Fixa (RF)" visualizations, the metric is the same, but the abbreviation "AF" is replaced with "SF" and "RF," respectively, as indicated in the title of each visualization. In the case of the "AA - Tarifa Variável (AV)" visualization, the following metric was defined: "SUM(AV_1_ESC_M3_FAT) + SUM(AV_2_ESC_M3_FAT) + SUM(AV_3_ESC_M3_FAT) + SUM(AV_4_ESC_M3_FAT) + SUM(AV_5_ESC_M3_FAT) + SUM(AV_1_ESC_M3_DEV) + SUM(AV_2_ESC_M3_DEV) + SUM(AV_3_ESC_M3_DEV) + SUM(AV_4_ESC_M3_DEV) + SUM(AV_5_ESC_M3_DEV)". However, for the metrics of the "AR - Tarifa Variável (SV)" and "RU - Tarifa Variável (RV)" visualizations, only the abbreviation "AV" is replaced with "SV" and "RV," respectively. These visualizations do not have pre-defined filters during their construction, but they can be subject to the filters available in the dashboard's filter section. To replicate the color palette used in Microsoft Power BI, it was necessary to access the functionalities available in "Edit Dashboard". Then, "Edit Properties" was accessed, and within this
126 Figure 116: Query B using Jinja Templating – part 1 Figure 117: Query B using Jinja Templating – part 2 For the other charts, the only distinguishing aspect was the filter related to the client type code, which was changed depending on the client being analyzed. Lastly, to provide a set of charts with the same color palette as the section developed in Microsoft Power BI, the dashboard properties editing feature was used. In this feature, the colors associated with the labels "#QTD DOC" and "#VOL" were defined, as shown in the following Figure 118.
127 Figure 118: "#QTD DOC" and "#VOL" label colors
128 5.8 "Documentos Faturados por Dia" Section In this topic, it will be provided a description of the "Documentos Faturados por Dia" section and an explanation of the configuration process for this section. 5.8.1 Description The "Documentos Faturados por Dia" section consists of only one chart, "Documentos Faturados por Dia", Figure 119 and Figure 120, which aims to provide the user with a visualization of the quantity of documents billed per day within a time period chosen by the user. This allows the user to analyze the performance of this KPI in detail. Figure 119: "Documentos Faturados por Dia" Section – Power BI Figure 120: "Documentos Faturados por Dia" Section – Apache Superset
129 5.8.2 Configuration The visualization "Documentos Faturados por Dia" is derived from using a "Time-Series Line Chart" and utilizes the "TIMESTAMP_DATE" column as the temporal column. The metric applied is "COUNT(0)" without the need for any filters. In terms of customizations, this visualization only selected the "SHOW VALUES" checkbox.
130 5.9 "Análise por Dias Faturados" Section In this topic, it will be provided a description of the "Análise por Dias Faturados" section and an explanation of the configuration process for this section. 5.9.1 Description The section "Análise por Dias Faturados" aims to present a set of visualizations that can showcase the temporal evolution of the KPI "Dias Faturados" for each type of client included in the client portfolio. It includes a total of fourteen visualizations, available in the following Figure 121 and Figure 122. Figure 121: "Análise por Dias Faturados" Section – Power BI
131 Figure 122: "Análise por Dias Faturados" Section – Apache Superset 5.9.2 Configuration Since the only distinguishing factor among the fourteen visualizations in this section is the applied filter related to the type of client, it will be provided an example of the construction process for one of the visualizations. The visualization "Domésticos - DF" utilized a "Time-Series Line Chart" as the chart type and for its construction, the "TIMESTAMP_DATE" column was used as the temporal column, the following metric was applied: "SUM(DIAS_FATURA)" and the following filter was defined: "COD_TIP_CLIENTE = 91", this filter ensured that the visualization only displayed data related to clients in the "Domésticos" category. For the development of the remaining visualizations, only the client type code was changed to create a visualization for each available client type.
132 5.10 "Consumos 0 e >0 <2" Section In this topic, it will be provided a description of the "Consumos 0 e >0 <2" section and an explanation of the configuration process for this section. 5.10.1 Description The section "Consumption 0 and >0 <2" aims to make available to the user the chart - "Consumption 0 and >0 <2" which aims to analyze the amount of volume billed where consumption is zero cubic centimeters, the amount of volume billed where consumption is between zero and two cubic centimeters, the amount of volume billed where consumption is greater than or equal to two cubic centimeters, the percentage between the amount of billed volume where consumption is zero cubic centimeters and the total, the percentage between the amount of billed volume where consumption is between zero and two cubic centimeters and the total, and finally the percentage between the amount of billed volume where consumption is greater than or equal to two cubic centimeters and the total, Figure 123 and Figure 124. The analysis and inclusion of the quantity and percentage of volume billed for the consumption greater than or equal to two cubic centimeters were deemed relevant to the visualization in Apache Superset. Figure 123: "Consumos 0 e >0 <2" Section – Power BI
133 Figure 124: "Consumos 0 e >0 <2" Section – Apache Superset 5.10.2 Configuration The development of the "Consumo 0 e >0 <2" visualization started with the selection of a "Mixed Time-Series" chart type. This type of chart allows for the presentation of two datasets simultaneously, enabling a comparative analysis between the two datasets. To create this section, a new column called "COD_TIP_CONSUMO" was added to the dataset. This column serves as a flag, taking the value "0" when the consumption is equal to zero, "1" when the consumption is between zero and two, and "2" when the consumption is equal to or greater than two. This modification to the dataset required changes to the previously built OLAP cube. Both the model and the cube had to be edited to accommodate the new column. To construct this chart, the "TIMESTAMP_DATE" column was selected as the temporal column, starting with "Query A" the metric "COUNT(0)" was defined and the "COD_TIP_CONSUMO" column was chosen as the dimension. You can see the dimension in the following Figure 125. Figure 125: Query A Dimension Regarding "Query B", a metric was defined to bring us the values of the percentages of the different consumptions, as shown in the following Figure 126.
134 Figure 126: "Query B" Metric On the other hand, the dimension was defined as follows, present in the Figure 127. Regarding customizations, it was decided not to perform any. Figure 127: Query B Dimension
135 5.11 "Top Consumidores" Section In this topic, it will be provided a description of the "Top Consumidores" section and an explanation of the configuration process for this section. 5.11.1 Descripton The "Top Consumidores" section in Apache Superset presents seventeen views where ten of these views serve to represent KPI's and the other seven are bar charts that have the objective of representing the ranking of consumers, through their consumption location code, within a certain chosen metric, Figure 128 and Figure 129. This section is divided into four mini sections where the first from the left is the global section, where the total amount billed is analyzed as a KPI and below there is a bar chart that represents a ranking of the customers to whom the organization billed the most overall, i.e. including all services and fees. The other subsequent mini sections aim to identify the total amount billed within different services: AA - water service, AR - sanitation service and RU - waste service. Within each type of service, the goal is to determine the total amount billed for each tariff type. For a single service, there exists a fixed tariff and a variable tariff. Additionally, for each tariff, a bar chart is provided to present a ranking of the top customers associated with that tariff.
142 Chen, T. Y., Yang, C. T., Kristiani, E., & Cheng, C. T. (2019). On Construction of a Power Data Lake Platform Using Spark. Lecture Notes in Electrical Engineering , 542 , 99–108. https://doi.org/10.1007/978-981-13-3648-5_11 Choi, J., Yoon, J., Chung, J., Coh, B.-Y., & Lee, J.-M. (2020). Social media analytics and business intelligence research: A systematic review. Information Processing and Management , 57 (6). https://doi.org/10.1016/j.ipm.2020.102279 Cui, T., Wang, Y., & Namih, B. (2019). Build an Intelligent Online Marketing System: An Overview. IEEE Internet Computing , 23 (4), 53–60. https://doi.org/10.1109/MIC.2019.2924637 Davy, A., & Borycki, E. M. (2022). Business Intelligence Dashboards for Patient Safety and Quality: A Narrative Literature Review. In Studies in Health Technology and Informatics (Vol. 290). https://doi.org/10.3233/SHTI220113 Ekie, J., Gueye, B., Ekie, T., & Niang, I. (2021). An Evidence-Based Approach on Public Health Decisions in Low-Middle Income Countries: Use Case of Senegal at the Verge of COVID-19. Proceedings - 2021 International Conference on Digital Age and Technological Advances for Sustainable Development, ICDATA 2021 , 193–200. https://doi.org/10.1109/ICDATA52997.2021.00046 Griol-Barres, I., Milla, S., Cebrián, A., Fan, H., & Millet, J. (2020). Detecting weak signals of the future: A system implementation based on text mining and natural language processing. Sustainability (Switzerland) , 12 (19). https://doi.org/10.3390/SU12197848 Guo, Y. (2022). Tobacco Smoking: Making Progress Against the Revealing Devastating Effects Using Machine Learning and Data Visualization. Proceedings - 2022 International Conference on Big Data, Information and Computer Network, BDICN 2022 , 458–464. https://doi.org/10.1109/BDICN55575.2022.00090 Işik, Ö., Jones, M. C., & Sidorova, A. (2013). Business intelligence success: The roles of BI capabilities and decision environments. Information and Management , 50 (1), 13–23. https://doi.org/10.1016/J.IM.2012.12.001 Khalid, A. S., Hassan, N. H., Razak, N. A. A. B., & Baharuden, A. F. (2020). Business Intelligence Dashboard for Driver Performance in Fleet Management. ACM International Conference Proceeding Series , 347–351. https://doi.org/10.1145/3377571.3377642 Larson, D., & Chang, V. (2016). A review and future direction of agile, business intelligence, analytics and data science. International Journal of Information Management , 36 (5), 700– 710. https://doi.org/10.1016/J.IJINFOMGT.2016.04.013
143 Lau, M., Trivedi, S., He, Z., Pham, T., Perez, L., & Chakravorty, D. (2021). Research Cloud Bazaar: A software defined cloud workflow cost management tool. ACM International Conference Proceeding Series . https://doi.org/10.1145/3437359.3465602 Marine-Roig, E., & Anton Clavé, S. (2015). Tourism analytics with massive user-generated content: A case study of Barcelona. Journal of Destination Marketing and Management , 4 (3), 162– 172. https://doi.org/10.1016/J.JDMM.2015.06.004 Marques, R., Moura, A., & Teixeira, L. (2020). Decision support system for the industry 4.0 environment: Design and development of a business intelligence tool. Proceedings of the International Conference on Industrial Engineering and Operations Management , August . Martins, N., Martins, S., & Brandão, D. (2022). Design Principles in the Development of Dashboards for Business Management. In Springer Series in Design and Innovation (Vol. 16). https://doi.org/10.1007/978-3-030-79879-6_26 Michele, P., Fallucchi, F., & de Luca, E. W. (2019). Create Dashboards and Data Story with the Data & Analytics Frameworks. Communications in Computer and Information Science , 1057 CCIS , 272–283. https://doi.org/10.1007/978-3-030-36599-8_24 Mohammed, E. A., Naugler, C., & Far, B. H. (2015). Emerging Business Intelligence Framework for a Clinical Laboratory Through Big Data Analytics. Emerging Trends in Computational Biology, Bioinformatics, and Systems Biology: Algorithms and Software Tools , 577–602. https://doi.org/10.1016/B978-0-12-802508-6.00032-6 Nakhal A, A. J., Patriarca, R., di Gravio, G., Antonioni, G., & Paltrinieri, N. (2021). Investigating occupational and operational industrial safety data through Business Intelligence and Machine Learning. Journal of Loss Prevention in the Process Industries , 73 . https://doi.org/10.1016/j.jlp.2021.104608 Navarra, C., Opach, T., Vrotsou, K., Joling, A., Wilk, J., & Neset, T. S. (2020). Visual Exploration of Climate-Related Volunteered Geographic Information. EnvirVis 2020 - Workshop on Visualisation in Environmental Sciences , 1–7. https://doi.org/10.2312/ENVIRVIS.20201092 Orlovskyi, D., & Kopp, A. (2021). A business intelligence dashboard design approach to improve data analytics and decision making. CEUR Workshop Proceedings , 2833 , 48–59. Pestana, M., Pereira, R., & Moro, S. (2020). Improving Health Care Management in Hospitals Through a Productivity Dashboard. Journal of Medical Systems , 44 (4). https://doi.org/10.1007/s10916-020-01546-1
144 Rado, J. C. R., & Rodriguez, C. R. (2021). Business Intelligence Tools Implementing in the Field of Electrical Industry. Proceedings - 2021 IEEE 13th International Conference on Computational Intelligence and Communication Networks, CICN 2021 , 50–55. https://doi.org/10.1109/CICN51697.2021.9574665 Ramadhani, P. P., Hadi, S., & Rosadi, R. (2021). Implementation of Data Warehouse in Making Business Intelligence Dashboard Development Using PostgreSQL Database and Kimball Lifecycle Method. 2021 International Conference on Artificial Intelligence and Big Data Analytics, ICAIBDA 2021 , 88–92. https://doi.org/10.1109/ICAIBDA53487.2021.9689697 Stadler, J. G., Donlon, K., Siewert, J. D., Franken, T., & Lewis, N. E. (2016). Improving the Efficiency and Ease of Healthcare Analysis Through Use of Data Visualization Dashboards. Big Data , 4 (2), 129–135. https://doi.org/10.1089/big.2015.0059 Sunkpho, J., & Wipulanusat, W. (2020). The role of data visualization and analytics of highway accidents. Walailak Journal of Science and Technology , 17 (12), 1379–1389. https://doi.org/10.48048/wjst.2020.10739 Venable, J., Pries-Heje, J., & Baskerville, R. (2016). FEDS: A Framework for Evaluation in Design Science Research. European Journal of Information Systems , 25 (1), 77–89. https://doi.org/10.1057/ejis.2014.36 Yang, C. T., Chen, T. Y., Kristiani, E., & Wu, S. F. (2021). The implementation of data storage and analytics platform for big data lake of electricity usage with spark. Journal of Supercomputing , 77 (6), 5934–5959. https://doi.org/10.1007/s11227-020-03505-6 Yang, J., Xiu, P., Sun, L., Ying, L., & Muthu, B. (2022). Social media data analytics for business decision making system to competitive analysis. Information Processing and Management , 59 (1). https://doi.org/10.1016/j.ipm.2021.102751 Ygnacio, L. A. V., Retuerto, M. G., & Andrade-Arenas, L. (2023). Mobile application with business intelligence to optimize the control process of tourist agencies. Indonesian Journal of Electrical Engineering and Computer Science , 29 (3), 1708–1718. https://doi.org/10.11591/ijeecs.v29.i3.pp1708-1718