Keywords

1 Introduction

Public sector data represent a vast and diverse resource that holds immense value for society [32]. Within this resource, dynamic data, which are real-time data generated by sensors, are particularly important. Recently, the European Commission recognized dynamic government data as highly valuable, with enormous potential for the economy, the environment, and society. However, collecting and disseminating these data present a range of challenges, including high variability and rapid obsolescence [19].

Fortunately, recent advances in technologies such as Artificial Intelligence (AI) offer the possibility of creating value-added intelligent applications that can unlock the potential of government data. AI has tremendous potential for public administration, offering the possibility of saving up to 1.2 billion hours and $41.1 billion annually [10]. By automating routine tasks, public servants can focus on high-value work and make better decisions, detect fraud, plan infrastructure projects, answer citizen queries, adjudicate bail hearings, triage healthcare cases, and provide innovative, personalized public services to citizens [10, 42].

This work proposes a holistic ecosystem for the implementation and evaluation of AI technologies, such as machine learning, deep learning, and natural language processing, in public administration. We present a case study focused on dynamic government data, specifically transport data, to explore the ecosystem components and their dependencies. The case was selected because real-time dynamic data is an underexplored form of government data.

2 Method

This study aims to identify the components of an ecosystem for deploying Artificial Intelligence (AI) in public administration and explore their interdependencies through a single exploratory case study. Such a study is useful for gaining insights into a poorly understood phenomenon and generating new theory or propositions about it [45].

For the case study, we examined three open traffic data sets: one from the city of Thessaloniki in Greece, another from the Attica region in Greece, and a third from Switzerland. To identify the ecosystem components, we used “snowballing” to identify AI algorithms, technologies, methods, and cases from technical and policy reports, government documents, and research articles. We also conducted semi-structured interviews with employees of the region of Central Macedonia, the second-largest region in Greece, to create user stories describing potential AI applications based on the traffic data.

3 The Case of Dynamic Traffic Data

3.1 Data Collection

In order to create an ecosystem for deploying Artificial Intelligence (AI) in public administration, we present a case study that focuses on the usage of dynamic government data and, specifically, traffic data to create AI applications for the public sector. The case study uses three open traffic datasets from (i) the city of Thessaloniki in Greece, (ii) the region of Attica in Greece, and (iii) Switzerland. An overview of the three OGD datasets is presented in Table 1.

Table 1. An overview of the three datasets with traffic data.

Traffic Data from the City of Thessaloniki in Greece. The Smart Mobility Living Lab, one of the largest European mobility labs located in Thessaloniki, Greece is the data analysis and modelling laboratory of the Hellenic Institute of Transport (HIT). The lab hosts transportation and mobility related datasets generated by various both conventional and innovative data sources. Among them are the datasets with open data from taxis and Bluetooth detectors in the urban area of Thessaloniki [3]. Specifically, two types of measurements are provided. The first one refers to floating car data including the speed measured by the GPS of over one thousand vehicles that operate in the city of Thessaloniki. This dataset is being updated almost real-time providing about 2,000 new records per minute. The second one includes aggregated vehicle detections of over 43 Bluetooth devices located in main road junctions of the city of Thessaloniki at a specific timeframe. Additional data included in the same dataset are trip trajectories with the sequence of locations or the origin and destination. The latest datasets are updated every 15 min. All data can be acquired via proprietary APIs. Historical data are also available as text files.

Traffic Data from the Attica Region in Greece. Data.gov.gr serves as Greece’s official data portal for OGD. The portal comprises 49 datasets that span ten thematic areas, including the environment, economy, and transportation. Notably, the new version of the portal incorporates a free Application Programming Interface (API), enabling users to retrieve and access data via a graphical interface or code. Acquiring a token is needed to use the API through completing a registration process. The traffic data for the Attica region in Greece is sourced from traffic sensors that periodically transmit information regarding the number of vehicles and their speed on specific roads in Attica. To mitigate privacy concerns, the data is aggregated hourly and is updated every hour with a one-hour delay. Provided data measurements include the absolute number of the vehicles detected by the sensor during the hour of measurement along with their average speed in km per hour.

