# A Tool for Visualization and Analysis of Neighbourhoods, Clusters, and Indicators during the COVID-19 Pandemic

Authors: Julio Cezar Soares Silva; Nivan Roberto Ferreira; Adiel Teixeira de Almeida Filho
Journal: Mathematical Problems in Engineering
 (2023)

---

## Abstract

Visual analytics tools for spatiotemporal analysis can be used to manage and monitor the propagation of an epidemic. The problem is that dashboards encountered in the literature do not take into consideration how the geolocation characteristics, such as socioeconomic indicators, influence the infection risk or other epidemic variables. This analysis can support health officials in managing the outbreak to consider information about indicators in compartment models for propagation prediction and intervention simulation. The objective of this work was to bring widgets that offer a more profound exploration and analysis of the impact of the pandemic on socioeconomic indicators. In our approach, the association of epidemic variables and indicators can be explored with commonly adopted visualization plots. Also, we propose a way to gather the specialist’s risk perception, and as a result, a risk heatmap is produced, allowing the reduction of time series data cluttering. Finally, it is possible to use the risk heatmap information to compare neighbourhoods and socioeconomic indicators by ranking them according to a severity score. Some use cases were performed to demonstrate the use and capability of the proposed widgets.


---

## Body

## 1. Introduction

Dashboards have been used to enhance decision-making in many different areas, such as machine learning [1, 2], risk management [3, 4], and public health [5, 6]. There are many challenges involved in research concerning dashboards, such as understanding the capability of its components, adaptability, what users it may help, and handling complex analytics tasks [7–9]. During crisis periods, such as the COVID-19 pandemic, dashboard research can be strategic to provide more interactive visualizations, create decision opportunities, and aggregate data from multiple sources to plan timely and intelligent mitigation actions to reduce losses and give citizens a clear understanding of the importance of adherence to intervention measures, making society sensitive about other people’s life [10–15].Spatiotemporal and social network analysis has been widely used in COVID-19 management applications and gives clues that epidemic curves may be different from location to location, due to different spatial features and human behaviour in each geolocation [16–19]. The problem is that there are no studies in the literature that consider the study of the impact of COVID-19 propagation on spatial indicators of geolocations over time. This kind of analysis is important to understand what are the characteristics (population density, income, and others) of a set of neighbourhoods with high infection risk or low ICU cases. The output of such analysis is the risk potential according to neighbourhood indicator values, which would help the management of the outbreak with limited resources or use these data in a compartment model for prediction and intervention simulation tasks. Another issue that appears in this type of analysis is that the exploration and comparison of COVID-19 risk over time may involve the plotting of a large set of time series, which is associated with clutter problems [20].The objective of this work was to bring widgets that give support not only to the analysis of the propagation of the pandemic over time, which has already been explored in many studies in the literature [17, 18, 21–25], but a more profound exploration and analysis on the impact of the pandemic in socioeconomic indicators. In our approach, the association of epidemic variables and indicators (i.e., socioeconomic) is explored by using a colour scale to characterize the neighbourhood’s indicator magnitude in commonly adopted visualization plots.Also, we propose a way to gather specialist risk perception by interactively presenting the pandemic scenario in sequential time steps. Time series data are associated with clutter. Our clustering approach allows the user to perform a fast segmentation on the time series and then order the generated clusters. The ordering process can be adjusted by the number of clusters, observation of trends, and visual inspection of aggregated socioeconomic indicators. The interaction with the user gradually generates a risk heatmap and thus reduces the cluttering associated with multiple time series.Finally, it is possible to use the risk heatmap information to compare neighbourhoods and socioeconomic indicators by ranking them according to a severity score. This approach can support policymakers and health officials to plan risk mitigation strategies that prioritize critical neighbourhoods. Using this heatmap codification, it is also possible to understand what was the impact of the outbreak on socioeconomic variables in a given period.The usage and capability of the proposed widgets were demonstrated through use cases. The COVID-19 data were from the neighbourhoods of Recife, the capital of the state of Pernambuco in Brazil. The overall contributions of this study are as follows:(i)
Integrate the exploration of epidemic variables in commonly used plots with different spatial characteristics (i.e., socioeconomic)(ii)
A way to extract user’s perceived risk using unsupervised learning(iii)
Transformation of the set of time series into a risk heatmap to simplify the localities’ risk comparison(iv)
A ranking approach through a total severity score to identify critical localities and spatial variables(v)
An open-source web-based interactive tool containing the developed widgets


## 2. Related Works

In this section, we present related works which were discriminated in different research topics that integrate our proposed approach.


### 2.1. Spatiotemporal Approaches for Risk Visualization

Spatiotemporal analysis may use visualization approaches to aggregate regions by their event occurrence similarities over time [26], derive dynamic urban causal analysis [27], and explore the correlation between regions [28] and cooccurrence of spatial events [29]. Given the spatiotemporal analysis capabilities, different risk visualization applications were developed. García et al. [3] developed CrimAnalyzer, a tool to understand crime patterns over time and detect spatial crime hotspots. Bachechi et al. [30] developed TRAFAIR to visualize and manage predictive air quality maps in a continuous space-time domain, where the risk is associated with predefined pollutant thresholds. Chae et al. [4] developed a visual tool to support the detection of abnormal events for a given geolocation, where some of these events could be classified as disastrous, by using geo-located time-stamped social media data. Wang et al. [31] used visual analytics to explore relationships between country stability levels and trade networks by applying correlation analysis and temporal anomaly detection in the network features. In this work, we fill a gap by proposing a way to explore and analyze spatial features, such as demographic data, that are more associated with regions at high risk over time through human-in-the-loop risk assessment. This is important to help epidemiologists and modelling scientists to better understand the dynamics of each geolocation given their spatial features.


### 2.2. Interactive Time Series Clustering

Clustering methods lack the interpretability of the results. But, it is possible to obtain more insights into the characteristics of the elements of each group and to detect patterns by adopting visualization techniques [32]. Bouali et al. [33] adopted a rearrangement clustering approach to reorganizing time series with similar behaviour next to each other in an interactive 3D tubular visualization. Köthur et al. [34] developed a time-step hierarchical clustering approach to help the user to detect different spatiotemporal patterns and perform detailed exploration of them through interactive visual summaries. Shi et al. [35] developed a tool to partition a large set of time series into a manageable number of ranking categories to support the exploration of ranking changes over time and correlation detection. Zhao et al. [20] proposed an extended fast density-based clustering approach to reduce clutter and latency in large-scale time series data interactive exploration. We propose to develop widgets that perform the simultaneous comparison of ordered clusters and compare their elements using a summary visualization of their indicators. We also propose to reduce the cluttering of the time series by transforming a set of time series into a risk heatmap by using the severity order of the clusters, to support the identification of the most impacted neighbourhoods and features over time.


### 2.3. Visualization Tools for Pandemic Control

Since the beginning of the pandemic, the development of research worldwide to evaluate its impacts, such as the correlation between weather dynamics and the pandemic [36] and the population’s perception and awareness of the outbreak [37], was stimulated by universities, governments, and companies. Research and development of dashboards have been performed to support public health by monitoring preventive measures adherence [38] and monitoring the pandemic situation [10, 39]. Dashboards related to this work were developed adopting a spatiotemporal analysis of the COVID-19 impact in different analysis contexts: lockdown impacts [40], medical resources surveillance [41, 42], mathematical models for variable prediction and estimates [17, 19, 21, 22, 43, 44], social network analysis [18], and real-time monitoring and analysis of the infection [23–25, 45–48].Although few pandemic studies were developed in the visualization community, these works propose interesting ways to analyze and manage pandemics. Visual analytics tools have been developed for interactive parameter configuration for simulating the COVID-19 spatiotemporal propagation and health officials’ interventions through compartment models [49, 50]. Khan et al. [51] designed an ontology-based infrastructure that captures relationships between data streams, visualization functions, and web pages to allow the rapid deployment of web-based interactive dashboards across multiple data streams, in a context with limited resources and low programming expertise.To measure the specific impact of the outbreak in different localities, geospatial data are an important input since different geolocations have a different pandemic impact due to various indicators, such as those related to socioeconomics [17, 19, 52]. The majority of works in the visualization community developed for the geospatial data analysis are mainly concerned with atmospheric science, cartography, social media, and movement [53]. Also, works associated with dashboards for COVID-19 spatiotemporal analysis and monitoring have been majorly published in journals associated with other communities, such as medical informatics and public health. Thus, although lots of COVID-19 dashboards have been made available, as shown in Zhang et al. [54], it is still necessary to study new ways to increment the proposed dashboards’ components in the COVID-19 context by presenting new components that support risk analysis through visualization, considering individual perceived risk [54–56], and study how the pandemic is influenced by the socioeconomic and demographic characteristics of neighbourhoods.


