{'fraction_non_alphanumeric': 0.03872361904161015, 'fraction_numerical': 0.013186535852866022, 'mean_word_length': 4.0882022471910116, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
ANALYSIS OF SPATIOTEMPORAL ANOMALIES USING PERSISTENT HOMOLOGY: CASE STUDIES WITH COVID-19 DATA

We develop a method for analyzing spatiotemporal anomalies in geospatial data using topological data analysis (TDA). To do this, we use persistent homology (PH), a tool from TDA that allows one to algorithmically detect geometric voids in a data set and quantify the persistence of these voids. We construct an efficient filtered simplicial complex (FSC) such that the voids in our FSC are in one-to-one correspondence with the anomalies. Our approach goes beyond simply identifying anomalies; it also encodes information about the relationships between anomalies. We use vineyards, which one can interpret as time-varying persistence diagrams (an approach for visualizing PH), to track how the locations of the anomalies change over time. We conduct two case studies using spatially heterogeneous COVID-19 data. First, we examine vaccination rates in New York City by zip code. Second, we study a year-long data set of COVID-19 case rates in neighborhoods in the city of Los Angeles.

1. Introduction. Many systems are spatial in nature. When working with spatial data sets, it is important to study the role of underlying spatial relationships [11]. To illustrate this importance, consider the spatiotemporal dynamics of Coronavirus disease 2019 (COVID-19) case rates, which is one of the key motivations for our work. The spatial adjacencies between the neighborhoods of a city affect these dynamics, and it is important to account for them. Researchers have studied a wide variety of spatial data sets, such as gross domestic product (GDP) and life expectancy by country [3,40] and voting in elections across different regions of a state [17]. Such data sets often also include temporal information (e.g., daily COVID-19 case rates), and it is also important to take this into account.
We develop new methods for using topological data analysis (TDA) to analyze geospatial (i.e., geographical) and geospatiotemporal data sets in a way that directly incorporates spatial information. TDA is a way of studying the "shape" of a data set [6]. Using persistent homology (PH), a tool from algebraic topology, allows one to find geometric voids of different dimensions in a data set and to quantify the "persistence" of these voids [30]. Zero-dimensional (0D) voids are connected components, and one-dimensional (1D) voids are holes; such voids are particularly important in two-dimensional (2D) spatial data. To quantify the persistence of holes and other voids, one constructs a simplicial complex (a combinatorial description of a topological space) and a filtration function (see Section 2.1). In our work, we treat the geographical data as 2D data and construct a 2D filtered simplicial complex to represent it. PH has yielded insights into a wide variety of areas, such as dynamical systems [1,24,38,42,45], neuroscience [18,33], materials science [5], and chemistry [25]. Spatial applications that have been examined as 2D data sets include sensor networks [14], percolation, [35], and city-street networks and other complex systems [16].
In our consideration of time-dependent data, we use vineyards, which were introduced in [13] as a way of representing time-varying PH, to incorporate temporal information. One can visualize a vineyard as a continuous stack of persistence diagrams (PDs), with one PD for each time point. The PH features trace out curves, which are called vines, in R 3 . See Section 2.2 for the definition of a vineyard.
In our approach, the voids that PH identifies correspond to local extrema of realvalued geospatial data. Our approach captures both local information (specifically, the locations and values of the local extrema) and global information about the relationships between the extrema, such as the extent to which extrema are spatially separated. The vineyards allow us to measure the persistence of the extrema over time and to track how the locations of the extrema change over time. We are thus able to track how the spatial structure of the data changes over time.
One of the contributions of our paper is a method for constructing an efficient simplicial complex that is homeomorphic to a geographical space (the set of regions, as we will explain shortly). It is important to attempt to minimize the number of simplices in a simplicial complex because PH and vineyard computation times are very sensitive to the number of simplices. More precisely, we construct a 2D simplicial complex that comes with a natural mapping from the set of 2D simplices to the geographical regions. In our construction, the union of any subset of geographical regions is homeomorphic to the subsimplicial complex (see Section 3 for the definition of a subsimplicial complex) that is induced by the union of the corresponding simplices. When every geographical region is simply connected, our construction uses the minimal number of simplices that a simplicial complex with the property above can have. We believe that our construction is also minimal in more general cases, but we do not prove this. Other methods of producing simplicial complexes from geospatial data, such as rasterization of a shapefile or by treating the regions as a point cloud, require a trade-off between the number of simplices and the accuracy of the representation of the geographical regions. For example, the level-set-based PH method of [17] uses orders-of-magnitude more simplices to achieve sufficient resolution of the smallest geographical regions (e.g., densely populated urban centers that are important to analyze). See Section 7 for further discussion.
Our method addresses several limitations of previous efforts to combine TDA with geospatial analysis. In [37], Stolz et. al. studied the percentage of United Kingdom voters by district that voted to leave the European Union in the so-called "Brexit" referendum. The holes that they identified using PH corresponded to districts that voted differently than the surrounding districts. However, the approach in [37] did not distinguish between PH classes that were merely noise and PH classes that corresponded to small geographical districts. In [17], Feng and Porter developed an approach for studying PH in which they constructed filtered simplicial complexes using the level-set method of front propagation [29]. Using their level-set complexes, they examined the percentage of voters in each precinct of California counties that voted for a given candidate (e.g., Hillary Clinton) in the 2016 presidential election. The PH features represented precincts that voted more heavily for Clinton than the surrounding precincts (e.g., "islands of blue in a sea of red"). The level-set complexes in [17] have two key limitations. The first is that they cannot handle time-dependent data, as they are built to study data at a single point in time or data that has been aggregated over some time window to yield time-independent data. The second limitation is that they reduce real-valued data (e.g., the percentage of voters who voted for Clinton) to binary data (e.g., whether or not the majority voted for Clinton). Consequently, in this example, the level-set-based PH does not capture the extent to which a blue "political island" voted more heavily for Clinton. By contrast, our approach is designed specifically to capture such information. As a trade-off, we no longer capture the geographical sizes of the political islands. See Feng, Hickok, and Porter [15], who applied the level-set filtration to study one of the COVID-19 data sets that we also study in the present paper, for further discussion.
Our new approach for computing PH is also able to resolve some other technical issues in [17]. In particular, some of the PH features in the level-set approach from [17] are geographical artifacts that are indistinguishable from true features of a data set. In our method, by contrast, the finite 1D PH features have either a one-toone correspondence with the local maxima of the real-valued geospatial function or a one-to-one correspondence with the local minima, depending on the choices that one makes. Additionally, unlike the level-set approach in [17], we are able to detect extrema that are adjacent to the boundary of the geographical space.
As case studies, we apply our method to two data sets. The first data set is a geospatial data set of per capita vaccination rates in New York City (NYC) by zip code. The PH features identify zip codes in which the vaccination rate is either lower or higher (depending on choices that one can make in our approach) than in the surrounding zip codes. The second data set consists of 14-day mean per capita COVID-19 case rates in neighborhoods in the city of Los Angeles (LA) in the time period 25 April 2020-25 April 2021. Modeling the spatiotemporal spread of COVID-19 is a complex task [2,44]. In this geospatiotemporal data set, the PH features of our approach identify COVID-19 anomalies, which are regions whose case rates are higher than in the surrounding regions. 1 It is important to examine such anomalies, as COVID-19 spreads with significant spatial heterogeneity and thus has heterogeneous effects on different areas. 2 Many factors (such as mobility, population density, socioeconomic differences, and racial demographics) play a role in how COVID-19 affects regions differently [9,19,20]. In our case study of COVID-19 case rates in LA, we construct a vineyard that (1) identifies which anomalies are most persistent in time and (2) reveals how the anomalies move geographically over time.
Our paper proceeds as follows. In Section 2, we review relevant topological background. In Section 3, we formulate how we construct simplicial complexes. In Section 4, we define several filtration functions and discuss how to interpret the resulting PDs and vineyards. In Section 5, we apply our method to the LA and NYC data sets. In Section 6, we discuss our choices in our methodology. In Section 7, we summarize our work and discuss some of its implications. In Appendix A, we discuss technical details of the simplicial complex-construction. In Appendix B, we discuss alternative topological approaches for studying PH in geospatiotemporal data. Our code is available at https://bitbucket.org/ahickok/vineyard/src/main/.
2. Background. 1 We examine local maxima in the case-rate data. This contrasts to COVID-19 "hotspots," which the CDC has defined using an absolute threshold for the number of cases and criteria that are related to the temporal increase in the number of cases [10]. 2 Other scholars have studied contagions using TDA in ways that do not yield topological features with geographical meaning. For example, recent work has used TDA to study the spatiotemporal spread of COVID-19 [32] and Zika [34]. These papers studied topological features in atmospheric data, which were then used to forecast case rates. TDA was also used in [39] to analyze the Watts threshold model of a social contagion on noisy geometric networks.  2.1. Persistent Homology (PH). We briefly review persistent homology (PH). See [30] for a more thorough introduction. To start, let K be a simplicial complex. A filtration function (or simply a filtration) f : K → R is a function such that if the simplex τ ∈ K is a face of σ ∈ K, then f (τ ) ≤ f (σ). The pair (K, f ) is a filtered simplicial complex (FSC). Let K α := {σ ∈ K | f (σ) ≤ α} be the α-sublevel simplicial complex, and let {α 0 , . . . , α n } be the image of f . The sequence K α0 ⊆ · · · ⊆ K αn is a nested sequence of simplicial complexes. See Figure 1 for an example of an FSC.
We compute the homology of each K αi over a field F, which we set to Z/2Z in the present paper. Homology classes represent connected components, holes, and higherdimensional voids in a simplicial complex. The inclusion K αi − → K αi+1 induces a map ι i : H * (K αi , F) → H * (K αi+1 , F) from the homology of K αi over F to the homology of K αi+1 over F. The persistent homology (PH) of the filtered simplicial complex is the where the action of x is given by the maps {ι i }; that is, if γ is a homology class in H(K αi , F), then xγ = ι i (γ). We say that a PH class γ is born at filtration level α i if α i is the earliest filtration level at which γ exists. More precisely, γ ∈ H * (K αi , F) is born at α i if x j γ is not equivalent to γ for all j and γ ∈ H * (K αi−j , F). We say that the PH class γ dies at filtration level α j if j is the minimum index such that x j−i γ = 0. Not every class dies; we refer to classes that do die as finite and classes that do not die as infinite.
The Fundamental Theorem of Persistent Homology yields a set of generators for a given persistence module. According to it, the persistence module is isomorphic to An (x ai ) summand corresponds to a PH class that is born at filtration a i and never dies. An (x bj )/(x cj ) summand corresponds to a PH class that is born at filtration b j and dies at filtration c j . Each generator has a birth simplex σ b that creates the homological class and (if finite) a death simplex σ d that destroys the homological class. For example, in Figure 1, there is one 1D PH generator. Its birth simplex is the edge (0, 3) because this is the edge that completes the loop that encircles the hole, and its death simplex is the triangle (0, 2, 3) because this is the triangle that fills in the hole. The birth filtration level of the PH class is f (σ b ), and the death filtration level (if finite) is f (σ d ).
A persistence diagram (PD) is a way of representing PH as a multiset of points in R×(R {∞}). Each point represents a PH class; the point's coordinates are the class's birth and death filtration levels. Given a decomposition of the persistence module of the form Eq. 2.1, the PD includes the points (a i , ∞) for all i, the points (b j , c j ) for all j, and all points on the diagonal. One includes the points on the diagonal for  [22]. technical reasons; one can think of them as PH classes that die instantaneously upon birth. See Figure 2 for an example of a PD.

Vineyards.
Vineyards are a tool for computing time-varying PH [22]. A time-dependent filtration function on a simplicial complex K is a function f : [t 0 , T ] × K → R such that f (t, ·) is a filtration for all t and (K, f (t, ·)) is a filtered simplicial complex for all t. We compute the PH of (K, f (t, ·)) for all times t. We visualize the vineyard in R 2 × [t 0 , T ] as a continuous stack of PDs (see Figure 3). The points in the PDs trace out curves over time; these curves are the vines. Each vine corresponds to a PH class; a vine is the graph of the birth and death filtration levels of a particular PH class over time. The PH class that is represented by a vine has a time-dependent birth simplex σ b (t) and (if finite) a time-dependent death simplex σ d (t). At time t, the homology class is created by the simplex σ b (t) at filtration level f (t, σ b (t)) and destroyed by the simplex σ d (t) at filtration level f (t, σ d (t)) (if finite). The functions σ b (t) and σ d (t) are piecewise constant. We measure the overall persistence of a vine by calculating Cohen-Steiner et al. [13] developed an algorithm for computing vineyards when they first introduced the concept. One computes the initial PH at time t = t 0 , and one then updates the pairings of birth and death simplices as the order of the simplices (as induced by f (t, ·)) changes over time. Each change in the order of the simplices occurs one transposition at a time. One can make these updates in O(n) time (where n is the number of simplices) per transposition of simplices.
3. Constructing a Simplicial Complex. We now show how we construct a simplicial complex K from geographical data (e.g., a shapefile that specifies geographical boundaries). We partition the geographical space into regions. In Section 5.1, the regions are zip codes in NYC; in Section 5.2, the regions are neighborhoods in the city of LA. Let S be the set of regions. We refer to the complement of R∈S R as the exterior region. Given the geographical boundaries of such a set S, we construct a 2D simplicial complex K with the following property: (P) There is an assignment of 2D simplices to regions such that the union of any subset of regions is homeomorphic to the subsimplicial complex that is  induced by the union of the corresponding 2D simplices. The subsimplicial complex that is induced by a set E ⊆ K is the smallest simplicial complex K that contains the set E of simplices. That is, if K is a simplicial complex that contains S, then K ⊆ K . When K is 1D, a subsimplicial complex is equivalent to an induced subgraph. In Figure 4, we present an example of our construction.
When every geographical region R is simply connected, our simplicial complex has the minimal number of simplices that is possible for a simplicial complex with property (P). We believe that our construction is minimal in more general cases (specifically, under the assumptions (A1)-(A5) that we define shortly). Constructing an efficient simplicial complex is important because the run time of TDA computations is very sensitive to the number of simplices.
We make the following (mild) assumptions about geographical regions: (A1) There are a finite number of regions, and each region has a finite number of connected components. Each component of the intersection is homeomorphic to a point, a closed interval in R, or S 1 . (A5) The intersection between three or more regions is either a point or ∅.
These conditions are very reasonable for human-made geographical boundaries. We do not even require the regions to be simply connected or for the region intersections to be connected. In Figure 4a, we illustrate the most typical situation that we encounter. In this example, LA neighborhood Granada Hills is homeomorphic to a disc and its intersection with each of its neighbors is homeomorphic to a closed interval in R. In Figures 5 and 6a, we illustrate a few of the other possible configurations that arise in geospatial applications. In our case studies, the geographical data take the form of shapefiles. In a shapefile, each region is represented by a polygon (or by multiple polygons, if the region is disconnected). If the interiors of the polygons do not intersect, then conditions (A1)-(A5) are satisfied. In practice, the polygon boundaries are not always aligned perfectly and thus may overlap slightly, but we can still approximate a given set of regions by a set of regions that do satisfy (A1)-(A5). In our data, the only assumption that does not always hold is (A3); for example, see Figure 11a for a violation of (A3) in the NYC data set. However, by making a few modifications, we are still able to construct a simplicial complex with property (P) for this data data. One can make analogous modifications for similar data sets. We discuss this in more detail in Section 5.1.
To build a simplicial complex from our geographical data, we proceed as follows. First, we construct a 2D simplicial complex K R for each region R. We then glue their boundaries together in a way that respects the geographical region boundaries. In Figure 4, we show an example of this procedure. For each of the five regions in the example, we construct a simplicial complex that consists of a few triangles. We then glue five simplicial complexes together along their boundaries to obtain a simplicial complex K with property (P). We assign a 2D simplex σ ∈ K to the region R whose simplicial complex K R originally contained σ. In the remainder of this section, we discuss the details of this process. Under the geographical assumptions (A1)-(A5), the intersections of a region R with its neighbors are such that for each component of the region's boundary, one can order the neighbors in clockwise (or counterclockwise) fashion, possibly with repetition 3 . We list intersections with the exterior region in the same manner as for any other neighboring region. We also record whether each intersection is 1D or 0D. For example, in Figure  Given a sequence of neighbors for each boundary component of each region (which, if necessary, we adjust as in Appendix A.1), we construct a 2D simplicial complex K R for each region using Algorithm A.1. In Figure 7, we illustrate examples of the resulting simplicial complexes. Without loss of generality, we assume that each region is connected; if not, we treat each component of a region as if it were its own unique region. To region R, we assign a simplicial complex K R such that the ith boundary component of K R is a cycle that has one edge for each neighbor N such that R ∩ N is 1D. For example, Granada Hills (see Figure 4) is assigned the simplicial complex in Figure 7a. We annotate each edge of the boundary with the neighbor that corresponds to it. We also annotate each vertex with the sequence of its adjacent regions, which we list in clockwise order starting with R.
We then glue the simplicial complexes {K R | R ∈ S} along their edges according to their edge and vertex annotations. More precisely, if K R1 has n disjoint edges with the annotation R 2 (which is the typical situation when R 1 ∩R 2 has n components that are 1D), then K R2 has exactly n disjoint edges with the annotation R 1 . Let (u, v), with u and v in clockwise order, be the vertices of an edge in K R1 with annotation R 2 . Because the n edges are disjoint, u and v must have at least 3 neighbors (including R 1 ). We seek an edge (x, y) (with x and y in clockwise order) in K R2 with the annotation R 1 such that (1) u and y are annotated with the same sequences and (2) v and x are annotated with the same sequences. We know that there must be at least one such edge because (u, v) represents a component of R 1 ∩ R 2 and there is some edge in K R2 that represents the same component (and thus its vertices have the same sequences of adjacent regions as u and v). In Appendix A.3, we prove that there is a unique such edge. In Figure 6, we show an example of this case. If there are n > 1 consecutive edges e 0 , . . . , e n−1 on the boundary of K R1 with annotation R 2 , then there are n consecutive edges e 0 , ..., e n−1 on the boundary of K R2 with annotation R 1 . This situation arises precisely because of the adjustments we discuss in Appendix A.1. We glue e i to e n−i for all i. If R 1 ∩ R 2 is homeomorphic to S 1 , then the choice of e 1 as the first edge in K R2 is not unique, but all choices result in topologically equivalent spaces. The result of this gluing process is a topological space with property (P). Code for our simplicial-complex algorithm is available at https://bitbucket.org/ ahickok/vineyard/src/main/. This code has one limitation that the algorithm in the present paper does not: It requires that no interior region (i.e., a region that is contained within the outer boundary of another region) intersects any other interior region. This does not occur in our data, and we believe that it does not occur in most geographical spaces.

Our Filtration Functions.
We define various filtrations that one can use with the simplicial complex K that we constructed in Section 3, and we discuss how to interpret the resulting PDs and vineyards. Let S be the set of geographical regions R that the simplicial complex K represents, and let F : S → R be a real-valued function on S. For example, in Section 5.1, F (R) is the per capita full vaccination rate (i.e., having received all required doses of some vaccine) for COVID-19 in NYC zip code R. In Sections 4.1 and 4.2, we define two filtration functions that are induced by F . Given a time-dependent and real-valued function F (t, R), we define time-dependent filtration functions in Section 4.3. For example, in Section 5.2, F (t, R) is the 14-day mean per capita COVID-19 case rate in neighborhood R on day t. From a timedependent filtration function, we compute a vineyard.

The Sublevel Filtration.
In this subsection, we define a sublevel filtration. In our applications, we use the 1D PH of the sublevel filtration to analyze local maxima in our data sets. We illustrate the idea of a sublevel filtration in Figure 8.
Definition 4.1 (Sublevel Filtration). Let K be a simplicial complex from the construction in Section 3 for a set S of regions, and let g be the assignment of 2D simplices to regions. Let F : S → R. We define the sublevel filtration function f by considering the sublevel sets of F . On the 2D simplices, we define the filtration function by We extend the filtration function to the remaining simplices by setting Fig. 8: In panels (a)-(e), we show the α-sublevel sets for increasing α of a function f : R 2 → R that has two well-separated local maxima. In (a), where α is smallest, there is one hole that corresponds to the global maximum. In (b), a second hole appears; it corresponds to the other local maximum. In (d), the second hole is filled in. In (e), the first hole is filled in. In panels (f)-(j), we show the α-sublevel sets for increasing α of a function g : R 2 → R whose two local maxima have the same locations and values as f , but are less separated from each other. Consequently, the second hole does not appear until the sublevel set in panel (h). In all panels, the jagged edges are artifacts of the way that the Python package matplotlib plots surfaces.
if σ is a vertex or edge on the boundary of K and by setting otherwise, where ∂σ denotes the boundary ofσ.
At filtration level α, the simplicial complex K α is the subsimplicial complex of K that is induced by the union of the set of 2D simplices σ such that F (g(σ)) ≤ α and the set of vertices and edges that are on the boundary of K (that is, the set of vertices and edges that represent intersections of the regions in S with the exterior region). (Henceforth, we say that such simplices are "exterior-adjacent".) By construction, K α is homeomorphic to the union of regions R such that F (R) ≤ α along with the exterior boundary. We set f (σ) = min R F (R) for exterior-adjacent vertices and edges σ for technical reasons that we will explain in a few paragraphs. In Appendix B.2, we explore an alternative definition in which we set the filtration values of exterioradjacent vertices and edges σ to The 1D PH of the sublevel filtration encodes information about the structure of the local maxima of F . A region R is a local maximum if the value of F (R) is larger than the value of F (N ) for all neighboring regions N of R for which N ∩ R is 1D. If R is a local maximum, there is a 1D PH class whose death simplex is one the simplices in the preimage g −1 (R). The class dies at filtration level α = F (R). For example, if F (R) is the COVID-19 case rate in region R, then 1D PH classes correspond to COVID-19 anomalies and the death simplex of a 1D PH class is the epicenter of that anomaly. The larger the value of F (R) in comparison to the surrounding regions (including regions that are nearby but not necessarily immediate neighbors), the more persistent the PH class is. If the union of all regions (excluding the exterior region) is not simply connected, then there is at least one 1D PH class with an infinite death time. See Figure 10b for an example. The infinite 1D PH classes correspond to the holes in the geographical space, rather than to local maxima. The local maxima of F are in one-to-one correspondence with the set of 1D PH classes with finite death times. There is a canonical mapping from finite 1D PH classes to regions. A class that is represented by simplex pair (σ b , σ d ) is mapped to the region g(σ d ) that contains σ d . The region g(σ d ) is the location of the local maximum of F that corresponds to the PH class, and the death simplex's filtration value f (σ d ) is the value of the local maximum. The death simplices of the finite 1D PH classes and their filtration values give the local-maximum locations R and their function values F (R).
The 1D PH does more than simply identify local maxima and their locations; it also reveals information about their relationships to each other. If the local maxima are well-separated from one another, then the corresponding PH classes all have early birth times. In the NYC data set, for example, there are several connected components and one can think of the global maxima of each connected component as "totally separated" from each other because they are on different connected components. The corresponding 1D PH classes are all born at the earliest possible filtration time, which is min R F (R) (see Figure 12a). We show an example of well-separated local maxima in Figure 8e. By contrast, the two local maxima in Figure 8j are not well-separated, so the PH class that corresponds to the lower peak in Figure 8j is born at a higher filtration value than the PH class in Figure 8e. The birth times of the 1D PH classes reflect structural information about the local maxima.
We set the filtration value of exterior-adjacent vertices and edges to min R F (R) so that 1D PH can detect local maxima on the boundary of a geographical space. This is important for the LA data set of COVID-19 case rates. In Figure 17, we observe that many of the most persistent COVID-19 anomalies are on the boundary of the geographical space, and it is crucial that we are able to detect them. If we had not made this adjustment, the filtration value of exterior-adjacent vertices and edges σ would be the value of F (R), where R is the unique region that is adjacent to σ. If R is a local maximum, its corresponding 1D PH class would be born and die at filtration level α = F (R). In the PD, it would then appear as a point on the diagonal. Therefore, for 1D PH to detect local maxima on the boundary of a geographical space, we must adjust the filtration values of exterior-adjacent vertices and edges.
The 0D PH classes correspond to local minima of F . However, unlike for the 1D PH classes, there is not a natural mapping from 1D PH classes to the locations of the minima. In Appendix B.1, we discuss the interpretation and computation of 0D PH classes in more detail.

The Superlevel
Filtration. An alternative to using the sublevel filtration from Section 4.1 is to instead consider superlevel sets of F and use them to construct a superlevel filtration. In our case studies, we use the superlevel filtration to analyze local minima in our data sets. We illustrate the idea of the superlevel filtration in Figure 9.  At filtration level −α, the simplicial complex K −α is the subsimplicial complex of K that is induced by the union of the set of 2D simplices σ for which F (g(σ)) ≥ α. By construction, K −α is homeomorphic to the union of regions R for which F (R) ≥ α. Local maxima of F now correspond to 0D PH classes, and local minima of F now correspond to 1D PH classes; this is the opposite situation from the sublevel filtration. Our discussion of local maxima for the sublevel filtration in Section 4.1 applies to local minima for the superlevel filtration, and our discussion of local minima for the sublevel filtration in Section 4.1 applies to local maxima for the superlevel filtration. The only difference is that the filtration values in the superlevel filtration are the additive inverses of the function values of F . This implies, for example, that the death filtration value of a 1D PH class that corresponds to a local minimum at region R is α = −F (R), rather than α = F (R).

A Time-Dependent Filtration.
Suppose that we have a time-dependent, real-valued function F (t, R) whose domain is {t 0 , t 1 , . . . , t n } × S, where t 0 ∈ R is the initial time and t n ∈ R is the final time. For example, in Section 5.2, the value of F (t, R) is the 14-day mean per capita COVID-19 case rate in Los Angeles on day t. We seek to analyze the structure of local extrema as they change over time. . . , t n }, we define the time-dependent filtration function f (t, ·) to be the sublevel filtration that is induced by F (t, ·). To extend this filtration function to the entire interval [t 0 , t n ], we linearly interpolate.
In the present paper, we only use the time-dependent sublevel filtration, but one can analogously define a time-dependent superlevel filtration. We have implemented both of these filtrations in our code.
We use a time-dependent sublevel filtration to construct a vineyard. This allows us to track how the extrema move in both space and time. As in Section 4.1, each finite vine corresponds to a local maximum whose location at time t is given by the region g(σ d (t)) that contains the vine's time-dependent death simplex σ d (t). The length of a vine corresponds to its persistence in time.