Traffic Data from Switzerland. The Open Transport Data Portal of Switzerland (ODPCH)Footnote 1 provides access to more than 40 datasets. Among them are datasets with real-time traffic data generated and collected by traffic sensors positioned in road segments throughout Switzerland. Historical data are not available. Data include the number of vehicles passing from specific locations, along with their average speed. The data are minutely aggregated and updated every minute and specifically, 20 s after the minute in Coordinated Universal Time (UTC) 0. Data are described using the DATEX IIFootnote 2 standard for exchanging road traffic data. An access token is required to get limited access to these data through the corresponding API for six months. The API allows for submitting in total 260,000 requests in the six-month period, which actually, corresponds to the update interval of the data (one update per min).

3.2 Construction

Traffic data has the potential to aid policy-makers and public authorities in designing and managing transportation systems that are efficient, safe, environmentally friendly, and cost-effective. One way to achieve this is through predicting future traffic conditions. There are several methods commonly used for forecasting future traffic conditions, including traditional parametric methods such as Autoregressive Integrated Moving Average (ARIMA) [24], machine learning techniques such as Support Vector Machine (SVM) [2], and deep learning [6, 52].

The three datasets analyzed in this study contain sensor-generated traffic data, which often exhibit quality issues [41]. For example, the Attica dataset initially suffered from a high number of missing observations and anomalous values, although most of these issues have been resolved [6, 19, 20]. Various methods, such as time series analysis (e.g., Seasonal - Trend decomposition using Loess - STL), machine learning (e.g., Isolation Forest), and deep learning (e.g., Generative Adversarial Networks - GANs), can be used to identify anomalous values in the datasets [19]. However, handling missing and anomalous values requires making decisions on a case-by-case basis, depending on factors such as the level of aggregation for the temporal dimension. For example, missing values in the Thessaloniki and Switzerland datasets, which are minute-level aggregated, can be imputed using the average of the previous and next observations, while synthetic data can be used for the Attica dataset, which is hourly aggregated.

Integrating traffic data with other datasets, such as weather data, car accident data, can provide valuable insights and enhance the accuracy of AI models [25]. Using explainable AI techniques can also help understand the reasons behind anomalous values or model decisions [15].

Real-time data access is critical for applications that rely on dynamic data such as traffic intelligent systems. All three datasets are available in Open Government Data (OGD) portals and two of them can be accessed programmatically using an API. The Thessaloniki and Attica datasets are hourly updated, while the Zurich dataset is minutely updated.

Finally, selecting the appropriate AI algorithm for each dataset is crucial. In literature, machine learning approaches such as K-nearest Neighbour [30], and Bayesian models [39], and XGBoost (eXtreme Gradient Boosting) [44] have been used to predict traffic. Recently, the emerging development of deep learning and Graph Neural Networks have achieved state-of-the-art performance in traffic forecasting tasks [1, 6]. Data may also play a significant role for the selection of the AI algorithm. For instance, the level of granularity and other dataset-specific factors directly affect the quality of the AI model. For instance, the minute-level granularity of the Zurich dataset allows for more accurate traffic flow predictions in the near future, while the hourly-level granularity of the Attica dataset is better suited for predicting traffic flow at the hourly level.

3.3 Evaluation

To assess the performance of the AI model, it is crucial to conduct a performance-based evaluation. Depending on the selected algorithm, various metrics can be employed. For instance, previous studies have utilized metrics such as RMSE, MAPE, and MAE to evaluate the performance of Graph Neural Network models in traffic flow prediction tasks [6]. For the traffic datasets and Graph Neural Networks, the accuracy of the AI model can be affected by the density of traffic sensor locations. Specifically, the Thessaloniki and Attica datasets contain sensor measurements from urban areas, which can lead to the creation of denser graphs when analyzed using Graph Neural Networks. This, in turn, can result in more accurate deep learning algorithms. On the other hand, the Zurich dataset comprises sensor measurements primarily from highways, resulting in sparser graphs [6].

Moreover, explainability can be employed to interpret the decisions made by the AI model. For instance, SHAP has been used to explain the decisions of a neural network that predicts traffic for traffic light control [37, 44]. In this case, integrating external data such as weather and vehicle accident data can facilitate better understanding of the decisions made by the model.

3.4 Translation

