scieee AI-readable full text Open interactive document viewer

Data Visualization and Public Policy Turning Open Data into Democratic Data

Silva, Vasco Freire Romero Ribeiro da

Abstract

In recent years, an increasing number of agencies have been designing open data platforms to not only promote transparency, but also stimulate how citizens interact within their democratic process. However, recent empirical research shows that these platforms have failed to really transform how citizens participate in governance, mainly due to overly simplistic approaches to the design of these platforms. The current landscape is composed of high volumes of raw, unstructured and fragmented datasets, which are a serious challenge for analysts and thus virtually incomprehensible for the average citizen. This project aims to combine techniques such as data integration and data visualization in order to build a narrative-inspired dashboard design that successfully allows citizens to extract meaningful insights from these open data sources.

Full text

Master Degree Program in Statistics and Information Management Data Visualization and Public Policy Turning Open Data into Democratic Data Vasco Freire Romero Ribeiro da Silva Project Work presented as partial requirement for obtaining the Master Degree in Statistics and Information Management NOVA Information Management School Instituto Superior de Estatística e Gestão de Informação Universidade Nova de Lisboa MEGI NOVA Information Management School Instituto Superior de Estatística e Gestão de Informação Universidade Nova de Lisboa Data Visualization & Public policy Turning Open Data into democratic Data by Vasco Freire Romero Ribeiro da Silva Project Work presented as partial requirement for obtaining the Master’s degree in Statistics and Information Management, with a specialization in Analysis and Information Management Supervised by Flávio L. Pinheiro, PhD, University of Minho November 2023 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 Rules of Conduct and Code of Honor from the NOVA Information Management School. [Lisboa, 30th November 2023] ii DEDICATION Aos meus pais, pelos bons exemplos e apoio que me deram durante toda a minha vida. Aos meus sogros, pelo incentivo e apoio que se revelou fulcral para a minha inscrição no mestrado. Ao Ruca, por ter sido o primeiro a fazer-me acreditar no meu potencial e cuja influência foi decisiva no meu percurso académico. À Rita, por revelar o melhor de mim, pelo apoio incondicional, e pelo exemplo de dedicação e excelência tanto académica como profissional que me serve de inspiração todos os dias. iii ABSTRACT In recent years, an increasing number of agencies have been designing open data platforms to not only promote transparency, but also stimulate how citizens interact within their democratic process. However, recent empirical research shows that these platforms have failed to really transform how citizens participate in governance, mainly due to overly simplistic approaches to the design of these platforms. The current landscape is composed of high volumes of raw, unstructured and fragmented datasets, which are a serious challenge for analysts and thus virtually incomprehensible for the average citizen. This project aims to combine techniques such as data integration and data visualization in order to build a narrative-inspired dashboard design that successfully allows citizens to extract meaningful insights from these open data sources. KEYWORDS Data visualization; narrative visualization; visual analytics; open data; democratic data Sustainable Development Goals (SDG): iv TABLE OF CONTENTS 1. Introduction .................................................................................................................. 1 2. Literature Review ......................................................................................................... 3 2.1. Open Data .............................................................................................................. 3 2.2. Frameworks ........................................................................................................... 5 2.2.1. Data Integration ............................................................................................. 5 2.2.2. Data Visualization ........................................................................................... 5 2.3. Visual Data Storytelling Process (VDSP) ................................................................ 6 3. Methods and Data ........................................................................................................ 8 3.1. Data Collection ...................................................................................................... 9 3.2. Budget Analysis ................................................................................................... 10 3.3. Data Warehouse .................................................................................................. 13 3.4. Data Model .......................................................................................................... 13 3.5. Building the Story ................................................................................................ 18 4. Conclusions ................................................................................................................. 25 Bibliographical References .............................................................................................. 27 v LIST OF FIGURES Figure 2.1 – VDSP model proposed by Lee et al., 2015 ............................................................. 6 Figure 3.1 – POCAL budget’s architecture ............................................................................... 11 Figure 3.2 – POCAL budget’s revenues architecture................................................................ 11 Figure 3.3 – POCAL budget’s expenses architecture ............................................................... 12 Figure 3.4 – Lisbon and Porto budgets comparison ................................................................. 12 Figure 3.5 – Data Model ........................................................................................................... 14 Figure 3.6 – Flow chart of the application ............................................................................... 19 Figure 3.7 – First chapter expenditure dashboard ................................................................... 20 Figure 3.8 – Asking the data model if there is a deficit and where ......................................... 21 Figure 3.9 –Macedo de Cavaleiros expenditure overview ....................................................... 21 Figure 3.10 –Ponte de Lima revenue overview ........................................................................ 22 Figure 3.11 – Time series analysis Lisboa and Porto ................................................................ 23 vi LIST OF TABLES Table 3.1 – Municipalities fitting the elected criteria ................................................................ 9 Table 3.2 – Tables available in the model ................................................................................ 14 Table 3.3 – Calculated metrics available in the data model .................................................... 17 vii LIST OF ABBREVIATIONS AND ACRONYMS ETL Extract, Transform, Load OGD Open Government Data FOI Freedom Of Information VDSP Visual Data Storytelling Process POCAL Plano Oficial de Contabilidade das Autarquias Locais 7 The final component of the VDSP is the delivery of the story. It entails activities such as building a presentation, sharing the story through the presentation and handling the audience’s feedback. This is when the story is materialized onto a final product which is no longer an abstract plot but instead a final product in the form of story material (story creation with the desired medium). Lee et al., 2015 acknowledge that, in the current practice, making a story often overlaps with the presentation building phase of the telling a story component. This is common when the storyteller is sequencing visual representations whilst building the story plot. The authors argue however that an explicit distinction between the two components can add value by capturing different ways on how they can interact. 8 3. METHODS AND DATA As part of this project, I undertook a descriptive research method by analysing secondary data in a quantitative manner. The data was collected from the sources identified on chapter 3, having the specific objectives as a framework to filter the relevant data. Ultimately the model was designed bearing in mind the following major concerns: • The data collected should be transversal to all municipalities studied to allow for comparison; • The data should include 3 years for Lisbon and Porto municipalities to showcase time series analysis. These concerns were vital, as the volume of available data was higher on the most representative municipalities and thus, for our model to make sense and fulfil the objectives stated on the previous sections, I had to guarantee that we had comparable data from all municipalities. The focus of this project is to develop an insightful and engaging narrative visualization of the data so, in order to do so, instead of analysing data for all of Portugal’s 308 municipalities, I have restricted the analysis to every municipality that fits at least one of the following criteria: - Municipalities with a total number of resident inhabitants over 100.000 people; - Municipalities with a total area over 1.000 km²; - Municipalities with a population density over 1.000 inhabitants per km²; - Municipalities with a total number of parishes over 20. The tools used to undertake this work were a widespread selection of Microsoft software such as Power BI, SQL Server Management and Excel. The process started with the analysis and creation of spreadsheets in Excel with the relevant data, which was, later, imported onto Microsoft Power BI, where the data model was built. SQL Server Management software was utilized as a support tool for the design and building stages of the data model. Finally, the dashboards were designed on Power BI, with the data model serving as a data feeder for the data visualizations. 9 3.1. DATA COLLECTION As referred above, I first selected the municipalities from the municipalities that fit the elected criteria. As such, the final selection for the project was, according to the criteria, comprised of the following 67 municipalities: Table 3.1 – Municipalities fitting the elected criteria Municipality Population (inhabitants) Total area (km²) Population Density (inhab/km²) Parishes (nr) Alcácer do Sal - 1 500 - - Almada 168 852 - 2 412 - Amadora 184 812 - 7 772 - Amarante - - - 26 Arcos de Valdevez - - - 36 Barcelos 115 888 - - 61 Barreiro - - 2 059 - Beja - 1 146 - - Braga 182 802 - - 37 Bragança - 1 174 - 39 Cascais 213 775 - 2 195 - Castelo Branco - 1 438 - - Chaves - - - 39 Coimbra 134 654 - - - Coruche - 1 116 - - Covilhã - - - 21 Entroncamento - - 1 583 - Espinho - - 1 399 - Évora - 1 307 - - Fafe - - - 25 Funchal 103 889 - 1 363 - Fundão - - - 23 Gondomar 165 843 - 1 257 - Guarda - - - 43 Guimarães 151 965 - - 48 Idanha-a-Nova - 1 416 - - Leiria 125 874 - - - Lisboa 509 565 - 5 093 24 Loures 214 328 - 1 282 - Macedo de Cavaleiros - - - 30 Maia 139 306 - 1 680 - Matosinhos 175 457 - 2 811 - Mértola - 1 293 - - Mirandela - - - 30 Mogadouro - - - 21 Moita - - 1 163 - Monção - - - 24 Montalegre - - - 25 Montemor-o-Novo - 1 233 - - 10 Odemira - 1 721 - - Odivelas 162 389 - 6 119 - Oeiras 177 602 - 3 871 - Penafiel - - - 28 Ponta Delgada - - - 24 Ponte de Lima - - - 39 Porto 216 747 - 5 233 - Póvoa de Lanhoso - - - 22 Sabugal - - - 30 Santa Maria da Feira 138 535 - - 21 Santiago do Cacém - 1 060 - - São João da Madeira - - 2 772 - Seia - - - 21 Seixal 167 953 - 1 760 - Serpa - 1 106 - - Setúbal 114 702 - - - Sintra 392 145 - 1 228 - Trancoso - - - 21 Valongo - - 1 300 - Valpaços - - - 25 Viana do Castelo - - - 27 Vila do Conde - - - 21 Vila Franca de Xira 141 960 - - - Vila Nova de Famalicão 131 484 - - 34 Vila Nova de Gaia 300 245 - 1 782 - Vila Verde - - - 33 Vinhais - - - 26 Viseu - - - 25 The next step was to collect data from the budgets of Lisbon and Porto for the years of 2018, 2019 and 2020 as well as data from the year of 2018 for every other eligible municipality. The data was, whenever possible, gathered online on the municipalities’ official websites as there is already a transparency effort in Portugal to make the data available to the public. Some data, however, was inaccurate and unavailable which prompted the need to contact the municipalities directly via e-mail or telephone in order to access it. 3.2. BUDGET ANALYSIS The municipalities budgets are complex and require a careful analysis. Thankfully, they all follow a common structure approved by the law-decree nr. 54-A/99 from the 22nd February with the alterations from law nr. 162/99 from the 14th September, the law-decree nr. 315/2000 from the 2nd December, the law-decree nr. 84-A/2002 from the 5th April and the law 11 nr. 60-A/2005 from the 30th December which approved the Plano Oficial de Contabilidade das Autarquias Locais – POCAL. Although POCAL has a complex structure, it is a systematic widespread accounting plan which enables a methodical analysis of the budgets from every municipality. This proved to be essential for the building of a data model that accurately integrates the available data. Below we have a visual representation of the overall POCAL budget’s architecture: Figure 3.1 – POCAL budget’s architecture The revenues’ subcategories are then structured as the following: Figure 3.2 – POCAL budget’s revenues architecture As per the expenses’ subcategories, they are designed as below: 12 Figure 3.3 – POCAL budget’s expenses architecture This overall structure seems fairly simple however these categories have a fair number of subcategories which need to be manually aggregated in order to build a functional data model. The main issue with this aggregation is that the excessive number of sub-categories has led to the same items being included in different sub-categories in different municipalities: Figure 3.4 – Lisbon and Porto budgets comparison While in the 2019 Lisbon’s budget Ocupação da Via Pública is considered as a final item with code 04.01.23.02, in the 2019 Porto’s budget document there is a greater granularity with several different items included as part of a different code – 04.01.23.03. Bearing this in mind, my objective was to reduce the number of sub-categories as much as possible to allow for a logical aggregation of the data that produces comparable figures. This, however, was an ongoing endeavour which was readjusted several times within the process of compiling the data. 13 3.3. DATA WAREHOUSE Since the budget analysis will already require a completely manual effort of data selection, I took advantage of this work to build a data warehouse which allowed for what can be described as an inside-out approach to the data model that will be explained in more detail in the next section. The data warehouse will include, from the start, the following fields: • Rúbrica – Will function as an item description similar to a product description in more conventional business-oriented data models. These must be unique for each municipality’s budget on a specific year to avoid any aggregations within the same budget. • Montante – The amount in Euros allocated to each rúbrica. • Sub-Categoria – The sub-category where the rúbrica is included. • Categoria – The overall category of the rúbrica. • Tipo – The rúbrica’s type: revenue or expense. • Capítulo Económico – Which type of revenue or expense the rúbrica is included in: current or capital. • Ano – Year. • Câmara Municipal – Municipality. There is the opportunity to include more fields in the data warehouse at a later stage since the VDSP is a dynamic process. At a later stage I have included a new column – Partido Político – that, through an iteration process, emerged as an opportunity to enrich the narrative. 3.4. DATA MODEL The data model was built using the already mentioned inside-out approach. This means that I utilized the manually built Excel spreadsheet as a fact table to construct several other dimension tables of the model as opposed to creating all the dimension tables and linking them to the fact table. This approach, however, didn’t limit the ability to integrate further dimensions to the model such as the cases of Dim_Data, Dim_Geografia and Dim_Política. The data model follows a Kimball methodology using a simple star schema dimensional model. It provides a structure which is easy-to-analyse and query to help building the desired narrative. In the dimensional model, the data is divided into two types (a fact table and dimension tables) - both scenarios will be further detailed under this section . 14 Figure 3.5 – Data Model Below we have a table with a brief description of all the final tables included in the model: Table 3.2 – Tables available in the model Dimension or Fact table Description Fact_Orçamento Fact table that contains all individual items extracted from every municipality budget Dim_Categoria Dimension table with all the different categories extracted through the budget analysis Dim_Rúbrica Dimension table with all the distinct types of items extracted from the budget analysis Dim_Geografia Dimension table with geographical details for each municipality Dim_Política Dimension table with political details for each represented political party or coligation Dim_Data Dimension table with year information At the centre of the model there is a fact table named Fact_Orçamento which represents all individual items extracted from every budget which are identified through foreign keys from the dimension tables that define their characteristics. This fact table is powered by a unique spreadsheet from Excel file Fact_Orçamento.xlsx to allow for faster integration. The fairly simple structure adopted will allow for a relatively easy integration with different datasets for different purposes than the one initially envisioned for this project. Once again, since the data collection stage required a considerable amount of manual labour, I chose to 15 keep the structure as clean and simple as possible so this project can be easily integrated into different applications in the future. To create the Dim_Categoria dimension I duplicated the Fact_Orçamento table and selected and kept the following columns: • Capítulo Económico • Categoria • Sub-Categoria • Tipo The next step was to create an index column starting from 0 which would be renamed as Categoria_ID. To do so we need to make sure that every value of this index column allows us to filter a unique value of our Dim_Categoria table with no risk of aggregating values incorrectly. As such, I have created a new column by concatenating columns Sub-Categoria, Categoria, Tipo and Capítulo Económico and utilized it as benchmark for the index column after removing duplicate values. Finally, I renamed the new index as Categoria_ID and left joined the Fact_Orçamento table with the newly created table Dim_Categoria. An invisible column was obtained through the merger named Dim_Categoria. To conclude the process, I make it visible and rename it as FK_Categoria. We now have tables Fact_Orçamento and Dim_Categoria linked so there is no need to keep the descriptive columns in the fact table as they are now part of the dimension table. As such, I have deleted them from the fact table. To create the Dim_Rúbrica dimension I once again duplicated the Fact_Orçamento table and selected and kept the Rúbrica column. As before, we need to create and index column which in this case would be renamed as Rúbrica_ID. In this case it is fairly simple as we just need to remove the duplicate values from the Rúbrica column and create an index column starting from 0. Finally, I left joined the Fact_Orçamento table with the newly created table Dim_Rúbrica. Once again, an invisible column was obtained through the merger so I made it visible and renamed it as FK_Rúbrica before proceeding to delete the no-longer-necessary Rúbrica column. To create the Dim_Geografia was simpler than the two previous dimensions since we already have an Excel file we could use as a source (Geografia.xlsxI). This file was created by computing information collected from pordata.pt and includes the following columns: • Câmara Municipal – Municipality. • Distrito – District. • Região (NUTS I) – Region as per the NUTS I classification. • Região (NUTS II) – Region as per the NUTS II classification. • Região (NUTS III) – Region as per the NUTS III classification. 16 • População (habitantes) – Population (inhabitants). • Latitude – Latitude. • Longitude – Longitude. • Logo – Link to a stylized logo for the municipality. The only needed transformations to integrate this new dimension to the model is to create an index column starting from 0 (Geografia_ID) and left join the Fact_Orçamento and Dim_Geografia tables. We then make the resulting column visible while renaming it FK_Geografia before removing the Câmara Municipal column from the fact table. The Dim_Política table follows the same reasoning since we have an Excel file to use as a source (Politics.xlsx). This file was created with data collected from the Comissão Nacional de Eleições website and includes the following columns: • Partido Político – Political party. • Coligações – Wether the Political party is a political colligation or not. • Sigla – Acronym. • URL – Link to political party logo. Similarly to the Dim_Geografia table, the only transformations we needed to make were to create an index column starting from 0 (Política_ID) and left join the Fact_Orçamento and Dim_Política tables. To wrap things up I enabled the resulting column and renamed it FK_Política before removing the Partido Político column from the fact table. The Dim_Data dimension table is the simplest of the model. I simply imported the Excel file previously created (Dim_Date.xlsx) and left joined it to the fact table through the column Ano. In this case I maintained the naming as it can be used directly as a filter in our final model. The final elements of the data model are the calculated metrics which will open the possibility of different types of analysis within the proposed narrative. All metrics were calculated from the original values of the column Montante from the fact table Fact_Orçamento. Below there’s a table with every calculated metric available in the data model as well as a brief description: 23 Here the narrative is again narrower and conducted by the presenter since the analysis is not so straightforward. The goal will be to look for pyramid-shaped categories and have some sort of interaction with the audience so we can formulate hypothetical scenarios on why these pyramid-shaped lines appear in some categories and not in others. Figure 3.11 – Time series analysis Lisboa and Porto This final chapter’s objective is to have an imperfective narrative which as per (Flores, 2017) can be argued that it can also lead to a morality of the story and that an open sequence of events can also be finalized. This aims to spark further discussion on the subject and encourage the audience for further participation in governance. During the course of this work, I have faced several limitations which led me to redesign the initial scale of the project. The amount of time needed to extract the data from the municipalities budgets ultimately led to a resizing where the final project no longer includes data for the 3 years (2018, 2019, 2020) for every municipality but only for Lisboa and Porto. This decision was made due to the fact that the added value of the additional data was residual in the scope of the project’s main objective which is to showcase the importance that turning open data into democratic data can have on our daily life and specially on how it can stimulate citizens’ participation in governance. Further to the above, I faced additional constraints with three municipalities (Barcelos, Fafe, São João da Madeira) for which I was unable to obtain the municipality budgets even after direct contact. 24 In the end, the final result of the project is functional data model which not only has the ability to be upscaled with further data but also enables the user to write several different narratives. These narratives are not constrained in terms of audience because the data available allows a wide range of statistical analysis. 25 4. CONCLUSIONS In previous studies it has been highlighted that a wide range of opportunities exist for data integration, especially because most of the datasets include information about location, which allows for easy aggregation based on location. Furthermore, as we saw on the first chapter of this thesis, outside of Portugal there are already good examples of compelling and insightful narratives built from similar sources of open data as the ones we already have available in Portugal, which means that we have all the necessary tools to build similar projects in our home country and minimize the gap between open data and democratic data. Concerning the narrative visualization aspect, I believe I was able to demonstrate that there is indeed an alternative to how complex data can be communicated by focusing on using narrative elements as a means of guiding the audience through a structured interpretation that promotes insight through discovery. With further exploration of the data already available the limit on what can be achieved is only set by the data users’ creativity and familiarity with both the data and the target audience. Further upgrades can be made in terms of data architecture to allow for Big Data upscaling of this project. A central repository of data would greatly benefit the governmental transparency effort because it would allow for easy comparison and integration into a data warehouse similar to the one proposed in this project. However, we need to address the main issue faced which was the amount of time necessary to collect the data. Through the data collection process, it became visible that the budget data would benefit from a reform in how it is made available and perhaps even how the budgets are built. Low code technology poises a great opportunity for the municipalities because it is not only a faster-to- deploy tool but it would also help democratizing the whole municipality budget environment because a single structure could be utilized with minimal coding effort which would ultimately minimize the risk of having two identical items classified in different categories in different municipalities. In addition, this technology can, through careful integration between the structure of the budgets and the structure of the proposed data warehouse, greatly reduce the amount of time necessary to add more data to the data model. To do so there should be a pipeline structure where the data collected is validated to make sure it complies with the chosen standard before integration into the data warehouse. I believe that with this project we can, not only successfully explain the difference between open data and democratic data, but also highlight the importance that turning open data into more democratic data can have on our daily life and specially on how it can stimulate citizens’ participation in governance. I hope this project helps to challenge future works that focus on quantifying how much the citizens’ participation in governance is impacted by more transparent and insightful data or even combining frameworks for quantitatively studying 26 local public expenditure by enabling policymakers and citizens who wish to participate in the democratic process a more appropriate foundation for comparative analysis (Curado et al., 2021). 27 BIBLIOGRAPHICAL REFERENCES Attard, J., Orlandi, F., Scerri, S., & Auer, S. (2015). A systematic review of open government data initiatives. Government Information Quarterly, 32(4), 399–418. https://doi.org/10.1016/j.giq.2015.07.006 Chignard, S. (2013). A brief history of Open Data. ParisTech Review. https://www.paristechreview.com/2013/03/29/brief-history-open-data/ Curado, A., Damasio, B., Encarnacão, S., Candia, C., & Pinheiro, F. L. (2021). Scaling behavior of public procurement activity. PLoS ONE, 16(12 December), 1–19. https://doi.org/10.1371/journal.pone.0260806 Flores, R. (2017). Imperfectivity and the end of story. Lexia, 27–28, 107–131. https://doi.org/10.4399/97888255087655 Gray, J., Bounegru, L., & Chambers, L. (2021). The Data Journalism Handbook. In The Data Journalism Handbook. https://doi.org/10.5117/9789462989511 Hullman, J., & Diakopoulos, N. (2011). Visualization rhetoric: Framing effects in narrative visualization. IEEE Transactions on Visualization and Computer Graphics, 17(12), 2231–2240. https://doi.org/10.1109/TVCG.2011.255 Janssen, K. (2011). The influence of the PSI directive on open government data: An overview of recent developments. Government Information Quarterly, 28(4), 446–456. https://doi.org/10.1016/j.giq.2011.01.004 Lee, B., Riche, N. H., Isenberg, P., & Carpendale, S. (2015). More Than Telling a Story: Transforming Data into Visually Shared Stories. IEEE Computer Graphics and Applications, 35(5), 84–90. https://doi.org/10.1109/MCG.2015.99 Reiche, K. J., & Hofig, E. (2013). Implementation of metadata quality metrics and application on public government data. Proceedings - International Computer Software and Applications Conference, 236–241. https://doi.org/10.1109/COMPSACW.2013.32 Ruijer, E., Détienne, F., Baker, M., Groff, J., & Meijer, A. J. (2020). The Politics of Open Government Data: Understanding Organizational Responses to Pressure for More Transparency. American Review of Public Administration, 50(3). https://doi.org/10.1177/0275074019888065 Ruijer, E., Grimmelikhuijsen, S., & Meijer, A. (2017). Open data for democracy: Developing a theoretical framework for open data use. Government Information Quarterly, 34(1). https://doi.org/10.1016/j.giq.2017.01.001 Sandoval-Almazan, R., & Gil-Garcia, J. R. (2012). Are government internet portals evolving towards more interaction, participation, and collaboration? Revisiting the rhetoric of e-government among municipalities. Government Information Quarterly, 29(SUPPL. 1), S72–S81. https://doi.org/10.1016/j.giq.2011.09.004 Thomas, J. J., & Cook, K. A. (2005). Illuminating the path: the R&D agenda for visual analytics. National Visualization and Analytics Center, Institute of Electrical and Electronics Engineers. In IEEE Computer Society. Wijnhoven, F., Ehrenhard, M., & Kuhn, J. (2015). Open government objectives and participation motivations. Government Information Quarterly, 32(1), 30–42. 28 https://doi.org/10.1016/j.giq.2014.10.002 Yu, H., & Robinson, D. G. (2012). UCLA LAW REVIEW DISCOURSE The New Ambiguity of “ Open Government. 59 UCLA L Rev Disc, 178(2012), 178–208. http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2012489