Case Studies.
We now apply our methods to two data sets, which we visualize in Figure 10.   two filtrations that we defined in Section 4. The geographical boundaries of the zip codes are given by a shapefile [27]. New York City zip codes do not satisfy assumption (A3) because some of the zip-code boundaries have a component that is homeomorphic to two circles that are glued at a point (i.e., a figure-8). For an example, see Figure 11a. We construct a simplicial complex K in a way that is similar to the construction in Section 3; everything is the same except for some minor modifications to the way that we construct the simplicial complexes K R for zip codes R with figure-8 boundaries. In Figure 11b, we show how one constructs a simplicial complex K R for such a region. Our construction still has property (P). The data set, which we obtained from the NYC Department of Health & Mental Hygiene website [12], consists of the number of fully vaccinated people in each zip code populations are combined [28]. We henceforth refer to modified zip codes as simply "zip codes".  , that has (a) a higher vaccination rate than its neighboring zip codes or (b) a lower vaccination rate than its neighboring zip codes. on 23 February 2021 5 . For each zip code, we divide this number by its population estimate in [12] to obtain a per capita vaccination rate. For zip code R, we define F (R) to be the per capita full vaccination rate in R on 23 February 2021. We do not possess the daily vaccination-rate data that is necessary to compute a vineyard, so instead we calculate the PH of K with the sublevel and superlevel filtrations from Sections 4.1 and 4.2. We show the resulting PDs for the 1D PH in Figure 12. As we described in Section 4.1, the points in the sublevel-filtration PD correspond to zip codes in which vaccination rates are higher than in the surrounding zip codes. The death filtration level of a PH class is the vaccination rate in that zip code, and the birth filtration level of a PH class reflects the extent of spatial isolation of that zip code from other local maxima; an earlier birth filtration implies more spatial isolation. Similarly, the points in the superlevel filtration PD correspond to zip codes in which the vaccination rate is lower than in surrounding areas. As we discussed in Section 4.1, we obtain the zip code of a PH class from its death simplex σ d . We color all points in the PDs by the borough of the corresponding zip code.
An issue arises from the fact that several of the NYC zip codes are isolated islands. These islands are trivial extrema because they are not adjacent to any other zip codes. One may want to exclude these trivial extrema from the PD. In Appendix B.2, we propose alternative methods for handling disconnected geographical spaces such as NYC.
One can use the PDs in Figure 12 to study inequities in vaccine access. For example, it seems potentially desirable to discern patterns in demographic data that correspond to the most persistent points in the PDs.