## 2.1. Spatiotemporal Approaches for Risk Visualization

Spatiotemporal analysis may use visualization approaches to aggregate regions by their event occurrence similarities over time [26], derive dynamic urban causal analysis [27], and explore the correlation between regions [28] and cooccurrence of spatial events [29]. Given the spatiotemporal analysis capabilities, different risk visualization applications were developed. García et al. [3] developed CrimAnalyzer, a tool to understand crime patterns over time and detect spatial crime hotspots. Bachechi et al. [30] developed TRAFAIR to visualize and manage predictive air quality maps in a continuous space-time domain, where the risk is associated with predefined pollutant thresholds. Chae et al. [4] developed a visual tool to support the detection of abnormal events for a given geolocation, where some of these events could be classified as disastrous, by using geo-located time-stamped social media data. Wang et al. [31] used visual analytics to explore relationships between country stability levels and trade networks by applying correlation analysis and temporal anomaly detection in the network features. In this work, we fill a gap by proposing a way to explore and analyze spatial features, such as demographic data, that are more associated with regions at high risk over time through human-in-the-loop risk assessment. This is important to help epidemiologists and modelling scientists to better understand the dynamics of each geolocation given their spatial features.


## 2.2. Interactive Time Series Clustering

Clustering methods lack the interpretability of the results. But, it is possible to obtain more insights into the characteristics of the elements of each group and to detect patterns by adopting visualization techniques [32]. Bouali et al. [33] adopted a rearrangement clustering approach to reorganizing time series with similar behaviour next to each other in an interactive 3D tubular visualization. Köthur et al. [34] developed a time-step hierarchical clustering approach to help the user to detect different spatiotemporal patterns and perform detailed exploration of them through interactive visual summaries. Shi et al. [35] developed a tool to partition a large set of time series into a manageable number of ranking categories to support the exploration of ranking changes over time and correlation detection. Zhao et al. [20] proposed an extended fast density-based clustering approach to reduce clutter and latency in large-scale time series data interactive exploration. We propose to develop widgets that perform the simultaneous comparison of ordered clusters and compare their elements using a summary visualization of their indicators. We also propose to reduce the cluttering of the time series by transforming a set of time series into a risk heatmap by using the severity order of the clusters, to support the identification of the most impacted neighbourhoods and features over time.


## 2.3. Visualization Tools for Pandemic Control

Since the beginning of the pandemic, the development of research worldwide to evaluate its impacts, such as the correlation between weather dynamics and the pandemic [36] and the population’s perception and awareness of the outbreak [37], was stimulated by universities, governments, and companies. Research and development of dashboards have been performed to support public health by monitoring preventive measures adherence [38] and monitoring the pandemic situation [10, 39]. Dashboards related to this work were developed adopting a spatiotemporal analysis of the COVID-19 impact in different analysis contexts: lockdown impacts [40], medical resources surveillance [41, 42], mathematical models for variable prediction and estimates [17, 19, 21, 22, 43, 44], social network analysis [18], and real-time monitoring and analysis of the infection [23–25, 45–48].Although few pandemic studies were developed in the visualization community, these works propose interesting ways to analyze and manage pandemics. Visual analytics tools have been developed for interactive parameter configuration for simulating the COVID-19 spatiotemporal propagation and health officials’ interventions through compartment models [49, 50]. Khan et al. [51] designed an ontology-based infrastructure that captures relationships between data streams, visualization functions, and web pages to allow the rapid deployment of web-based interactive dashboards across multiple data streams, in a context with limited resources and low programming expertise.To measure the specific impact of the outbreak in different localities, geospatial data are an important input since different geolocations have a different pandemic impact due to various indicators, such as those related to socioeconomics [17, 19, 52]. The majority of works in the visualization community developed for the geospatial data analysis are mainly concerned with atmospheric science, cartography, social media, and movement [53]. Also, works associated with dashboards for COVID-19 spatiotemporal analysis and monitoring have been majorly published in journals associated with other communities, such as medical informatics and public health. Thus, although lots of COVID-19 dashboards have been made available, as shown in Zhang et al. [54], it is still necessary to study new ways to increment the proposed dashboards’ components in the COVID-19 context by presenting new components that support risk analysis through visualization, considering individual perceived risk [54–56], and study how the pandemic is influenced by the socioeconomic and demographic characteristics of neighbourhoods.


## 3. COVID-19 Visual Analytics

We guided the development of the COVID-19 widgets through design goals and aligned with analysis tasks, gaps, and challenges in past related works, which is an approach adopted in some recent visual analytics studies [57–59].


### 3.1. Analysis Tasks

Based on the challenges and gaps encountered in the literature, our interactive visualizations were designed to support the following analysis tasks:(i)
Epidemiological and spatial variables (T1): How do the epidemiological variables behave given the geolocation characteristics? Does a specific subset of demographic or socioeconomic variables is associated with more or less risk?(ii)
Analysis of multiple time series (T2): How to reduce the cluttering of multiple epidemiological time series? How to compare multiple epidemiological time series?(iii)
Risk management (T3): How to identify a subset of neighbourhoods that need to be prioritized with respect to the risk level of a given epidemiological variable?(iv)
Risk assessment (T4): How to extract the user’s risk perception through interactive scenario analysis? How to use the risk information extracted from the user to identify critical neighbourhoods?(v)
Risk level over time (T5): How the risk level evolves over time? How to compare the risk of multiple localities over time?


### 3.2. Design Goals

We considered the following design goals to address the analysis tasks.(i)
Design goal one (DG1).Integration and exploration of multiple spatial indicators The incorporation of variables associated with the studied territories was not explored sufficiently in the literature, and as was discussed in the related works section, different geographical locations may have distinct vulnerabilities due to various indicators. This goal aims to enable the exploration of associations between spatial indicators and epidemiological variables. We propose to get better insights into the socioeconomic and demographic features from widgets that are a must-to-have in COVID-19 visualization tools, such as scatter plots and bar plots.(ii)
Design goal two (DG2).Simplified time series analysis This objective concerns the reduction of cluttering time series on the time series visualizations of the developed tool. This is important since many neighbourhoods are considered in this type of analysis; consequently, there will be more noise in the visualization, making into impossible to reliably compare the performance of multiple neighbourhoods for a given epidemic variable over time.(iii)
Design goal three (DG3)Propose a model to reflect user’s perceived risk There is a lack of studies that embed user-perceived risk in COVID-19 data visualization tools. This is possible by presenting an initial set of ordered clusters of neighbourhoods for the user through unsupervised learning and enabling him/her to perform adjustments. Therefore, this objective concerns the development of a risk model that computes a severity score of a neighbourhood based on the risk classification provided by the user.(iv)
Design goal four (DG4).Identification of critical localities and spatial indicators The user’s perceived risk output will generate a risk heatmap that shows the perceived risk over time. This allows us to understand what neighbourhoods need to be prioritized for mitigation actions. Thus, it is possible to compute a spatial indicator severity score. This allows us to understand what spatial indicators are more associated with high or low-risk neighbourhoods.


### 3.3. Data and Software