Traffic forecasts can be used to anticipate future needs and allocate resources accordingly, such as managing traffic lights [28], opening or closing lanes, estimating travel time [33], and mitigating traffic congestion [2]. In order to understand the potential of creating AI applications for the public sector using traffic data, we interviewed a public servant of the Region of Central Macedonia, the second largest region in Greece. The primary objective of the interview was to generate user stories that effectively describe potential AI applications based on the traffic data. These applications should have the potential to streamline the region’s operations and enhance the efficiency of its employees.

The interviews resulted in the three user stories, namely (i) Management of vehicle traffic in the wider urban area of Thessaloniki through traffic lights, (ii) Optimal route for scheduled checkpoints, and (iii) Optimal use of GPS Data.

Management of Vehicle Traffic in the Wider Urban Area of Thessaloniki Through Traffic Lights. The Department of Maintenance of Transport Projects, which belongs to the Technical Works Directorate of the region of Central Macedonia in Greece, is responsible for the operation and planning of traffic regulation in the urban web through traffic lights. An application useful for the region of Central Macedonia would be the utilization of traffic/mobility data, traffic load/free flow of vehicles, and real-time reprogramming of traffic regulation and vehicle emptying times in the central vehicle flows, with the aim of immediately relieving traffic congestion and relieving overloaded areas within 10 min by selecting and opening the appropriate vehicle flows with the goal of optimal traffic management, quality of life, more rational resource management, and reduction of vehicle emissions/pollution.

Optimal Route for Scheduled Checkpoints. Many services of the Region of Central Macedonia/Greece (e.g., Technical Works Department, Health Department, Veterinary Department, etc.), whose headquarters are located at the city of Thessaloniki carry out scheduled inspections/checks with teams of competent employees. In these scheduled inspections/checks, the teams of employees visit from 5 to 15 different points (depending on available time). The inspections/checks are carried out within the urban fabric of Thessaloniki and its surroundings, but often also within the wider region of Thessaloniki (as well as in neighboring regions, within the Municipality). An AI application useful for the traffic office and responsible drivers would be to provide them with a proposed route in order to visit the predetermined points. The proposed AI route will be the best possible suggestion in terms of distance/traffic loads/avoidance of bottlenecks, in relation to the evolution of traffic data over time, as theoretically some traffic flows are more congested at specific times. The aim of this application is to save human resources, reduce vehicle emissions/pollution, and provide better working conditions for employees.

Optimal Use of GPS Data. A GPS system has been installed in all vehicles in all regions (Pieria, Pella, Imathia, Serres, Kilkis, Halkidiki, and Thessaloniki) of Central Macedonia. A useful AI application for the supervisors and responsible parties of these vehicles would be to create a notification/report system utilizing the GPS data of each vehicle, indicating, for example, if one of the vehicles is moving at a speed greater than the permitted speed limits, if it goes beyond the allowed routes and movement limits, if it is stationary for a long time so that it can be allocated to another service that needs a vehicle, etc. The goal is the rational management of the resources of the region of Central Macedonia.

4 The Ecosystem

In the previous section, a case study was presented, and its generalization has helped in the development of an ecosystem for deploying Artificial Intelligence (AI) in public administration. The ecosystem, as shown in Fig. 1, provides a comprehensive framework for collecting data from the public sector, using it to develop AI models with various AI technologies, and integrating different techniques for data pre-processing, federated learning, transfer learning, data augmentation, evaluation, explanation, and translation, and, evaluating and explaining the models and, finally, incorporating them in AI applications. The ecosystem is built upon four pillars, namely collection, construction, evaluation, and translation. Additionally, it comprises four key components, namely Data, AI Algorithms, AI Models, and AI Applications.

Fig. 1.
figure 1

An Ecosystem for deploying Artificial Intelligence in Public Administration

4.1 Stakeholders

The main stakeholders that have an interest or are impacted by the ecosystem and its functioning include IT stakeholders including agency’s AI experts and developers, public service designers, public authorities and public organizations, public servants, regulators, policy makers, citizens and residents, academic and scientific community, businesses and organizations, and practitioners. All of them can undertake both the data and AI applications’ producer and consumer roles.

4.2 Data

Utilizing data is crucial for governments to improve public sector intelligence, enabling them to create long-lasting, inclusive, and trustworthy policies and services [29]. Various classifications of government data exist [4, 8, 38].