COVID-19 Infections in the City of Los Angeles.
We now examine COVID-19 case rates in neighborhoods of the city of Los Angeles (LA) 6 . The geographical boundaries of the neighborhoods are given by a shapefile [23]. From this, we construct a simplicial complex K in the manner that we described in Section 3. We also know the number of cases in each neighborhood from 25 April 2020 through 25 April 2021. For each neighborhood, we divide the case count by the neighborhood population to obtain per capita case rates, and we calculate a running 14-day mean 7 on each day to smooth the data. For neighborhood R and time t ∈ {0, . . . , 365}, we define F (t, R) to be the 14-day mean per capita case rate in R on day t after 25 April 2020. We compute the vineyard for a simplicial complex K using the time-dependent sublevel filtration that is induced by F (t, R). We show our vineyard in Figure 13, and we show subsets of this vineyard in Figures 15 and 18.
The vines in the vineyard correspond to COVID-19 anomalies, which we define to be neighborhoods that have a higher running 14-day mean COVID-19 case rate than the surrounding neighborhoods for at least one day. Anomalies that are more spatially isolated yield vines with early birth-filtration levels, and anomalies with high case rates yield vines with late death-filtration levels. See Section 4.1 for a more detailed discussion. We color each vine according to the geographical location(s) of its anomaly. As we discussed in Section 4.3, we obtain the anomaly location(s) from the time-dependent death simplex σ d (t) of a vine. The function σ d (t) is a piecewiseconstant function; as it changes, so does the location of the associated anomaly. Therefore, the color of a vine can change over time. For example, consider Figure 15, where we show the five most-persistent vines. The global maximum of the data set is initially in Little Armenia, but it moves to Vermont Square at about t = 220. In the vineyard, we see this from the vine that is initially blue (for Little Armenia) from time t = 0 until about t = 220 and then orange (for Vermont Square) starting from about time t = 220 through time t = 365. There are also other vines whose locations change over time. Such geographical location changes do not need to be adjacent, but they often are near each other. In Figure 17, we highlight these anomalies on a map.
A vineyard encodes the temporal persistence of anomalies. The length of time that a vine is not on the diagonal plane of a vineyard, which we henceforth call the "length" of a vine, is the amount of time that an anomaly exists. At the beginning of the COVID-19 pandemic, all neighborhoods had low per capita case rates. We expect emerging anomalies to have a low case rate for a long time and then for the case rate to grow rapidly starting at some later time. An emerging anomaly in the "low case rate" phase yields a vine that is close to the diagonal for a long time. By examining the lengths of vines, we hypothesize that one can distinguish between very concerning emerging anomalies (i.e., those that may become major COVID-19 anomalies in the future) and anomalies of lesser concern, even when the anomalies have similar case rates.
In Figure 18, we show case rates early in the time period that we track by computing the vineyard for the period 25 April 2020-25 May 2020. The COVID-19 pandemic was declared a national emergency on 13 March 2020 [43], and the city of LA closed its public schools and ordered the closure of restaurants, bars, and gyms on on 16 March 2020 [21]. In our vineyard, we exclude the twenty most-persistent vines to   more easily visualize the vines that are close to the diagonal plane. Many of these latter vines are short, so their associated anomalies are short-lived. The longer vines are anomalies that are longer-lived and thus of greater concern in the long run, even though they are close to the diagonal during the period 25 April 2020-25 May 2020. For example, there is an anomaly at Wilmington that we show with the light-blue vine. This vine is close to the diagonal plane, but it has high temporal persistence during the period 25 April 2020-25 May 2020. In Figure 15, we see that Wilmington eventually becomes one of the worst hotspots of COVID-19 case rates in LA.
6. Discussion. In our approach, we needed to make a variety of choices. There are other ways to construct a simplicial complex to represent a geographical space. There are also other choices in topological tools for analyzing time-varying data. We briefly discuss some of these possibilities in the next several paragraphs.
Rasterization is an alternative method for constructing a simplicial complex from shapefile data. When one rasterizes a shapefile, one can transform the resulting image into a simplicial complex by imposing the pixels of the image onto a triangulation of the plane. However, our approach has several key advantages over rasterization. First, the number of simplices in the simplicial complex that one obtains by rasterizing a shapefile is orders-of-magnitude larger than the number of simplices in our construction. Computing the PH of a simplicial complex with fewer simplices allows significantly faster computations. Second, the simplicial complex that one obtains by rasterization has no guarantee of "topological correctness", as property (P) may not hold. The extent to which the resulting simplicial complex is topologically correct depends on the resolution of the rasterization, and using a higher resolution requires more simplices. Our construction of simplicial complexes also yields a natural way to map a 2D simplex to the geographical region that contains it. We use this preservation of geographical information to find the locations of the local extrema. Lastly, our construction allows us to detect anomalies on the boundary of a geographical space.
Our construction uses direct geographical adjacencies, but one may instead wish to employ "effective" distances between regions. One can calculate effective distances    using mobility and transportation data. Two regions that are closely connected via transportation are effectively closer than they are based on direct geographical considerations; this affects phenomena such as the dynamics of infectious diseases [4,31].
We used only 1D PH to study extrema, but one can alternatively use 0D PH if one is not interested in the geographic locations of the extrema; we discuss this in Appendix B.1. In Appendix B.2, we discuss alternative filtrations that one can apply to geographical spaces (such as NYC) that are disconnected. We used a timedependent function on a geographical space to compute vineyards, but an alternative is to use an approach that is based on multiparameter zigzag PH. We discuss this in Appendix B.4. When the time-dependent function F (·, R) is monotonic for all regions R, one can also use an approach that is based on multiparameter PH (i.e., without needing to invoke zigzag PH); we discuss this in Appendix B.3. However, both multiparameter PH and multiparameter zigzag PH are difficult to visualize, and they both suffer from a lack of easily interpretable invariants. Consequently, we only computed vineyards in our applications.