Confirmed SARS-CoV-2 active cases, deaths, and ICU active cases were collected for all neighbourhoods of Recife, the capital of Pernambuco. The epidemic time series data range from 06/05/2020 until 08/02/2021. Data associated with 18 socioeconomic and demographic indicators, presented in Table1, were also collected for all neighbourhoods of Recife. All the collected data were processed using Python, and a.json file was generated to compose the main JavaScript script that builds the page. The adopted JavaScript libraries were D3.js (https://d3js.org/), for the graphs, leaflet (https://leafletjs.com/), for building the map, and bootstrap (https://getbootstrap.com/docs/3.4/), for some elements of the graphical user interface.Table 1
Socioeconomic and demographic indicators that were collected.
NameCodeProbability of survival 60 yearssurv60Per capita incomeipcPercentage of employed in the agricultural sectoreagriPercentage of employed in the commerce sectorecommPercentage of employed in the construction sectoreconstrPercentage of employed in the extractive sectoreextrPercentage of employed in the service sectoreservPercentage of employed in the industrial sectoreindPercentage of employed in the transformation ind. sectoretransfPercentage of vulnerable households dependent on elderlyprdepelderPopulation in vulnerable households dependent on elderlyhousevulelderPercentage of population in bedrooms with 2 or more peopletdensHDI (human development index)hdiHDI educationhdieHDI longevityhdilHDI incomehdirInadequate water supply and sanitationwater_supplyDemographic densitydemo_densFor the clustering macro widget, Flask (https://palletsprojects.com/p/flask/) was used as the backend web framework to handle user requests made through the clustering widget. We adopted the K-means clustering algorithm with dynamic time warping (DTW) distance metric from the tslearn package [60], which is a Python package for time series analysis, using the default value of the max_iter parameter. The focus of this paper is not to compare different clustering algorithms. We adopted this algorithm to exemplify our risk assessment approach, where the clustering algorithm generates an initial set of time series clusters ordered by risk.K-means generates K nonoverlapping partitions on the data set, where each partition (or cluster) is defined by a centroid. The centroids aggregate similar elements based on a distance metric. It is possible to compute the similarity between two time series by converting them to data vectors and applying the Euclidean distance. There are some drawbacks when using this metric with time series data since it may not take into consideration matching points of time series, even if these points are not aligned in the time axis. Some examples are similar sequences that vary in speed or are shifted temporally, which can be handled by the DTW metric [61, 62].


### 3.4. Visual Design

The application containing the proposed widgets is shown in Figure1. The code is open-source and is available at https://github.com/jcssilva4/covid19-interactive-analysis-clustering. The developed tool used to evaluate the proposed widgets was deployed in Heroku: https://covid-interactive-clustering.herokuapp.com/.Figure 1
The exploration application aims to provide an exploration of the evolution of some epidemic variables and derive associations with spatial variables.In the tool design stage, a map (Figure1(b)) was chosen to represent the status of the pandemic in each neighbourhood on a certain date and the socioeconomic/demographic characteristics of each neighbourhood. Each neighbourhood will be coloured according to a unique variable, specified in the configuration panel presented in Figure 1(a), which can be an epidemic, socioeconomic, or demographic. Also, this map widget allows the user to select a subset of neighbourhoods to be compared and analyzed (DG1).As it was observed in Section, the majority of the reviewed dashboards use time series widgets. In this work, socioeconomic/demographic variables were considered, and the epidemic time series widget integrated this information. In the developed time series widget (Figure 1(e)), each series is coloured according to the neighbourhood characteristic under study selected on the map widget. The user can explore and obtain time series clusters manually in any period of the sample for epidemic variables: active cases (and active cases per capita), deaths (and deaths per capita), and active ICU patients (active ICU patients per capita) (DG1, DG2).A scatter plot (Figure 1(c)) was used to verify correlations between variables associated with the pandemic and neighbourhood characteristics. In this widget, the user can evaluate correlations from the mean value of the epidemic variable under study in a given time interval for all neighbourhoods of Recife. The last included widget was that containing a histogram (Figure 1(d)). In the histogram, the user can study how the disease duration is distributed in different neighbourhood clusters. The clusters are generated according to the characteristic chosen in the map widget (DG1).


### 3.5. Model for Severity Analysis of Neighbourhoods and Indicators over Time

The application in which this model is contained is shown in Figure2. This module of the visualization tool offers widgets to the user so that he/she can rank neighbourhoods and features with respect to a severity level assigned over time.Figure 2
The clustering application aims to extract the risk perception of the user enabling the identification of critical neighbourhoods and spatial variables.


### 3.6. Time Series Clustering and Severity Level Assignment

A time series clustering algorithm can be used as a way to separate groups of neighbourhoods based on an epidemic variable, such as active cases, ICU demand, and deaths. The parameters for the time series clustering can be specified in the configuration panel as shown in Figure 2(c). The only parameters requested are the time interval, the epidemic variable, and the number of clusters.One can visualize the clusters generated by the chosen parameters through the time series widget (Figure 2(d)) and observe the spatial distribution of clusters through the map widget (Figure 2(a)). After the clustering algorithm provides a partition, the user can order the partitions by severity by analyzing the time series widget (DG3).This cluster ordering process is shown in Figure3. In Step 1, the user chooses the parameters and runs the clustering algorithm. We recommend the use of 3 or 5 clusters, since these numbers do not demand a high cognitive effort from the decision maker, and they establish a medium level of risk between low- and high-risk clusters. For instance, when considering 5 clusters, one could define “very low,” “low,” “medium,” “high,” and “very high” levels of risk. We represent the requested number of clusters as mt at time t=1,…,T. The clustering algorithm provides a partition Gt=c0,…,cmt−1 and associates random severity values sGtck for each cluster ck∈Gt in Step 2. These initial severity values are based on the index assigned by the clustering algorithm for a cluster, which is sGtck=k, where k=0,…,mt−1.Figure 3
Cluster ordering process. After the generation of an initial set of risk clusters, this configuration panel helps the user in adjusting the risk order of the clusters.The colours of the clusters are associated with their severity level, ranging from blue (lowest severity possible) to red (highest severity possible). Given the way in which severity is allocated by the clustering algorithm, the lowest severity level possible isLst=mincksGtck=0, and the highest is Ust=maxcksGtck=mt−1. The severity values are normalized using Ust so that they are contained in the [0, 1] interval. We considered a local severity approach although we know that red areas will always exist even in relatively low infection periods. We adopted this approach because the objective of the clustering application is not to measure the infection magnitude in the neighbourhoods but to always obtain ordered clusters to manage the neighbourhoods adequately based on priority.The clustering algorithm only knows how to separate time series, but not how to order the clusters concerning their severity level, and that is where the user comes in. In Step 3, the user adjusts the severity value of each cluster through a partition customization panel accessed when the button of Figure 2(b) is pressed. In this panel, the user can select a cluster by its name and change its severity score. It is also possible to change the cluster name. This step is more subjective since one can find clusters containing series with the highest peaks more severe than clusters containing series with lower peaks distributed over the analyzed period, in which the cumulative quantity of the variable is almost the same as the first case. After the user decided on the final severity order, he/she can analyze other variables associated with each cluster.


### 3.7. Indicators and Clusters

Considering that the user selected a setQ of indicators (i.e., socioeconomic, demographic), Figure 2(e) shows the indicators panel, where the user can analyze ordered bar plots for each indicator q∈Q. The order of the bars is determined with respect to the mean value of the indicator in a cluster, as given in the following equation:(1)Vqtck=∑b∈ckIqbck.For each cluster,ck∈Gt, where b is a member of the considered universe of territories analyzed N. N can represent a set of neighbourhoods, cities, or countries, depending on the desired granularity of the analysis. Iqb is the value of the indicator q in b.The ordered bar plots offer a way for the user to detect indicators in which a considered difference between the generated clusters exists. This can help the user to consider other variables when performing the severity sorting, instead of only looking at the high or low values of epidemic variables. Also, this permits the user to find facts, such as “At a periodt, high-severity clusters were concentrating neighbourhoods whose mean per capita income was the lowest amongst all clusters” (DG1).Also, the user can see the indicators’ distribution in each cluster with the parallel coordinates plot (Figure 2(f)), accessed through the second tab of the indicators panel. When the user positions the mouse over a neighbourhood line, only lines of neighbourhoods belonging to the same cluster will be highlighted.


### 3.8. Severity Analysis over Time

The clustering module allows the user to perform sequential clustering ordering and analyze them with the heatmap widget (Figure 2(g)) accessed through a select button in the map widget. One can switch between the map and heatmap widgets as necessary. The user must define a partition generation frequency (i.e., weekly, monthly) and perform the procedure described in Figure3 for every period t=1,…,T (i.e., week, month) covering all the historical data considered (DG2, DG3).In the heatmap widget, one can rank neighbourhoods or features with respect to their total severity scoressN∗b and sI∗q, respectively. The user can select two ranking options: rank by more recent severity values (RRS) and rank by older severity values (ROS). RRS implies that recent severity values are more important than older severity values. In the case of ROS, older values are more important (DG4). Equation (2) computes the total severity score for b∈N.(2)sN∗b=∑t=1Twt∗sGtCUst,where b∈C, and wt is the weight of C severity at period t. When the user wants to rank according to RRS, then wt=t/∑τ=1Tτ; otherwise, when ranking according to ROS, then wt=t/∑τ=1TT+1−τ. It doesn’t matter if m is different from period to period because there is a normalizing constant Ust that scales sGtck into [0, 1].Before definingsI∗q, we introduce the severity score of an indicator q∈Q at period t in the following equation:(3)sItq=∑ck∈GVqtck∗sGtC∑ck∈GVqtck,where 0≤sItq≤mt−1. This severity score represents the weighted mean severity of clusters generated in period t, weighted by Vqt. The higher the value of sItq, the higher the mean value of q for clusters with higher severity relative to clusters with lower severity. The total severity score of an indicator q is given by the following equation:(4)sI∗q=∑t=1Twt∗sItqUst.With the total severity score, the user can analyze which indicators were most/less impacted by high-severity clusters at a certain period.


### 3.9. Use Cases

In this section, the use cases are presented through a tool developed to demonstrate the usefulness of the proposed widgets.


### 3.10. Neighbourhoods’ Characteristics Exploration and Analysis

The following use cases were performed to evaluate the exploration macro widget.


### 3.11. Time Series and Neighbourhood Characteristics

The user can choose a unique variable to study and analyze how this variable impacts the COVID-19 active cases, deaths, and ICU demands. Figure4 shows the impact of three different variables in active cases per capita. Comparing the neighbourhoods with extreme values for each of the three variables, we can observe that the higher these indicators are the higher the peaks of active cases per capita. For instance, in Figure 4(a), we can see that the neighbourhoods with a high percentage of the population working in the transformation industry sector (time series in red) have higher peaks of active cases per capita when compared to neighbourhoods of a low magnitude of this indicator (time series in blue).Figure 4
Study of the impact of different variables in active cases per capita. (a) Influence of percentage of the population working in the transformation industry sector in the active cases per capita variable. We can see that it is possible to verify the trends of a specific time series by putting the cursor over it. (b) Influence of percentage of the population living in vulnerable houses with elderly people in the active cases per capita variable. (c) Influence of education development human index in the active cases per capita variable.
(a)(b)(c)Figure4(a) also shows that we can evaluate the behaviour of active cases per capita of a specific time series by putting the mouse cursor over it. This will change the opacity of the unselected time series to reduce cluttering. This selection of specific time series is incorporated in the time series and parallel coordinate widgets of the clustering application (Figures 2(d) and 2(f)).One can also combine two variables. Figure5 shows the impact of different pairs of variables on the ICU demand. This can be done by selecting a subgroup of the first indicator, which can be a group of neighbourhoods with low or high values of this indicator, and then analyzing this subgroup using a second indicator. Figure 5(a) presents the ICU demand for the neighbourhoods with a lower probability of surviving until 60 years and evaluates the sector in which they are most representative, which is the extractive sector. Figure 5(b) compares the ICU demand for neighbourhoods with a low-quality water supply and the percentage of workers in the extractive sector. We can see that, for both analyses, the more percentage of people working in the extractive sector, the more ICU demand will be generated.Figure 5
Study of the impact of different variables on ICU demand. (a) Evaluation of ICU demand when considering the lower probability of survival until 60 years combined with the percentage of workers in the extractive sector. (b) Evaluation of ICU demand when considering the low quality of water supply and percentage of workers combined with the extractive sector.
(a)(b)


### 3.12. Scatter Plot

The scatter plot can be used to identify correlations between epidemiological and neighbourhood socioeconomic/demographic characteristics in different periods. Figure6 shows two scatter plot analyses correlating two epidemiological variables with the percentage of the population living in vulnerable houses with elderly people. In Figure 6(a), the number of deaths (in a period that concentrated a high number of new deaths) is correlated weakly with this socioeconomic variable, and in Figure 6(b), the ICU demand (in a period that concentrated a high ICU demand) is more correlated with this socioeconomic variable.Figure 6
Study of the impact of different variables on ICU demand. (a)X: percentage of the population living in vulnerable houses with elderly people and Y: deaths per capita, “18-05-2020–24-07-2020.” (b) X: percentage of the population living in vulnerable houses with elderly people and Y: ICU demand, “18-05-2020–24-07-2020.”
(a)(b)In this widget, one can also identify which neighbourhoods are more critical with respect to an epidemiological variable. Looking at Figure6(b), we can select in the scatter plot the three neighbourhoods that most generated ICU demand and identify them in the choropleth map. Finally, the duration does not change between neighbourhoods with different characteristics with a similar confirmed case sample size.


### 3.13. Clustering and Neighbourhood/Feature Ranking

The clustering macro widget is evaluated next. For the following use cases, we adopted a monthly partition generation frequency and two epidemic variables: active cases per capita and ICU demand. The initial value for the number of clusters was 3, and it was incremented if the generated partition was not satisfactory. The process presented in Figure3 was performed in each period. After a partition was generated for each period, neighbourhoods and features were ranked according to their total severity score.


### 3.14. Study of Severity According to Active Cases per Capita

This use case considers that a user wants to evaluate the most impacted neighbourhoods and indicators according to the active cases per capita epidemic variable. The parameters inserted for the cluster generation in each period are presented in Table2, where each row contains information about each period.Table 2
Parameters adopted for the cluster generation process in the active cases per capita use case.
MonthDate parametersFinal number of clustersMay06/05/2020–31/05/20203June01/06/2020–30/06/20203July01/07/2020–31/07/20203August01/08/2020–31/08/20203September01/09/2020–30/09/20203October01/10/2020–31/10/20205November01/11/2020–30/11/20203December01/12/2020–31/12/20205January01/01/2021–31/01/20213Each row contains a map coloured by clusters’ membership, the initial partition, the final partition with clusters ordered, and the barplot of an indicator with considerable difference between clusters. When the initial partition is equal to the first partition, the clustering algorithm was able to provide a correct cluster severity order.Although associated with a low demographic density, the active cases of the most severe cluster decreased until the first half of May and then increased more than other neighbourhoods at the end of May. Since this period is the initial stage of the first wave, the most severe clusters contained only one neighbourhood each.The same severe neighbourhood of May continued to be severe until the first half of June. In the barplot, we can see the same relationship in the demographic density as in May/2020. Near the first half of July, a neighbourhood with a very small population and only one individual infected had an abrupt increase in active cases per capita, but it was considered a midseverity cluster. From the barplot, we can see that the demographic density of this neighbourhood is very low.In August, a cluster that contained a small population neighbourhood was classified as a midseverity cluster. Another cluster with relatively more infected people and higher active cases per capita was classified as high severity. In the next month, although the high-severity cluster had only one neighbourhood, this neighbourhood is central and visited by people from many different neighbourhoods. Also, this neighbourhood has relatively more people sleeping in the same bedroom as shown in the barplot.The initial partition of October was not satisfactory. The initial three partitions were not very well separated, and then, a new partition with 5 clusters was generated. With 5 clusters, the ordering could be performed more clearly. As can be observed in the barplot, the mean percentage of people working in the services and commerce sectors was higher for more severe clusters.In November, the high-severity cluster had neighbourhoods that were associated with a high mean demographic density. When looking at the final month, December, the initial partition with 3 clusters was not satisfactory. With 5 clusters, the ordering could be performed more clearly. From the barplot of December, it could be observed that the mean per capita income was higher for more severe clusters.In the last month, January, a neighbourhood with a higher infected per capita at the end of the month was allocated to a high-severity cluster and the neighbourhood with a higher infected per capita until almost the first half of January was allocated to the midseverity cluster since its cases decreased. The high-severity cluster was associated with a higher percentage of workers in the commerce sector.The partitions of July, August, September, and January are wrong on purpose, to show the reader that the user must be careful when choosing the adequate number of clusters. Looking at the map of December/2020 in Figure7, we can see that many neighbourhoods are associated with high severity and suddenly become part of low-risk clusters in the next month. This happens because some neighbourhoods have relatively high “Jumps,” which produce high-severity and midseverity clusters containing only one or two members when considering a lower number of clusters. In this section, an epidemic variable with fewer unexpected neighbourhoods “Jumps” is shown.Figure 7
Clustering process for the active cases per capita use case (May/2020–Jan/2021).Health officials can make severity information available to the public by sharing the maps at the end of each period. After the sequential clustering procedure is finished, one can perform the computation of the total severity score for neighbourhoods and features, and rank them, as shown in Figure8.Figure 8
Heatmaps for the active cases per capita use case (May/2020–Jan/2021): (a) neighbourhood heatmap and (b) feature heatmap.
(a)(b)Figure8(a) shows the neighbourhood ranking after RRS and ROS are applied. When comparing the most recent and older severe neighbourhoods, it can be observed that Ilha do Leite and Apipucos were always very risky and should be given more attention than others. On the other hand, Cidade Universitária, Coelhos, and Santo Antonio were outside the RRS top 5, which shows that their severity has been reduced. In the bottom 5 for RRS and ROS, we can see that three neighbourhoods (Barro, Brejo do Beberibe, and Passarinho) were always classified as low risk in all the considered periods.The indicators’ RRS and ROS are presented in Figure8(b). When comparing the most recent and older severe top 5 and bottom 5 features, there is no variation. The top 3 features most impacted by severe clusters in all the considered periods were as follows: the percentage of workers in the commerce sector, per capita income, and percentage of workers in the services sector. Policymakers should give special attention to these sectors, which, according to this study evaluation, are highly associated with high-severity clusters. The bottom 3 (less impacted indicators) is as follows: the percentage with an inadequate water supply and sanitation, the population living in vulnerable residences with elderly people, and demographic density.


### 3.15. Study of Severity According to ICU Demand

The proposed clustering tool can also be used for specific periods. Here, we consider the study of severity related to ICU demand during the most critical period of the first wave of the pandemic in Recife, as shown in Figure9. The parameters used in the ICU demand use case are presented in Table 3. The clustering process result is shown in Figure 10.Figure 9
A critical period of the first wave to be analyzed in the ICU use case.Table 3
Parameters adopted for the cluster generation process in the ICU use case.
MonthDate parametersFinal number of clustersMay06/05/2020–31/05/20203June01/06/2020–30/06/20203July01/07/2020–31/07/20203August01/08/2020–31/08/20203Figure 10
Clustering process for the ICU demand use case (May/2020–Aug/2020).In May, it was possible to observe that the only indicator showing some difference between clusters’ characteristics is the mean demographic density. Neighbourhoods allocated to the high-severity cluster had a higher mean demographic density. In June, the only difference between the midseverity cluster and the low-severity cluster is that neighbourhoods belonging to the first continue to generate high ICU demand after the first half of June. Another variable that supported the cluster order was the per capita income since neighbourhoods in the high-severity cluster have a lower mean per capita income.In July, the high-severity cluster contained a single neighbourhood that had a higher fraction of the population working in the commerce sector relative to the mean of this indicator in the other two clusters. In August, it can be observed that the high-severity cluster is the same as in July, and although it generates a good part of the demand, it is decreasing.Figure11(a) shows that the neighbourhood ranking after RRS and ROS is applied. When comparing the most recent and older severe neighbourhoods, it can be observed that Boa Viagem, Campo Grande, Dois Unidos, and Afogados were always critical with respect to ICU, and special treatment, such COVID-19 education campaigns, must be performed in these neighbourhoods to reduce the high ICU demand. On the other hand, Jardim São Paulo had its ICU demand reduced and was outside the RRS top 5. Again, in the bottom 5 for RRS and ROS, we can see that five neighbourhoods were always classified as low ICU demand in all the considered periods.Figure 11
Heatmaps for the ICU use case (May/2020–Aug/2020): (a) neighbourhood heatmap and (b) feature heatmap.
(a)(b)The indicators’ RRS and ROS are presented in Figure11(b). The income per capita was included in the top 3 features more recently, which shows that this indicator was associated with high-severity clusters more recently. Policymakers should give special attention to the commercial sector again, which, according to this study evaluation, is highly associated with high-severity clusters with respect to ICU demand. From the bottom 3, the two less impacted indicators in all the considered periods were as follows: the population living in vulnerable residences with elderly people, and the percentage of people working in the services sector.


## 3.1. Analysis Tasks

Based on the challenges and gaps encountered in the literature, our interactive visualizations were designed to support the following analysis tasks:(i)
Epidemiological and spatial variables (T1): How do the epidemiological variables behave given the geolocation characteristics? Does a specific subset of demographic or socioeconomic variables is associated with more or less risk?(ii)
Analysis of multiple time series (T2): How to reduce the cluttering of multiple epidemiological time series? How to compare multiple epidemiological time series?(iii)
Risk management (T3): How to identify a subset of neighbourhoods that need to be prioritized with respect to the risk level of a given epidemiological variable?(iv)
Risk assessment (T4): How to extract the user’s risk perception through interactive scenario analysis? How to use the risk information extracted from the user to identify critical neighbourhoods?(v)
Risk level over time (T5): How the risk level evolves over time? How to compare the risk of multiple localities over time?


## 3.2. Design Goals

We considered the following design goals to address the analysis tasks.(i)
Design goal one (DG1).Integration and exploration of multiple spatial indicators The incorporation of variables associated with the studied territories was not explored sufficiently in the literature, and as was discussed in the related works section, different geographical locations may have distinct vulnerabilities due to various indicators. This goal aims to enable the exploration of associations between spatial indicators and epidemiological variables. We propose to get better insights into the socioeconomic and demographic features from widgets that are a must-to-have in COVID-19 visualization tools, such as scatter plots and bar plots.(ii)
Design goal two (DG2).Simplified time series analysis This objective concerns the reduction of cluttering time series on the time series visualizations of the developed tool. This is important since many neighbourhoods are considered in this type of analysis; consequently, there will be more noise in the visualization, making into impossible to reliably compare the performance of multiple neighbourhoods for a given epidemic variable over time.(iii)
Design goal three (DG3)Propose a model to reflect user’s perceived risk There is a lack of studies that embed user-perceived risk in COVID-19 data visualization tools. This is possible by presenting an initial set of ordered clusters of neighbourhoods for the user through unsupervised learning and enabling him/her to perform adjustments. Therefore, this objective concerns the development of a risk model that computes a severity score of a neighbourhood based on the risk classification provided by the user.(iv)
Design goal four (DG4).Identification of critical localities and spatial indicators The user’s perceived risk output will generate a risk heatmap that shows the perceived risk over time. This allows us to understand what neighbourhoods need to be prioritized for mitigation actions. Thus, it is possible to compute a spatial indicator severity score. This allows us to understand what spatial indicators are more associated with high or low-risk neighbourhoods.


## 3.3. Data and Software

Confirmed SARS-CoV-2 active cases, deaths, and ICU active cases were collected for all neighbourhoods of Recife, the capital of Pernambuco. The epidemic time series data range from 06/05/2020 until 08/02/2021. Data associated with 18 socioeconomic and demographic indicators, presented in Table1, were also collected for all neighbourhoods of Recife. All the collected data were processed using Python, and a.json file was generated to compose the main JavaScript script that builds the page. The adopted JavaScript libraries were D3.js (https://d3js.org/), for the graphs, leaflet (https://leafletjs.com/), for building the map, and bootstrap (https://getbootstrap.com/docs/3.4/), for some elements of the graphical user interface.Table 1
Socioeconomic and demographic indicators that were collected.
NameCodeProbability of survival 60 yearssurv60Per capita incomeipcPercentage of employed in the agricultural sectoreagriPercentage of employed in the commerce sectorecommPercentage of employed in the construction sectoreconstrPercentage of employed in the extractive sectoreextrPercentage of employed in the service sectoreservPercentage of employed in the industrial sectoreindPercentage of employed in the transformation ind. sectoretransfPercentage of vulnerable households dependent on elderlyprdepelderPopulation in vulnerable households dependent on elderlyhousevulelderPercentage of population in bedrooms with 2 or more peopletdensHDI (human development index)hdiHDI educationhdieHDI longevityhdilHDI incomehdirInadequate water supply and sanitationwater_supplyDemographic densitydemo_densFor the clustering macro widget, Flask (https://palletsprojects.com/p/flask/) was used as the backend web framework to handle user requests made through the clustering widget. We adopted the K-means clustering algorithm with dynamic time warping (DTW) distance metric from the tslearn package [60], which is a Python package for time series analysis, using the default value of the max_iter parameter. The focus of this paper is not to compare different clustering algorithms. We adopted this algorithm to exemplify our risk assessment approach, where the clustering algorithm generates an initial set of time series clusters ordered by risk.K-means generates K nonoverlapping partitions on the data set, where each partition (or cluster) is defined by a centroid. The centroids aggregate similar elements based on a distance metric. It is possible to compute the similarity between two time series by converting them to data vectors and applying the Euclidean distance. There are some drawbacks when using this metric with time series data since it may not take into consideration matching points of time series, even if these points are not aligned in the time axis. Some examples are similar sequences that vary in speed or are shifted temporally, which can be handled by the DTW metric [61, 62].


## 3.4. Visual Design

The application containing the proposed widgets is shown in Figure1. The code is open-source and is available at https://github.com/jcssilva4/covid19-interactive-analysis-clustering. The developed tool used to evaluate the proposed widgets was deployed in Heroku: https://covid-interactive-clustering.herokuapp.com/.Figure 1
The exploration application aims to provide an exploration of the evolution of some epidemic variables and derive associations with spatial variables.In the tool design stage, a map (Figure1(b)) was chosen to represent the status of the pandemic in each neighbourhood on a certain date and the socioeconomic/demographic characteristics of each neighbourhood. Each neighbourhood will be coloured according to a unique variable, specified in the configuration panel presented in Figure 1(a), which can be an epidemic, socioeconomic, or demographic. Also, this map widget allows the user to select a subset of neighbourhoods to be compared and analyzed (DG1).As it was observed in Section, the majority of the reviewed dashboards use time series widgets. In this work, socioeconomic/demographic variables were considered, and the epidemic time series widget integrated this information. In the developed time series widget (Figure 1(e)), each series is coloured according to the neighbourhood characteristic under study selected on the map widget. The user can explore and obtain time series clusters manually in any period of the sample for epidemic variables: active cases (and active cases per capita), deaths (and deaths per capita), and active ICU patients (active ICU patients per capita) (DG1, DG2).A scatter plot (Figure 1(c)) was used to verify correlations between variables associated with the pandemic and neighbourhood characteristics. In this widget, the user can evaluate correlations from the mean value of the epidemic variable under study in a given time interval for all neighbourhoods of Recife. The last included widget was that containing a histogram (Figure 1(d)). In the histogram, the user can study how the disease duration is distributed in different neighbourhood clusters. The clusters are generated according to the characteristic chosen in the map widget (DG1).


## 3.5. Model for Severity Analysis of Neighbourhoods and Indicators over Time

The application in which this model is contained is shown in Figure2. This module of the visualization tool offers widgets to the user so that he/she can rank neighbourhoods and features with respect to a severity level assigned over time.Figure 2
The clustering application aims to extract the risk perception of the user enabling the identification of critical neighbourhoods and spatial variables.


## 3.6. Time Series Clustering and Severity Level Assignment

A time series clustering algorithm can be used as a way to separate groups of neighbourhoods based on an epidemic variable, such as active cases, ICU demand, and deaths. The parameters for the time series clustering can be specified in the configuration panel as shown in Figure 2(c). The only parameters requested are the time interval, the epidemic variable, and the number of clusters.One can visualize the clusters generated by the chosen parameters through the time series widget (Figure 2(d)) and observe the spatial distribution of clusters through the map widget (Figure 2(a)). After the clustering algorithm provides a partition, the user can order the partitions by severity by analyzing the time series widget (DG3).This cluster ordering process is shown in Figure3. In Step 1, the user chooses the parameters and runs the clustering algorithm. We recommend the use of 3 or 5 clusters, since these numbers do not demand a high cognitive effort from the decision maker, and they establish a medium level of risk between low- and high-risk clusters. For instance, when considering 5 clusters, one could define “very low,” “low,” “medium,” “high,” and “very high” levels of risk. We represent the requested number of clusters as mt at time t=1,…,T. The clustering algorithm provides a partition Gt=c0,…,cmt−1 and associates random severity values sGtck for each cluster ck∈Gt in Step 2. These initial severity values are based on the index assigned by the clustering algorithm for a cluster, which is sGtck=k, where k=0,…,mt−1.Figure 3
Cluster ordering process. After the generation of an initial set of risk clusters, this configuration panel helps the user in adjusting the risk order of the clusters.The colours of the clusters are associated with their severity level, ranging from blue (lowest severity possible) to red (highest severity possible). Given the way in which severity is allocated by the clustering algorithm, the lowest severity level possible isLst=mincksGtck=0, and the highest is Ust=maxcksGtck=mt−1. The severity values are normalized using Ust so that they are contained in the [0, 1] interval. We considered a local severity approach although we know that red areas will always exist even in relatively low infection periods. We adopted this approach because the objective of the clustering application is not to measure the infection magnitude in the neighbourhoods but to always obtain ordered clusters to manage the neighbourhoods adequately based on priority.The clustering algorithm only knows how to separate time series, but not how to order the clusters concerning their severity level, and that is where the user comes in. In Step 3, the user adjusts the severity value of each cluster through a partition customization panel accessed when the button of Figure 2(b) is pressed. In this panel, the user can select a cluster by its name and change its severity score. It is also possible to change the cluster name. This step is more subjective since one can find clusters containing series with the highest peaks more severe than clusters containing series with lower peaks distributed over the analyzed period, in which the cumulative quantity of the variable is almost the same as the first case. After the user decided on the final severity order, he/she can analyze other variables associated with each cluster.


## 3.7. Indicators and Clusters

Considering that the user selected a setQ of indicators (i.e., socioeconomic, demographic), Figure 2(e) shows the indicators panel, where the user can analyze ordered bar plots for each indicator q∈Q. The order of the bars is determined with respect to the mean value of the indicator in a cluster, as given in the following equation:(1)Vqtck=∑b∈ckIqbck.For each cluster,ck∈Gt, where b is a member of the considered universe of territories analyzed N. N can represent a set of neighbourhoods, cities, or countries, depending on the desired granularity of the analysis. Iqb is the value of the indicator q in b.The ordered bar plots offer a way for the user to detect indicators in which a considered difference between the generated clusters exists. This can help the user to consider other variables when performing the severity sorting, instead of only looking at the high or low values of epidemic variables. Also, this permits the user to find facts, such as “At a periodt, high-severity clusters were concentrating neighbourhoods whose mean per capita income was the lowest amongst all clusters” (DG1).Also, the user can see the indicators’ distribution in each cluster with the parallel coordinates plot (Figure 2(f)), accessed through the second tab of the indicators panel. When the user positions the mouse over a neighbourhood line, only lines of neighbourhoods belonging to the same cluster will be highlighted.


## 3.8. Severity Analysis over Time

The clustering module allows the user to perform sequential clustering ordering and analyze them with the heatmap widget (Figure 2(g)) accessed through a select button in the map widget. One can switch between the map and heatmap widgets as necessary. The user must define a partition generation frequency (i.e., weekly, monthly) and perform the procedure described in Figure3 for every period t=1,…,T (i.e., week, month) covering all the historical data considered (DG2, DG3).In the heatmap widget, one can rank neighbourhoods or features with respect to their total severity scoressN∗b and sI∗q, respectively. The user can select two ranking options: rank by more recent severity values (RRS) and rank by older severity values (ROS). RRS implies that recent severity values are more important than older severity values. In the case of ROS, older values are more important (DG4). Equation (2) computes the total severity score for b∈N.(2)sN∗b=∑t=1Twt∗sGtCUst,where b∈C, and wt is the weight of C severity at period t. When the user wants to rank according to RRS, then wt=t/∑τ=1Tτ; otherwise, when ranking according to ROS, then wt=t/∑τ=1TT+1−τ. It doesn’t matter if m is different from period to period because there is a normalizing constant Ust that scales sGtck into [0, 1].Before definingsI∗q, we introduce the severity score of an indicator q∈Q at period t in the following equation:(3)sItq=∑ck∈GVqtck∗sGtC∑ck∈GVqtck,where 0≤sItq≤mt−1. This severity score represents the weighted mean severity of clusters generated in period t, weighted by Vqt. The higher the value of sItq, the higher the mean value of q for clusters with higher severity relative to clusters with lower severity. The total severity score of an indicator q is given by the following equation:(4)sI∗q=∑t=1Twt∗sItqUst.With the total severity score, the user can analyze which indicators were most/less impacted by high-severity clusters at a certain period.


## 3.9. Use Cases

In this section, the use cases are presented through a tool developed to demonstrate the usefulness of the proposed widgets.


## 3.10. Neighbourhoods’ Characteristics Exploration and Analysis

The following use cases were performed to evaluate the exploration macro widget.


## 3.11. Time Series and Neighbourhood Characteristics

The user can choose a unique variable to study and analyze how this variable impacts the COVID-19 active cases, deaths, and ICU demands. Figure4 shows the impact of three different variables in active cases per capita. Comparing the neighbourhoods with extreme values for each of the three variables, we can observe that the higher these indicators are the higher the peaks of active cases per capita. For instance, in Figure 4(a), we can see that the neighbourhoods with a high percentage of the population working in the transformation industry sector (time series in red) have higher peaks of active cases per capita when compared to neighbourhoods of a low magnitude of this indicator (time series in blue).Figure 4
Study of the impact of different variables in active cases per capita. (a) Influence of percentage of the population working in the transformation industry sector in the active cases per capita variable. We can see that it is possible to verify the trends of a specific time series by putting the cursor over it. (b) Influence of percentage of the population living in vulnerable houses with elderly people in the active cases per capita variable. (c) Influence of education development human index in the active cases per capita variable.
(a)(b)(c)Figure4(a) also shows that we can evaluate the behaviour of active cases per capita of a specific time series by putting the mouse cursor over it. This will change the opacity of the unselected time series to reduce cluttering. This selection of specific time series is incorporated in the time series and parallel coordinate widgets of the clustering application (Figures 2(d) and 2(f)).One can also combine two variables. Figure5 shows the impact of different pairs of variables on the ICU demand. This can be done by selecting a subgroup of the first indicator, which can be a group of neighbourhoods with low or high values of this indicator, and then analyzing this subgroup using a second indicator. Figure 5(a) presents the ICU demand for the neighbourhoods with a lower probability of surviving until 60 years and evaluates the sector in which they are most representative, which is the extractive sector. Figure 5(b) compares the ICU demand for neighbourhoods with a low-quality water supply and the percentage of workers in the extractive sector. We can see that, for both analyses, the more percentage of people working in the extractive sector, the more ICU demand will be generated.Figure 5
Study of the impact of different variables on ICU demand. (a) Evaluation of ICU demand when considering the lower probability of survival until 60 years combined with the percentage of workers in the extractive sector. (b) Evaluation of ICU demand when considering the low quality of water supply and percentage of workers combined with the extractive sector.
(a)(b)


## 3.12. Scatter Plot

The scatter plot can be used to identify correlations between epidemiological and neighbourhood socioeconomic/demographic characteristics in different periods. Figure6 shows two scatter plot analyses correlating two epidemiological variables with the percentage of the population living in vulnerable houses with elderly people. In Figure 6(a), the number of deaths (in a period that concentrated a high number of new deaths) is correlated weakly with this socioeconomic variable, and in Figure 6(b), the ICU demand (in a period that concentrated a high ICU demand) is more correlated with this socioeconomic variable.Figure 6
Study of the impact of different variables on ICU demand. (a)X: percentage of the population living in vulnerable houses with elderly people and Y: deaths per capita, “18-05-2020–24-07-2020.” (b) X: percentage of the population living in vulnerable houses with elderly people and Y: ICU demand, “18-05-2020–24-07-2020.”
(a)(b)In this widget, one can also identify which neighbourhoods are more critical with respect to an epidemiological variable. Looking at Figure6(b), we can select in the scatter plot the three neighbourhoods that most generated ICU demand and identify them in the choropleth map. Finally, the duration does not change between neighbourhoods with different characteristics with a similar confirmed case sample size.


## 3.13. Clustering and Neighbourhood/Feature Ranking

The clustering macro widget is evaluated next. For the following use cases, we adopted a monthly partition generation frequency and two epidemic variables: active cases per capita and ICU demand. The initial value for the number of clusters was 3, and it was incremented if the generated partition was not satisfactory. The process presented in Figure3 was performed in each period. After a partition was generated for each period, neighbourhoods and features were ranked according to their total severity score.


## 3.14. Study of Severity According to Active Cases per Capita

This use case considers that a user wants to evaluate the most impacted neighbourhoods and indicators according to the active cases per capita epidemic variable. The parameters inserted for the cluster generation in each period are presented in Table2, where each row contains information about each period.Table 2
Parameters adopted for the cluster generation process in the active cases per capita use case.
MonthDate parametersFinal number of clustersMay06/05/2020–31/05/20203June01/06/2020–30/06/20203July01/07/2020–31/07/20203August01/08/2020–31/08/20203September01/09/2020–30/09/20203October01/10/2020–31/10/20205November01/11/2020–30/11/20203December01/12/2020–31/12/20205January01/01/2021–31/01/20213Each row contains a map coloured by clusters’ membership, the initial partition, the final partition with clusters ordered, and the barplot of an indicator with considerable difference between clusters. When the initial partition is equal to the first partition, the clustering algorithm was able to provide a correct cluster severity order.Although associated with a low demographic density, the active cases of the most severe cluster decreased until the first half of May and then increased more than other neighbourhoods at the end of May. Since this period is the initial stage of the first wave, the most severe clusters contained only one neighbourhood each.The same severe neighbourhood of May continued to be severe until the first half of June. In the barplot, we can see the same relationship in the demographic density as in May/2020. Near the first half of July, a neighbourhood with a very small population and only one individual infected had an abrupt increase in active cases per capita, but it was considered a midseverity cluster. From the barplot, we can see that the demographic density of this neighbourhood is very low.In August, a cluster that contained a small population neighbourhood was classified as a midseverity cluster. Another cluster with relatively more infected people and higher active cases per capita was classified as high severity. In the next month, although the high-severity cluster had only one neighbourhood, this neighbourhood is central and visited by people from many different neighbourhoods. Also, this neighbourhood has relatively more people sleeping in the same bedroom as shown in the barplot.The initial partition of October was not satisfactory. The initial three partitions were not very well separated, and then, a new partition with 5 clusters was generated. With 5 clusters, the ordering could be performed more clearly. As can be observed in the barplot, the mean percentage of people working in the services and commerce sectors was higher for more severe clusters.In November, the high-severity cluster had neighbourhoods that were associated with a high mean demographic density. When looking at the final month, December, the initial partition with 3 clusters was not satisfactory. With 5 clusters, the ordering could be performed more clearly. From the barplot of December, it could be observed that the mean per capita income was higher for more severe clusters.In the last month, January, a neighbourhood with a higher infected per capita at the end of the month was allocated to a high-severity cluster and the neighbourhood with a higher infected per capita until almost the first half of January was allocated to the midseverity cluster since its cases decreased. The high-severity cluster was associated with a higher percentage of workers in the commerce sector.The partitions of July, August, September, and January are wrong on purpose, to show the reader that the user must be careful when choosing the adequate number of clusters. Looking at the map of December/2020 in Figure7, we can see that many neighbourhoods are associated with high severity and suddenly become part of low-risk clusters in the next month. This happens because some neighbourhoods have relatively high “Jumps,” which produce high-severity and midseverity clusters containing only one or two members when considering a lower number of clusters. In this section, an epidemic variable with fewer unexpected neighbourhoods “Jumps” is shown.Figure 7
Clustering process for the active cases per capita use case (May/2020–Jan/2021).Health officials can make severity information available to the public by sharing the maps at the end of each period. After the sequential clustering procedure is finished, one can perform the computation of the total severity score for neighbourhoods and features, and rank them, as shown in Figure8.Figure 8
Heatmaps for the active cases per capita use case (May/2020–Jan/2021): (a) neighbourhood heatmap and (b) feature heatmap.
(a)(b)Figure8(a) shows the neighbourhood ranking after RRS and ROS are applied. When comparing the most recent and older severe neighbourhoods, it can be observed that Ilha do Leite and Apipucos were always very risky and should be given more attention than others. On the other hand, Cidade Universitária, Coelhos, and Santo Antonio were outside the RRS top 5, which shows that their severity has been reduced. In the bottom 5 for RRS and ROS, we can see that three neighbourhoods (Barro, Brejo do Beberibe, and Passarinho) were always classified as low risk in all the considered periods.The indicators’ RRS and ROS are presented in Figure8(b). When comparing the most recent and older severe top 5 and bottom 5 features, there is no variation. The top 3 features most impacted by severe clusters in all the considered periods were as follows: the percentage of workers in the commerce sector, per capita income, and percentage of workers in the services sector. Policymakers should give special attention to these sectors, which, according to this study evaluation, are highly associated with high-severity clusters. The bottom 3 (less impacted indicators) is as follows: the percentage with an inadequate water supply and sanitation, the population living in vulnerable residences with elderly people, and demographic density.


## 3.15. Study of Severity According to ICU Demand

The proposed clustering tool can also be used for specific periods. Here, we consider the study of severity related to ICU demand during the most critical period of the first wave of the pandemic in Recife, as shown in Figure9. The parameters used in the ICU demand use case are presented in Table 3. The clustering process result is shown in Figure 10.Figure 9
A critical period of the first wave to be analyzed in the ICU use case.Table 3
Parameters adopted for the cluster generation process in the ICU use case.
MonthDate parametersFinal number of clustersMay06/05/2020–31/05/20203June01/06/2020–30/06/20203July01/07/2020–31/07/20203August01/08/2020–31/08/20203Figure 10
Clustering process for the ICU demand use case (May/2020–Aug/2020).In May, it was possible to observe that the only indicator showing some difference between clusters’ characteristics is the mean demographic density. Neighbourhoods allocated to the high-severity cluster had a higher mean demographic density. In June, the only difference between the midseverity cluster and the low-severity cluster is that neighbourhoods belonging to the first continue to generate high ICU demand after the first half of June. Another variable that supported the cluster order was the per capita income since neighbourhoods in the high-severity cluster have a lower mean per capita income.In July, the high-severity cluster contained a single neighbourhood that had a higher fraction of the population working in the commerce sector relative to the mean of this indicator in the other two clusters. In August, it can be observed that the high-severity cluster is the same as in July, and although it generates a good part of the demand, it is decreasing.Figure11(a) shows that the neighbourhood ranking after RRS and ROS is applied. When comparing the most recent and older severe neighbourhoods, it can be observed that Boa Viagem, Campo Grande, Dois Unidos, and Afogados were always critical with respect to ICU, and special treatment, such COVID-19 education campaigns, must be performed in these neighbourhoods to reduce the high ICU demand. On the other hand, Jardim São Paulo had its ICU demand reduced and was outside the RRS top 5. Again, in the bottom 5 for RRS and ROS, we can see that five neighbourhoods were always classified as low ICU demand in all the considered periods.Figure 11
Heatmaps for the ICU use case (May/2020–Aug/2020): (a) neighbourhood heatmap and (b) feature heatmap.
(a)(b)The indicators’ RRS and ROS are presented in Figure11(b). The income per capita was included in the top 3 features more recently, which shows that this indicator was associated with high-severity clusters more recently. Policymakers should give special attention to the commercial sector again, which, according to this study evaluation, is highly associated with high-severity clusters with respect to ICU demand. From the bottom 3, the two less impacted indicators in all the considered periods were as follows: the population living in vulnerable residences with elderly people, and the percentage of people working in the services sector.


## 4. Discussion and Future Work

The developed widgets integrated epidemic variables with socioeconomic and demographic data, which resulted in a visual tool that consists of 2 macro widgets: explore and clustering. The explore widget consists of 3 main widgets: time series, scatter plot, and histograms, offering different exploration capabilities for the user considering the diversity of neighbourhood indicators.The COVID-19 must-have time series visualization was incremented in this work to handle the choropleth map colour inputs (values of different indicators), also allowing the combination of multiple inputs to explore and analyze their association with epidemic variables. The scatterplot was also incremented to analyze correlations between epidemic variables and neighbourhood characteristics in different periods of the pandemic. When analyzing the histogram, no difference between neighbourhoods was identified. This may be due to the low level of granularity of the studied territories (neighbourhoods).In the clustering macro widget, an ordered clustering process over a specified periodt=τ,…,τ+T can offer a way to compare the most/less affected neighbourhoods/features at the beginning and end of the period. Policymakers can use this to evaluate if measures, such as a lockdown or school closing, are effective to reduce the risk or ICU demand of all or a subset of regions. Another characteristic of the clustering widget is the capacity to compare events, such as “what were the riskiest neighbourhoods before and after the city council elections?” since maybe there were agglomerations in that period.The features can be ranked too. This can be used to evaluate what features were more associated with high-severity/low-severity clusters. This can be used by the policymaker to evaluate the impact of mitigation actions in the reduction of the epidemic variable under study in neighbourhoods with, for example, low per capita income and/or low water supply. Using this widget, one could adopt the vaccination rate as an indicator for the neighbourhoods and evaluate if it is more/less impacted by high-severity groups of neighbourhoods.In general, the clustering process occurs in the following manner:(1)
Set the number of clusters to 3(2)
If the clusters are separated/almost separated, the order can be established(3)
If the clusters could not be separated, set the number of clusters to 5(4)
If the clusters are not well separated, observe trends and analyze the socioeconomic indicators panelSummarizing the results of the clustering process for the active cases per capita use case, we can see that it was possible to separate the trends with three clusters in almost all periods. In October/2021 and December/2020, it was necessary to observe trends and observe the socioeconomic indicators panel.In October/2020, some clusters had higher active cases per capita in the second half of the period. Also, these clusters had the highest percentage of workers in the service sector, which is one of the sectors where the human contact rate is high. Thus, these clusters were classified as the most severe due to increasing active case per capita trends and the percentage of workers in the service sector. In December/2020, the high-risk clusters were those with oscillating patterns relatively higher than the other clusters.In January, due to many locations concentrated in a single cluster, it would be interesting to generate 5 clusters instead of 3 to maintain some clusters that were generated in December/2020. It was possible to see very clear trends from two clusters. The location contained in the medium-risk cluster was the one with a peak at the beginning of the January/2021 period, while the location contained in the high-risk cluster was the one with a peak at the end of the January/2021 period, indicating a new spot for COVID-19 propagation.By observing the results of the clustering process for the ICU demand, it was possible to separate all the trends with only three clusters. This shows that depending on the epidemiologic variable, there may be less or more clutter. During the clustering process, the clutter can be partially reduced by highlighting the time series with the cursor as shown in Figure4(a).Finally, the tool can be used to complement other types of dashboards, such as those concerning compartment models to forecast the pandemic spread. The model could be extended considering the neighbourhood characteristics effect when analyzing the indicator total severity ranking, multiple criteria analysis [16, 63] to better prioritize neighbourhoods, and network centrality approaches [64] to evaluate spatial propagation more precisely.Future work can involve more data sources, such as neighbourhood infrastructure, more robust ways to cluster time series, and more facts. Such facts may include: “the same variables that strongly influenced the pandemic in the first wave are the same in the second wave” or “the neighbourhoods that generated more ICU demand in the first wave are the same in the second wave.” Some increments can be made to the proposed risk assessment process. First, it is interesting to allow the user to adjust cluster elements by visualizing extra individual information about the neighbourhood’s time series in a given period.Also, the interactions can be limited to reduce the cognitive effort of the user by automating the risk assessment process with machine learning. Thus, we could use interpretable supervised/semisupervised methods, such as the one proposed by Kovalerchuk and Hayes [65]. With labelled data produced by the user in a few interactions, using a small sample of training samples, the learned model would predict the risk of each neighbourhood in multiple out-of-sample periods. In addition, we believe that the approach presented in [65] can be used to develop a way to extract a priori information for the supervised learning method, by sampling a small set of representative locations to be classified by the user.There are other solutions to reduce the clutter problem, such as the one proposed by Zhao et al. [20], where an extended fast density-based clustering approach was used to reduce the clutter of time series data in interactive exploration. This could be implemented in the future to partially reduce the clutter problem from the beginning of the ordering process. With respect to the scatter plot, an ex-post analysis could provide automated visual clues about pairs of variables that are more correlated considering the cumulative epidemic variables to provide insights about how these socioeconomic factors influence the epidemic waves.This tool was validated and tested along with other projects associated with the D.A.D.O. Project, in which several domain experts worked together to provide insights based on data for the policymakers within the city of Recife, the 9th larger city of Brazil. Among the team members, there were PhDs in several areas, such as Computer Science, Economics, Engineering, Epidemiology, and Statistics. The usability tests were conducted with team members and policymakers. The main objective of the D.A.D.O. Project was to mitigate the impact of the pandemic on the public health system and the economy of Recife.The feedback from the usability tests was positive concerning the usefulness and easiness of the tool. In general, one functionality that was appreciated the most was the possibility of reducing the clutter of the time series through interaction with an expert.Another important feature mentioned was the capability of this tool in providing rankings concerning the risk of a location over time. This feature enabled us to investigate with other tools developed under the project what actions could be taken depending on the situation of a neighbourhood. This could help in developing public health policies to allocate resources more efficiently. Other important feedback included enhancing the way to perceive trends during the clustering process, by considering other data, such as mobility. Thus, it would be interesting to incorporate mobility data to understand if there are high-risk clusters highly connected with low-risk clusters. This can complement the clustering process since the mobility connection among clusters enables exchanging people between high-risk clusters and low-risk clusters, which may convert a low-risk cluster into a medium or high-risk cluster, depending on the connection degree.Thus, one direction for future work is to include mobility information to perform other types of analysis. The authors of the present work recently developed a risk analysis in multiple locations combining COVID-19 infection data with mobility data [16]. Thus, it is possible to incorporate this kind of data into this tool and to extend the analysis, based on the data analysis and results obtained in [16].


## 5. Conclusions

A visual analytics tool was developed to evaluate the proposed widgets for data visualization and analysis of the COVID-19 pandemic in Recife. The tool is constituted by two macro widgets: exploration and clustering. The visualization and analysis provided by this tool combine data from different sources. In the exploration macro widget, the analysis is interactive, allowing the user to find time series clusters and investigate different correlations between epidemiological and socioeconomic/demographic data in a specific period of the sample.The other macro widget contained in the tool helps the user to sort neighbourhoods into severity levels very fast and also classifies neighbourhood features according to the mean value of the feature in each group. In the end, the user can rank the neighbourhood and features according to the severity level associated with them in each period. The inputs for the clustering process are the initial and the ending date of the analysis, the series to be analyzed, and the number of clusters to be generated.The developed visualization tool is suitable for performing advanced analysis and investigating how the proposed widgets can contribute to the study of how socioeconomic/demographic aspects can impact the propagation of COVID-19 in different neighbourhoods. This may be useful for health officials to prioritize actions in a subset of neighbourhoods in certain periods and to consider the pandemic dynamics in each geolocation given socioeconomic and demographic data in compartment models.



---

*Source: 9524753-2023-02-20.xml*