Government data can be categorized as open or closed. Open Government Data (OGD) can be freely used and reused by the public, accessible through official OGD portals (e.g., the European OGD portal)Footnote 3. These data are typically provided as downloadable files, but some portals also offer OGD as linked data [21] for integration with other datasets. Additionally, some portals provide an Application Programming Interface (API) for programmatic and real-time access to OGD. In contrast, closed government data includes restricted access data such as employee service records, performance assessments, and confidential or classified government data, which are accessible only to the data owners and authorized groups based on security protocols and public policies.

Government data may also be structured, unstructured, or semi-structured. Structured data have a well-defined format, usually stored in a database, such as public health records organized and stored in columns and rows. Semi-structured data do not have rigid formal structures but contain tags to facilitate separation of data records or fields, such as those found in XML and JSON. In contrast, unstructured data lack any discernible structure, such as text messages, photos, videos, and audio files, transactions, and raw data from scientific research [8].

Government data can also be categorized as real-time or batch data. Real-time data are often produced by sensors (e.g., traffic data), and their provision has only recently begun. These data are high variability and rapidly obsolescent, requiring prompt availability and regular updates. Conversely, batch data are historical data that are not immediately provided but provided some time after their collection.

Finally, government data can be internal or external. Internal data are those produced by a public administration prior to the development of an AI system, existing within the organization’s structure (e.g., master or transactional data). In contrast, external government data exists outside an organization’s structure or is incorporated specifically for the development of AI systems.

4.3 Collection

Data Aggregation. Government data may be individual or record -level or aggregated. The level and type of aggregation varies. For example, apart from being aggregated (e.g., averaged) geographically (e.g., in the country level), data can also be aggregated based on time (e.g., in the hour level), demographic factors (e.g., gender). In the realm of OGD and especially when it pertains to individual-level data, it is crucial to ensure that data is properly aggregated before publication. The initial level of aggregation may change depending on the requirements of problem.

Data Anonymization. Government data often contains personal information that is protected by regulations, such as the European Data Protection Regulation (GDPR) [31]. As a result, this data cannot be used in its original form without risking privacy violations. To protect privacy while still utilizing the data for analysis with AI, it is important to first anonymize it. There are two main methods for doing so: anonymization and pseudonymization. Anonymization involves removing or encrypting personally identifiable information from datasets so that an individual’s identity cannot be directly or indirectly determined. Pseudonymization involves replacing personal information with a pseudonym or unique identifier that can be re-identified when combined with other separately maintained supplementary information [25].

Traditional methods for data anonymization include generalization, suppression, permutation, perturbation, and anatomization [27]. Open-source software for data anonymization, such as AMNESIAFootnote 4 and ARX Data AnonymizationFootnote 5, use various anonymization techniques such as k-Anonymity, k-Map, t-Closeness, and \(\delta \)-Presence [43]. However, these methods do not guarantee that re-identification is not possible [11]. Therefore, advanced synthetic data generation services have been proposed as an alternative, such as creating synthetic data using Generative Adversarial Nets (GAN) [46]. AI-generated synthetic data are artificial data that mimic real-world observations and are an accurate representation of the original data.

4.4 Construction

Once data has been collected, it is essential to handle it appropriately to ensure that it can be effectively utilized in creating an AI model.

Artificial Intelligence Algorithms. Some of the most widely recognized and frequently utilized types of algorithms include [5]:

  • Computer vision focuses on recognizing, tracking, and interpreting patterns and objects in visual data (e.g., images, videos). Applications include image and video analysis, object detection, and autonomous vehicles.

  • Natural Language Processing (NLP) that enables understanding, interpreting, and generating human language. It is used in a wide range of operations, including text classification, sentiment analysis, language translation, chatbot development, and speech recognition.

  • Speech Recognition converts spoken language into text or other machine-readable formats. Applications include virtual assistants, voice-enabled devices, and speech-to-text transcription.

  • Knowledge-based systems are able to make decisions based on expert knowledge and domain-specific rules. They typically consist of a knowledge base with domain-specific knowledge and rules, and an inference engine, which uses this knowledge to make decisions and solve problems.

  • Automated Planning allows generating plans or sequences of actions to achieve particular goals. It enables reasoning about the problem domain, generating plans, and executing them in a dynamic environment. Applications include robotics, manufacturing, logistics, and scheduling.