Conclusions.
We developed methods to directly incorporate spatial structure into applications of topological data analysis (and, specifically, of persistent homology) to geospatiotemporal and geospatial data. We defined a way to construct  Fig. 18: Vineyard for the LA simplicial complex with a sublevel filtration from 14day mean per capita case rate during the period 25 April 2020-25 May 2020. We exclude the 20 most-persistent vines to more easily see the vines near the diagonal plane. Each vine represents a COVID-19 anomaly; we color each vine according to the geographical location(s) of its anomaly. See Figure 19 for the legend. a simplicial complex that efficiently and accurately represents a geographical space. Given a function on a geographical space, we defined filtration functions on a simplicial complex such that the PH classes are in one-to-one correspondence with either local minima or local maxima. By constructing a vineyard, one can track how the local extrema move and change over time.
We conducted case studies using COVID-19 vaccination and case-rate data. In one case study, we examined the geospatial vaccination structure in New York City on one day. In our other case study, in which we examined geospatiotemporal data, we constructed a vineyard to analyze COVID-19 case-rate anomalies in the city of Los Angeles over the course of one year. From the vineyard, we identified the locations of these anomalies and measured the severity of the disease outbreaks. The vineyard also captured information about the relationships between anomalies, such as the extent to which they are isolated from each other. We calculated the temporal persistence of an anomaly based on the length of its corresponding vine.
There are several ways to build on our research. It is desirable to discover how to use a vineyard to produce systematic forecasts of how a disease (or something else) will spread in space and time. We hypothesized in Section 5.2 that one can identify "emerging anomalies" in the COVID-19 data set as vines that are long but close to the diagonal plane. In other applications, one may want to predict the locations of the local extrema with the largest data values and/or highest temporal persistences. One may also want to forecast how the extrema will move in space. It will be valuable to investigate how to use the output of our approach as an input to forecasting models.
Our approach is useful for a wide variety of applications, and it seems possible to generalize it for many others. For example, given spatiotemporal voting data, one can identify regions that vote differently from the surrounding regions. This would allow one to generalize the work of [17] to track the intensity of voting differences and study spatial relationships between different political islands. Our methodology is not restricted to geographical data. Our methodology is applicable whenever one has a surface that is partitioned into a finite number of regions and a real-valued function (or a sequence of real-valued functions) on those regions. (That is, it is not restricted to geographical data.) For example, it may be possible to apply our approach to grayscale image data by partitioning an image into regions in which pixel values are close to each other. It also seems possible to extend our approach to higher dimensions; this would require constructing a higher-dimensional simplicial complex given boundary intersection data on the higher-dimensional regions. For example, in three dimensions, one could use such an extension of our approach to study atmospheric, oceanic, and video dynamics.
Appendix A. Details of the Simplicial-Complex Construction.
A.1. Boundary-Sequence Adjustment. Before constructing the simplicial complexes K R for each region R, we adjust the boundary sequences as follows. Let B R 0 denote the sequence of neighbors around the outer boundary of region R, and let B R 1 , . . . , B R m R (where m R is the number of inner boundary components of R) denote the sequences of neighbors around the inner boundary components of R. First, we adjust the sequences so that for each region R and each boundary component i, the first element of B R i has a 1D intersection with R. To do this, let {N i0 , . . . , N i,ni−1 } be the elements of B R i , where n i is the number of neighbors. If N i0 ∩ R is not 1D, let j be the smallest index such that N ij ∩ R is 1D. We then set B R i to be equal to {N ij , N i,(j+1) mod ni , . . . , N i,(j+ni−1) mod ni }. Following this, we adjust the sequences such that |B R i | ≥ 3 for all R and i. If |B R i | < 3, there are two cases: 1. (Case 1) If |B R i | = 1, let N be the unique element of B R i . This situation occurs if R is an island, and it can also occur if R lies inside N or if N lies inside R. We adjust B R i to be the sequence {N, N, N }. If N is not the exterior region, let j be the index of the boundary component of N that intersects R. Adjust B N j to be the sequence {R, R, R} to compensate for the adjustment that we made to B R i . 2. (Case 2) If |B R i | = 2, let N 1 and N 2 be the two elements of B R i , where (without loss of generality) N 1 is the exterior region if R is adjacent to the exterior along its ith boundary component. For example, in Figure 6a, N 1 is not the exterior region, which occurs if R is not adjacent to the exterior, then we also adjust B N1 j to compensate, where j is the index of the boundary component of N 1 that intersects R. In that case, we adjust B N1 j by repeating R an additional time. Finally, we adjust the outer boundary sequences so that |B R 0 | ≥ m R + 2 for all R. If |B R 0 | < m R + 2 for some region R (which does not occur in either of our geographical data sets), let N be an element of B R 0 , where (without loss of generality) N is the exterior region if if R is adjacent to the exterior along its outer boundary component. We adjust B R 0 so that N repeats an additional M = m + 2 − |B R 0 | times. If N is not the exterior, let i be the index of the boundary component of N that intersects R. We adjust B N i to compensate by repeating neighbor R an additional M times.
A.2. Construction of K R for Region R. We assume that we have already adjusted the boundary sequences as in Appendix A.1 whenever necessary. Initialize B i ← ∅, the sequence of vertices that are on the ith boundary component of K R