The selection of the proper AI algorithm from each sub-field of depends on the available data as well as on the requirements of the application.

Pre-processing. Data pre-processing plays a crucial role in converting raw data into a format that is compatible with Artificial Intelligence (AI) algorithms. This essential step involves various techniques and procedures that help to clean, transform, and organize data, making it easier for the AI system to extract meaningful insights and patterns. Data pre-processing methods include:

Data Cleaning. Data cleaning is an essential process in data pre-processing that ensures the accuracy, consistency, and reliability of data, thereby making it suitable for use in AI models. It involves several tasks, such as identifying missing values, which are cells or fields in the dataset that are empty or null, and removing duplicates. Missing values can be imputed using advanced AI techniques like Generative Adversarial Nets (GAN) [22, 47] or simply removed. Data cleaning also ensures that data is in a standard format or structure that is appropriate for use in AI models. This involves identifying and correcting errors or inconsistencies in the data, such as misspelled values and handling anomalous values that are significantly different from the rest of the dataset. Statistical analysis, machine learning, including synthetic data [50], is used for anomaly detection. Effective data cleaning is particularly critical for real-time data like traffic data generated by sensors, which must be promptly accessible without extensive pre-processing before publication.

Data Integration. Government datasets can be leveraged by integrating them with other datasets, internal or external, to increase the value and effectiveness of AI applications [25]. Data integration involves combining data from multiple sources, formats, and structures into a single, consistent, accurate, and comprehensive view. Some previous research has explored the integration and utilization of government data [18, 49]. However, the heterogeneity of the original data from different sources presents various challenges, including legal, structural, or other issues [25]. Even if government data are available in formats that facilitate integration (such as linked data), addressing structural challenges is still necessary [18].

Data Augmentation. Data augmentation is a technique used in machine learning to increase the size of a dataset by generating new, synthetic data from the existing data. Data augmentation, hence, is particularly useful in scenarios where the dataset is small, or when the model is prone to overfitting. The aim of data augmentation is to improve the performance and robustness of the machine learning model by exposing it to a larger and more diverse set of training examples [48]. Data augmentation can be used in various types of data, such as text, audio, image, or video. It uses various techniques including GAN.

Federated Learning. Federated learning is a relatively new technique in the field of AI, which has been developed by Google and widely adopted across various research fields and industries [23]. It enables the training of models on decentralized data sources without requiring centralized data storage. In this method, data remains on user devices or edge servers, and the model is trained locally on each device. Federated learning is particularly useful in scenarios where data privacy is paramount, such as healthcare or financial applications, and where data is too large or too sensitive to be stored in a central location. In the public sector, federated learning has been employed to facilitate the development of smart city services [17], develop predictive models in healthcare using sensitive patient data [36], improve traffic management by combining data from multiple sources such as traffic sensors, cameras, and GPS data in transportation [12], and analyze students’ behavioral data to understand how students learn in education [13].

Transfer Learning is a machine learning technique for leveraging knowledge gained from one task to improve the performance of another related task. In transfer learning, instead of building a model from scratch, a model pre-trained on a dataset is used to train a new model on a different, related dataset saving time and computational resources. The features learned from the first dataset can be used as a starting point for learning new features on the second dataset. Examples of already existing pre-trained models include You Only Look Once (YOLO) [34], a pre-trained model for object detection, and Bidirectional Encoder Representations from Transformers (BERT) [9], a family of pre-trained NLP models. The “Hugging Face”Footnote 6 provides a library of a wide range of pre-trained NLP models including BERT.

4.5 Evaluation of Artificial Intelligence Models

Once the AI algorithm is selected and data have been successfully pre-processed, the AI model will be created by training the algorithm on the data. This process involves feeding the model with input data and adjusting its parameters (hyperparameter tuning) to minimize the error between its predictions and the actual outcomes. Hyperparameter tuning can be done with methods such as include grid search, Random search, bayesian optimization, gradient-based optimization, and Ensemble-based methods as well as with cross-validation. Cross-validation partitions the data into training and validation sets and iteratively evaluates the model’s performance on different subsets of the data and with different values for the hyperparameters. Cross-validation can be also employed in training to detect and avoid overfitting of the model.