4:
Add vertex v i0 to K R

5:
Add vertex v i0 to B i

34:
Add edge (outer [k], v ik ) to K R ; the edge is unannotated 35: Add edge (outer [k], v i,k+1 ) to K R ; the edge is unannotated 36: end for 37: for k ← 3 to i − 1 do

38:
Add edge (v 00 , v ik ) to K R ; the edge is unannotated 39: end for 40: for k ← 0 to 2 do 41: Add 2D simplex (v 00 , v 0j , v 0,j+1 ) to K R ; the simplex is unannotated 50: end for A.3. Construction of K from the Collection {K R | R ∈ S}. We present two lemmas that were used in Section 3 to construct K by gluing together the collection of simplicial complexes {K R | R ∈ S}.
Lemma A.1. Let B 1 , . . . , B n be the boundary components of a region R 1 . If a region R 2 is connected and R 2 = R 1 has a nonempty intersection with the boundary component B i , then R 2 does not intersect any other boundary component B j = B i .
Proof. By the Jordan Curve Theorem, every boundary component of R 1 divides the plane into an "inside" and an "outside". Therefore, because R 2 is connected, it either lies outside the outer boundary component of R 1 or inside one of the inner boundary components of R 1 . If R 2 lies inside an inner boundary component B i , then R 2 can intersect B i but cannot intersect any other B j for j = i. If R 2 lies outside the outer boundary component, then R 2 can intersect the outer boundary component of R 1 , but it cannot intersect any other boundary components.
For example, suppose that R 1 is West Vernon in Figure 5b. Vermont Square intersects its inner boundary component but not its outer boundary component. Proof. Suppose that w ∈ K R is a vertex in B with the same set of region adjacencies as v. Let B be the boundary component of R that corresponds to the boundary component B of K R . Let v and w be the points on B that correspond, respectively, to v and w in B. Either the interior of R is contained in the region that is bounded by B , or it is contained in the complement of the region that is bounded by B . Without loss of generality, we suppose the former case. Let π be the permutation of {1, . . . , n} such that the sequence of region adjacencies around w is {R, N π(1) , . . . , N π(n) }. Let i 1 , i 2 ∈ {1, . . . , n}, with i 1 < i 2 , be a pair of indices. By Lemma A.1, R is adjacent only to one boundary component of N i1 and to one boundary component of N i2 . Let B 1 be the boundary component of N i1 to which R is adjacent, and let B 2 be the boundary component of N i2 to which R is adjacent. We have v , w ∈ B 1 ∩ B 2 .
Because B 1 is homeomorphic to S 1 , there exist paths γ 1 , γ 2 from v to w such that γ 1 ∪ γ 2 = B 1 . Because the interior of N i1 does not intersect R, it follows that γ 1 and γ 2 are both in the complement of the region that is bounded by B . There are two paths from v to w on B . Let τ be the unique choice of path such that R is not contained in the region that is bounded by the closed curve τ ∪ γ 1 . Either γ 1 is in the region that is bounded by the closed curve τ ∪ γ 2 or γ 2 is in the region that is bounded by the closed curve τ ∪ γ 1 . Without loss of generality, we suppose that the latter is true.
Analogously to our argument above, there exist paths γ 3 , γ 4 from v to w such that γ 3 ∪ γ 4 = B 2 and γ 3 and γ 4 are in the complement of the region that is bounded by B. Because B 2 is homeomorphic to S 1 , γ 3 and γ 4 are either both contained in the region that is bounded by γ 1 ∪ τ or both contained in the complement of the region that is bounded by γ 2 ∪ τ . Because i 2 > i 1 , it must be the former case. Therefore, π(i 2 ) < π(i 1 ). It follows that π is order-reversing. If there were another vertex x in B that is adjacent to the same set of regions, then the orientation of those regions around x would be the mirror of both the orientation of regions around v and the orientation of regions around w, which gives a contradiction when n ≥ 2.
For example, let R be the region Koreatown in Figure 6a. The two vertices that are shared by Koreatown and Little Bangladesh have the same region adjacencies, but they have mirrored orientations.
Appendix B. Alternative Topological Approaches.
B.1. 0D Persistent Homology. Let F be a real-valued function on a set S of geographical regions. In Sections 4.1 and 4.2, we described how one can analyze the local maxima (respectively, minima) of F by computing the 1D PH of the sublevel (respectively, superlevel) filtration. In this section, we discuss how the 0D PH of the sublevel (respectively, superlevel) filtration yields information about local minima (respectively, maxima) of F .
The 0D PH of the sublevel filtration encodes information about the structure of local minima of F in a way that is similar to how the 1D PH encodes information about the structure of local maxima. One can imagine taking α-sublevel sets of the function in Figure 9 (where we display α-super level sets) to see why this is true. A region R is a local minimum if the value of F (R) is less than the value of F (N ) for all neighboring regions N of R for which N ∩ R is 1D. If R is a local minimum, there is a 0D PH class whose birth simplex is one of the vertices in one of the triangles in the preimage g −1 (R). The class is born at filtration level α = F (R). For the LA data set of COVID-19 case rates, 0D PH classes correspond to regions that have a lower case rate than surrounding regions. The smaller the value of F (R) in comparison to the surrounding regions, the more persistent the PH class is. There is also one infinite 0D PH class for each connected component. One can think of these classes as corresponding to the "local minimum" at the exterior region. However, unlike for 1D PH classes, there is no canonical map from 0D PH classes to regions because the birth simplex of a 0D class is a vertex that belongs to several regions. The 0D PH of the superlevel filtration analogously encodes information about the structure of local maxima of F . However, as with the sublevel filtration, there is no canonical map from 0D PH classes to regions. Therefore, one cannot easily use the 0D PH of the sublevel (respectively, superlevel) filtration to identify the geographical locations of the local minima (respectively, maxima), so we did not study 0D PH in our case studies.
Although we did not compute 0D PH in the present paper, using 0D PH to study the structure of local extrema is appropriate when one is not interested in their locations. One can compute the 0D PH of the sublevel (respectively, superlevel) filtration more efficiently than the 1D PH of the superlevel (respectively, sublevel) filtration using the following approach. Given any filtration function f , the 0D PH of (K, f ) is isomorphic to the 0D PH of (K 1 , f | K1 ), where K 1 is the 1-skeleton of K (i.e., the vertices and edges of K) and K is the simplicial complex that we constructed in Section 3. In particular, if f is the sublevel or superlevel filtration that is induced by F , then one can construct an alternative 1D simplicial complex K ⊂ K 1 with even fewer simplices than K 1 such that the 0D PH of (K , f | K ) is isomorphic to the 0D PH of (K, f ). Because K has fewer simplices, one can do TDA computations more efficiently. To build K , we start with the collection {K R | R ∈ S}. For each K R , we remove all 2D simplices. We then remove all non-boundary edges, except that for each inner boundary component, we leave one edge that connects that inner boundary component to the outer boundary component. (The latter step is so that K R is still connected after we remove the 2D simplices.) We then glue together the collection of simplicial complexes according to their edge and vertex annotations. This yields the desired 1D simplicial complex K . However, we are not interested in 0D PH in our case studies, so we do not use this construction.
B.2. Alternative Filtrations for Disconnected Geographical Spaces. In Section 4.1 (respectively, Section 4.2), we defined a sublevel (respectively, superlevel) filtration in which we set the filtration values of all exterior-adjacent vertices and edges to the global minimum (respectively, negative global maximum) of F . In applications in which the union of all regions is not connected, such as for the NYC zip codes in Section 5.1, an alternative definition is to consider extrema on each connected component separately, rather than on the entire geographical space at once. This solves the problem that an isolated region (a geographical island 8 ) is trivially both a local maximum and a local minimum because it is not adjacent to any other regions. In Definitions 4.1 and 4.2, they appear as 1D PH classes that are born at the earliest filtration time, which may falsely emphasize the persistence of these trivial extrema.
Definition B.1 (Alternative Sublevel Filtration). Let K be the simplicial complex from Section 3 for a set S of regions, and let g be the assignment of 2D simplices to regions. Let F : S → R. If σ is a vertex or edge on the boundary of K, letσ be the 2D simplex for which σ is on the boundary ofσ. On σ, we define the alternative sublevel filtration function f to be where C is the connected component that contains the region g(σ). On all other simplices, the filtration function f is equal to the sublevel filtration function. One consequence of using these definitions is that one ignores isolated regions, which are trivial extrema. In Definitions B.1 and B.2, these isolated extrema appear as points on the diagonal of a PD. This is often an appropriate way to handle isolated regions. However, when an isolated region is a global extremum of a data set, this may be undesirable. This situation never occurs in our data.
For example, NYC has 14 connected components; several of these are zip codes that correspond to isolated islands. The alternative sublevel and superlevel filtrations effectively treat each connected component of NYC separately. In Figures 20a  and 20b, we show the PDs that we compute using the alternative sublevel and superlevel filtrations that are induced by the vaccination-rate function that we defined in Section 5.1. In these PDs, we compare a zip code's per capita vaccination rate to the global minimum or maximum rate on its connected component, rather than the global extremum of the entire data set. More precisely, the birth time of a connected component's global extremum is either the lowest per capita vaccination rate of that component (for the alternative sublevel filtration) or the additive inverse of the  We show only the finite PH classes. Each point in a PD corresponds to a non-isolated zip code, which we label according to its borough [26], that has (a) a higher vaccination rate than its neighboring zip codes or (b) a lower vaccination rate than its neighboring zip codes.
highest per capita vaccination rate of that component (for the alternative superlevel filtration). Consequently, the trivial island extrema are represented by PH classes on the diagonal. The alternative sublevel filtration and the alternative superlevel filtration, along with their time-dependent versions, are implemented in our code that is available at https://bitbucket.org/ahickok/vineyard/src/main/.
B.3. Multiparameter Persistent Homology. One can use multiparameter persistent homology to study how the topology of a data set changes as one varies multiple parameters [8]. In applying multiparameter PH to our COVID-19 case-rate data, two feasible parameters are (1) time and (2) the cumulative COVID-19 case rate. To compute multiparameter PH, one starts with a multiparameter filtration {K u | u ∈ Z n }, where K u ⊆ K v for all v ≥ u and n is the number of parameters. When n = 1, this is a filtered simplicial complex (i.e., an ordinary filtration); when n = 2, it is a bifiltration. The multiparameter PH in dimension k over field F is the graded F[x 1 , . . . , x n ] module u∈Z n H k (K u , F). For u ∈ Z n , the action of x u is the map H k (K u , F) → H k (K u+v , F) that is induced by the inclusion K u − → K u+v . When n = 1, this definition reduces to PH. One can use multiparameter PH to study local extrema of functions that are nondecreasing over time.
Definition B.3. Let K be the simplicial complex from the construction in Section 3 for a set S of regions. Let F : {t 0 , . . . , t n } × S → R be a function for which F (t, R) ≥ F (s, R) for all t ≥ s. Define the function f (t i , σ) to be the sublevel filtration that is induced by F (t i , ·). Let {α 0 , . . . , α } be the image of F , where +1 is the number of elements in the image. We define the bifiltration {σ ∈ K | f (t i , σ) ≤ α j } , i ∈ {0, . . . , n} , j ∈ {0, . . . , } K , j > and i ≥ 0 K n,j , i > n and j ≥ 0 ∅ , i < 0 or j < 0 .
One can use Definition B.3 to study cumulative COVID-19 case rates over time.
B.4. Multiparameter Zigzag Persistent Homology. One can use zigzag persistent homology to study how the topology of a data set changes as one varies a parameter nonmonotonically [7]. In single-parameter zigzag PH, one starts with a sequence K 0 , . . . , K n of simplicial complexes such that, for all i, either K i − → K i+1 or K i+1 − → K i . (By contrast, in ordinary PH, K i − → K i+1 for all i.) An inclusion K i − → K i+1 induces a map ι : H * (K i , F) → H * (K i+1 , F), and an inclusion K i+1 − → K i induces a map ι : H * (K i+1 , F) → H * (K i , F). Analogously to PH, one can decompose the resulting zigzag module into "interval modules" I τ (b, d).
One can use multiparameter zigzag PH when there are multiple parameters that vary nonmonotonically. See Section 2.1 of [7] for a short discussion. In applying multiparameter zizag PH to our COVID-19 case-rate data, two feasible parameters are (1) time and (2) the current COVID-19 case rate. Given a diagram of simplicial complexes, such as in Equation B.1, one can construct a diagram of homology groups that is induced by the maps between the simplicial complexes. This is a representation of a quiver. However, there are not well-behaved statistical summaries (in contrast to single-parameter zigzag PH).