The model needs to be evaluated on a separate validation dataset to ensure its generalizability and performance and ensure that they are effective and reliable in their intended application. Towards this end, several evaluation metrics can be used depending on the type of algorithm. The performance of the model, for example, can be assessed through various metrics such as precision, recall, F1-score, logarithmic loss, the Area Under Curve (AUC), Mean Absolute Error (MAE), Mean Squared Error (MSE), and Mean Absolute Percentage Error (MAPE). These metrics can help assess the model’s performance in detecting true positives and minimizing false positives and false negatives.

The efficiency of the AI model is also important and involves measuring its speed and computational requirements. This is important for real-time applications where the model needs to make quick predictions (e.g., in cases where dynamic data generated by sensors are used to create the model). The robustness of the model could also be evaluated in order to assess its ability to perform well under various conditions, such as changes in input data or noisy environments.

In recent years, the importance of explainability in AI models has grown significantly since it helps to improve the understanding of the model’s decisions, promoting transparency and trust in the results. This is crucial for the public sector where transparency is a requirement. To achieve this goal, various methods have been developed to explain the decisions of both supervised and unsupervised AI models. There are various methods that can be used for explaining AI models. For example, LIME [35] and SHAP [26], which stands for SHapley Additive exPlanation, can be used to explain machine learning predictions. In addition, Class Activation Maps (CAMs) [51] can be utilized to explain Convolutional Neural Network decisions. For neural networks, Global Attribution Mappings (GAMs) [14] can be also employed. These techniques can provide insight into the factors that the AI model is considering when making decisions, allowing users to better understand and interpret the results.

4.6 Translation

Artificial Intelligence (AI) models can be deployed in real-world, intelligent applications for the public sector. AI applications, for example, have the potential to streamline decision-making processes in the public sector. This can be achieved through either fully autonomous decision-making or by providing decision-makers with AI-driven insights and recommendations to aid in the decision-making process. In this sense, humans and machines, rather than competing, could benefit from mutual collaboration and potentially solve problems and achieve better outcomes than each could on their own [7]. AI applications that are built based on government data are able to enhance the efficacy of public services [16], such as the implementation of Integrated Public Services (IPS) [40] that are co-created and continuously evaluated through feedback loops by the public sector.

User stories are essential in designing AI applications, as they ensure that end-users, such as public servants and policymakers, have their needs and preferences fully understood and incorporated into the development process. They serve as a link between data and applications, allowing for the identification of new AI-based applications that can benefit the public sector. User stories can be pulled by the end user who discovers the need for an AI application that could potentially improve their work, or they can be pushed by available public sector data. However, public sector data may not always be of high quality, making them unreliable and inconsistent sources of information. They may contain inaccuracies, errors, and missing values, rendering them unsuitable for developing trustworthy AI applications. Additionally, some public services may not store their data or store them in hardcopies or formats that are not machine-readable. In this case, data themselves can be used as a starting point, and high-quality data can drive the inspiration for the need for an AI application in the public sector. Regardless of whether the user story is pulled or pushed, the ultimate goal is to ensure that the AI application meets the needs of the end-user while utilizing reliable and accurate data.

5 Conclusion

This paper proposes an ecosystem for deploying Artificial Intelligence (AI) in public administration that comprises four main artefacts: Data, AI algorithms, AI models, and AI applications, built upon three pillars: collection, construction, evaluation, and translation. The data collection process should consider the nature of the source data and the requirements of the AI algorithm, and the collected data should be properly pre-processed and augmented to mitigate the detrimental effects of small sample sizes. Federated learning methods can be employed to overcome data privacy issues. The created AI model should be evaluated for its performance, efficiency, and robustness, and its explainability should be ensured by employing various explainability methods. Finally, the AI model should be integrated into an AI application co-created with the public sector employees, where user stories can be used to describe public sector scenarios that use AI applications.

This ecosystem is a result of an exploratory case study that uses three traffic measurement datasets. The artefacts are complementary, and the selection of the AI algorithm depends not only on the available data but also on the needs of the AI application. The purpose of the AI model will define the AI application that will be used. The requirements for an AI application can be either pulled by the public sector employees or pushed by the available data, where data may create new needs for applications.

We anticipate that the ecosystem for deploying AI in public administration can serve as high-level guidelines for adopting AI in the public sector.