text:
Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# Changing impacts of Alaska-Aleutian subduction zone tsunamis in California under future sea-level rise

## Abstract

The amplification of coastal hazards such as distant-source tsunamis under future relative sea-level rise (RSLR) is poorly constrained. In southern California, the Alaska-Aleutian subduction zone has been identified as an earthquake source region of particular concern for a worst-case scenario distant-source tsunami. Here, we explore how RSLR over the next century will influence future maximum nearshore tsunami heights (MNTH) at the Ports of Los Angeles and Long Beach. Earthquake and tsunami modeling combined with local probabilistic RSLR projections show the increased potential for more frequent, relatively low magnitude earthquakes to produce distant-source tsunamis that exceed historically observed MNTH. By 2100, under RSLR projections for a high-emissions representative concentration pathway (RCP8.5), the earthquake magnitude required to produce >1 m MNTH falls from ~Mw9.1 (required today) to Mw8.0, a magnitude that is ~6.7 times more frequent along the Alaska-Aleutian subduction zone.

## Introduction

To the more than one billion people worldwide living in the coastal zone below 10 m of elevation1, the compound effects of relative sea-level rise (RSLR), tidal flooding2, and storm surges3,4,5,6 are of increasing concern. Increasing tropical cyclone-driven flood heights due to changes in storm characteristics and RSLR over the past millennium and forecast increasing flood heights in the coming decades have been documented for specific locations such as New York City7,8,9,10. Other research shows increased extreme sea levels during coastal storms due to RSLR along coasts in California6 as well as the contiguous United States11. Still, other studies have investigated changes to extreme sea levels associated with coastal storms and RSLR in locations such as Australia12 and Europe13 and from a global perspective14. However, the impacts of RSLR on coastal inundation during other potentially damaging events, such as tsunamis, need further research15,16. Along coastlines affected by distant-source tsunamis, where potential tsunami amplitudes are generally on the order of or lower than projected twenty-first-century RSLR, rising baseline sea levels can significantly increase tsunami impacts16,17.

The economic impacts of future distant-source tsunamis are estimated to be in the billions of dollars for parts of the Pacific Rim, including the southern California coast18. Over the past two centuries, at least 14 distant-source tsunamis have damaged the California coast, with 8 of the 14 occurring in the last ~70 years19. The economic impacts of distant-source tsunamis in California have increased as coastal populations and infrastructure have grown. At the low-lying, densely populated, and economically important Ports of Los Angeles and Long Beach, recent maximum tsunami amplitudes (defined as the absolute value of the difference between a particular peak or trough of the tsunami and the undisturbed sea level at the time) recorded at tide gauge 120 (TG1; Fig. 1c) are associated with distant-source tsunamis from earthquakes originating in Chile (1960; Mw9.5; maximum tsunami amplitude = 0.72 m), Alaska (1964; Mw9.2; maximum tsunami amplitude = 0.56 m), and Japan (2011; Mw9.0; maximum tsunami amplitude = 0.31 m)19. The 1960, 1964, and 2011 tsunamis coincided with differing stages of low tide at the ports; therefore, their maximum nearshore tsunami heights (MNTH; defined here as the maximum amplitude of the tsunami wave time series relative to mean sea level (MSL)) were dampened. Nevertheless, strong currents and inundation caused by MNTH of 0.27 m in 1960 and 0.41 m in 1964 caused ~$17 M and ~$149 M (amounts referenced in this paper are in 2019 inflation-adjusted U.S. dollars) of damage in Los Angeles, respectively19,21. In 2011, MNTH of 0.13 m created strong currents at the ports and disrupted operations, and higher MNTH (>1 m) along the northern California coast caused ~$115 M in damage19,21. Of the distant earthquake source regions posing a tsunami threat to the California coast, the Alaska-Aleutian subduction zone has the potential to produce the highest (1–2 m) tsunami amplitudes21,22,23. The Semidi section of the Alaska-Aleutian subduction zone, defined as the portion of the subduction zone between western Kodiak Island and the Shumagin Islands, has been identified as a source area of particular concern because the continental slope azimuth there directs tsunamis towards southern California (Fig. 1a)24. However, historical25,26 and paleoseismic records27,28,29 show that earthquake ruptures in the region are not always confined to the Semidi section30 and that a rupture in 1788 (M8+), and probably older prehistoric ruptures, propagated east into the Kodiak section (Fig. 1a). Such evidence highlights the need for including multi-section (>M9) as well as single-section ruptures along the Semidi and Kodiak sections in southern California and Pacific-wide tsunami hazard assessments27. In this work, we explore the effect of RSLR on low-probability, high-impact distant-source tsunami events at the Ports of Los Angeles and Long Beach. We combine single and multi-section earthquake and tsunami modeling along the Alaska-Aleutian subduction zone with probabilistic local RSLR projections for the ports to estimate potential MNTH for the ports during the twenty-first century. ## Results ### Distant-source tsunami simulations for the ports of Los Angeles and Long Beach We use a time-independent, deterministic earthquake modeling approach to generate a dataset of possible tsunamigenic earthquake sources ranging from Mw8.0 to Mw9.4 (15 magnitude steps) along the Semidi and Kodiak sections of the Alaska-Aleutian subduction zone31. To account for source variability, we use 50 randomized earthquake areas (composed of adjacent NOAA unit sources) and hypocenter locations (assumed to be in the center of the earthquake area) for each step in earthquake magnitude (Fig. 1b and “Methods” section)32. Slip is uniform across unit sources for each earthquake; however, the area (i.e., number of unit sources) over which the slip is distributed for each earthquake magnitude varies (see “Methods” section). Our approach differs from probabilistic tsunami hazard assessments in that we use the same source region, suite of earthquake magnitudes, and slip variations for every year from 2000 to 2100, without considering the probability of each earthquake magnitude. This approach allows us to consider the changing impact of the same suite of significant earthquakes and tsunamis during twenty-first-century RSLR. Our earthquake modeling (15 earthquake magnitudes × 50 earthquakes per magnitude step) generates 750 deformation fields that are input into GeoClaw33 for the simulation of tsunami wave propagation (Fig. 1b, Supplementary Table S1 and “Methods” section). We report the resultant distribution of MNTH at the Ports of Los Angeles and Long Beach from our tsunami simulations as the maximum tsunami amplitude at our synthetic tide gauge 2 (TG2; located in the outer harbor at 17 m water depth) relative to MSL (Fig. 1c, d)20. We performed a parameter study to see how the MNTH produced by our method of varying the number of unit sources over which slip is distributed for each earthquake magnitude compared to a uniform and non-uniform slip approach for the same earthquake magnitudes (Supplementary Fig. S3). The parameter study supports the conclusion that uniform slip (using a constant number of unit sources and slip for each magnitude while only varying the earthquake location) results in a significant underestimation of MNTH34,35. Our method produces a broader range of MNTH similar to a non-uniform slip approach, although there may be an underestimation of the higher extremes of possible MNTH34,35 (Supplementary Fig. S3). Therefore, the MNTH described in this paper provide a conservative estimate of possible tsunami impacts at the ports. We also performed a parameter study to evaluate how many earthquake areas per magnitude were necessary to produce a consistent and reproducible distribution of MNTH at the ports. Simulating a consistent distribution of MNTH is critical to ensuring that source variability is not the driving factor in changing MNTH. We show that 50 random earthquake areas and hypocenter locations per magnitude step are sufficient to produce a robust statistical representation (i.e., consistent and reproducible) distribution of MNTH at the ports (Supplementary Fig. S4 and “Methods” section). Note that we do not analyze inundation15 or currents36,37, nor do we explore the nonlinear interaction of tides38 with tsunamis. These processes are complex in a port setting22 and are computationally prohibitive due to the high-resolution topography and bathymetry needed to obtain reliable results (see “Methods” section). Instead, we use TG2 as a reference point to compare how MNTH distributions are influenced by RSLR over time. We acknowledge that strong and erratic currents may be induced by distant-source tsunamis at the ports (e.g., refs. 22,36) and that the interaction of tidal currents with distant-source tsunamis may amplify MNTH38. Not including these processes in our modeling may underestimate the possible effects of distant-source tsunamis at the ports. Although not included in our modeling or calculations, we analyzed the earthquake catalog along the entire Alaska-Aleutian subduction zone (see “Methods” section) in order to put the relative frequency of our chosen earthquake magnitudes into context. We used a declustered earthquake catalog (b-value = 0.75) to calculate the relative rate of earthquake magnitudes along the Alaska-Aleutian subduction zone (Supplementary Table S2)39,40. This approach may underestimate larger magnitude events41,42; however, because the catalog at the Alaska-Aleutian subduction zone spans M5-9.2, we believe this is the most conservative approach for calculating relative earthquake rates. According to our simulations, for the year 2000, without considering RSLR or tidal variability, the 95% central range (CR) of MNTH at the Ports of Los Angeles and Long Beach generated by tsunamis from Mw8.0, Mw8.5, and Mw9.1 earthquakes is 0.06–0.26 m, 0.12–0.45 m, and 0.33–1.44 m (Supplementary Fig. S1), respectively. For our full suite of earthquakes (Mw8.0- Mw9.4), the 95% CR of MNTH is 0.19–1.78 m (median MNTH = 0.54 m; Fig. 1d). The tidal stage during which a tsunami strikes the coast can be very important in determining the highest water levels reached during the event43,44,45. To account for the influence that tidal stage has on MNTH at the Ports of Los Angeles and Long Beach, we linearly combine our MNTH with tidal stages derived from a distribution composed of ~30 years of tidal data from TG120 (Fig. 1d and “Methods” section). The maximum tidal range (MLLW-MHHW) observed at the ports is 1.68 m20. The resulting MNTH at the ports include rare high and low tsunami height values reflecting the potential for smaller magnitude earthquakes to produce relatively high tsunamis, and larger magnitude earthquakes to produce relatively low tsunamis, due to source and tidal variability (Fig. 1d). Incorporating tidal variability in the calculation of MNTH at the ports results in a 95% CR of MNTH, generated by our full suite of earthquakes (Mw8.0–Mw9.4), of −0.45–2.03 m (median MNTH = 0.62 m; Fig. 1d). ### Relative sea-level rise at the ports of Los Angeles and Long Beach Changes in relative sea level during the twenty-first century vary by location as a result of processes such as atmosphere-ocean dynamics, the gravitational, rotational, and dynamic effects of ocean/cryosphere/hydrosphere mass redistribution, glacio-isostatic adjustment, sediment compaction, and tectonic uplift or subsidence46,47. In southern California, gravitational effects are augmented by large contributions from the West Antarctic Ice Sheet (WAIS)48, considered to be the most vulnerable ice sheet in a warming climate49, causing the coast to be exceptionally sensitive to RSLR. To estimate the contribution of RSLR to future MNTH at the Ports of Los Angeles and Long Beach, we use probabilistic projections of local RSLR50 (see “Methods” section). We examine low and high greenhouse-gas emissions pathways (Representative Concentration Pathways [RCPs] 2.6 and 8.5, respectively). RCP2.6 represents a low-emissions future with mitigation measures most consistent with the Paris Climate Agreement, while RCP8.5 represents a high-emissions future with no firm mitigation targets51,52. We consider each pathway under two different treatments of Antarctic Ice Sheet uncertainty (denoted K14 and DP16) (Fig. 2 and Table 1). The K14 projections50 are consistent with projections from the Intergovernmental Panel on Climate Change (IPCC) Fifth Assessment Report50,53. The DP16 projections use outputs from a continental-scale model incorporating marine ice-sheet and ice-cliff instability mechanisms and are highly sensitive to atmospheric warming54,55. Using the year 2000 as a baseline, we generate projections of local RSLR at the Ports of Los Angeles and Long Beach for the two emissions pathways during each decade of the twenty-first century. ### Future maximum nearshore Tsunami heights To study the influence of future RSLR on MNTH at the Ports of Los Angeles and Long Beach over the twenty-first century, we linearly combined a subsample of local probabilistic RSLR projections (RCP2.6 K14 and DP16, RCP8.5 K14 and DP16) spanning the low and high-end values of RSLR for each decade with our MNTH distribution including tidal variability. Our approach of linearly combining MNTH with RSLR projections resulted in a difference of −7% to +15% in MNTH compared to an approach that accounts for changing bathymetry due to RSLR for each tsunami simulation (see “Methods” section). Previous tsunami15 and storm surge10 studies also highlight the potential nonlinear effect of RSLR on flood heights over time, but the effect is small for RSLR of < 2m56. At the ports, RSLR causes tsunamis from our full suite of earthquakes to have higher median MNTH in 2050, 2070, and 2100 than today (Fig. 3 and Supplementary Table S3). The median of the MNTH distribution with tidal variability in 2000 is 0.62 m, reflecting the median of distant-source tsunamis generated by all earthquakes (Mw8.0 to Mw9.4) with no RSLR included. By 2050, median MNTH distributions range from 0.74 m (RCP2.6 DP16) to 0.84 m (RCP8.5 K14). By 2070, the median of MNTH distributions ranges from 0.83 m for RCP2.6 DP16 to 1.08 m for RCP8.5 DP16. The medians of the MNTH distributions in 2100 reflect the wide range in emissions pathways and sea-level projections, ranging from 0.95 m for RCP2.6 DP16 to 1.86 m for RCP8.5 DP16. To explore the temporal relationship between earthquake magnitude and MNTH, we calculated the earthquake magnitude that generates tsunamis that have a 50% chance of exceeding a defined MNTH as a function of time (Fig. 4 and Table 2). We examined three MNTH: 0.5 m (measured multiple times during the historical period), 1.0 m (2 times larger than any historical event), and 1.5 m (similar to a previous tsunami scenario conducted at the ports16 and the highest storm-driven extreme sea level recorded at the ports57). For all RSLR projections considered (RCP2.6 K14 and DP16, RCP8.5 K14 and DP16), the earthquake magnitude required to exceed MNTH of 0.5 m drops to the lowest considered magnitude between 2040 and 2060. Today, a ~Mw8.7 earthquake generates tsunamis that have a 50% chance of exceeding MNTH of 0.5 m. By 2040 (RCP2.6 K14 and RCP8.5 K14), 2050 (RCP8.5 DP16), and 2060 (RCP2.6 DP16), a Mw8.0 or lower earthquake generates tsunamis that have the same probability of exceeding MNTH of 0.5 m (Fig. 4a). Along the Alaska-Aleutian subduction zone, a Mw8.0 earthquake is ~3.4 times more likely to occur than a ~Mw8.7 (see “Methods” section). The influence of different RSLR projections becomes more apparent for higher MNTH. For RCP2.6 K14 and DP16, there is a small decrease in the earthquake magnitude required to exceed MNTH of 1.0 m by 2100; today, a ~Mw9.1 earthquake generates tsunamis that have a 50% chance of exceeding MNTH of 1.0 m. By 2100, an earthquake of Mw8.9 (RCP2.6 DP16) or Mw8.8 (RCP2.6 K14) generates tsunamis that have the same probability of exceeding MNTH of 1.0 m (Fig. 4b). A ~Mw8.8 earthquake is ~1.7 times more likely to occur than a ~Mw9.1 along the Alaska-Aleutian subduction zone. For RCP8.5, we see a significant decrease in the earthquake magnitude—Mw8.0—that has a 50% chance of exceeding MNTH of 1.0 m by 2080 (DP16) and 2100 (K14). A Mw8.0 earthquake is ~6.7 times more likely to occur than a ~Mw9.1 along the Alaska-Aleutian subduction zone. The wide range of RSLR projections strongly influences future MNTH of 1.5 m or higher (Fig. 4c). For RCP2.6 K14 and DP16, we see a small decrease in the earthquake magnitude required to exceed MNTH of 1.5 m by 2100; today, a Mw9.4 or larger earthquake generates tsunamis that have a 50% chance of exceeding MNTH of 1.5 m. By 2100, under RCP2.6 RSLR, an earthquake of approximately Mw9.2 generates tsunamis that have the same probability of exceeding MNTH of 1.5 m. For RCP8.5 K14, a ~Mw9.0 earthquake generates tsunamis that have a 50% chance of exceeding MNTH of 1.5 m by 2100. A ~Mw9.0 earthquake is 2.0 times more likely to occur than a ~Mw9.4 along the Alaska-Aleutian subduction zone. For RCP8.5 DP16, we see a more rapid and substantial drop in the earthquake magnitude required to produce MNTH of 1.5 m: by 2100, a ~Mw8.4 earthquake generates tsunamis that have a 50% chance of exceeding MNTH of 1.5 m. A Mw8.4 earthquake is ~5.6 times more likely to occur than a ~Mw9.4 along the Alaska-Aleutian subduction zone (see “Methods” section). ## Discussion The U.S. Geological Survey (USGS) Science Application for Risk Reduction (SAFRR) project modeled a Mw9.1 earthquake and its tsunami sourced along the Semidi section of the Alaska-Aleutian subdiction zone (Fig. 1b). The SAFRR tsunami scenario found that such an earthquake could produce a distant-source tsunami with an amplitude of ~1 m at the Ports of Los Angeles and Long Beach. In the scenario, the tsunami struck the coast during mean high water (MHW), producing MNTH of 1.59 m, and causing losses of up to ~$4.2 billion (Fig. 1d)18. However, the SAFRR tsunami scenario did not consider the amplification of MNTH under RSLR over the next century. In addition, the scenario did not consider multi-section, higher magnitude earthquake ruptures creating higher tsunami amplitudes or the varying tidal stages during which a tsunami may strike. Both may dampen or amplify MNTH.

By including future RSLR, multi-section ruptures, and tidal variability in our tsunami modeling, we provide a more complete picture of potential future MNTH at the Ports of Los Angeles and Long Beach. We show that under rising sea levels, the possibility of economically and socially disruptive distant-source tsunami events like the one simulated in the SAFRR scenario18 will increase as the earthquake magnitude required to exceed MNTH of >1.0 m drops dramatically (from Mw9.1 to a Mw8.0). A similar increase in flood frequencies under future RSLR in southern California has been predicted in storm surge and tidal flooding studies6,11.

Our results highlight the need to consider RSLR when assessing possible future MNTH and planning for RSLR at the Ports of Los Angeles and Long Beach. Finally, given that changing sea levels threaten coastal communities around the globe, these results suggest that RSLR should also be considered as part of the planning and decision-making process at other distant- and near-source tsunami-prone coasts worldwide17.

## Methods

### Probabilistic sea-level rise projections

In the coming centuries, global mean sea level (GMSL) will continue to rise due to the warming climate, generating hazards for coastal populations, economies, infrastructure, and ecosystems around the world58. For a low-emissions future with mitigation measures most consistent with the Paris Climate Agreement [Representative Concentration Pathway (RCP) 2.651,52], the Fifth Assessment Report (AR5) from the Intergovernmental Panel on Climate Change (IPCC) projected a “likely” (> 66% probability) GMSL rise of 0.28–0.61 m by 2100 relative to 1986–201553. For a high-emissions “business as usual” future with no particular mitigation targets (RCP 8.5), IPCC AR5 projected a “likely” GMSL rise of 0.52–0.98 m by 2100 relative to 1986–201553. However, recent studies suggest the IPCC AR5 GMSL rise estimates may be too low. For example, a physical ice-sheet model that includes important mechanisms such as ice-shelf hydrofracturing and the structural collapse of marine-terminating ice-cliffs shows the Antarctic Ice Sheet (AIS) could contribute far greater amounts to GMSL rise than previously expected: >1.5 m by 2100 under RCP8.559,60. The possibility of higher-end projections being realized or even exceeded has many stakeholders preparing for sea-level rise in excess of 1 m by 210061, and under extreme scenarios 2+ m of sea-level rise by 210062.

The early impacts of higher sea levels are already being felt in southern California, where coastal flooding during storms, periodic tidal flooding, and increased coastal erosion are becoming more frequent and extensive63,64,65. Higher sea levels will also leave southern California coastlines even more vulnerable to distant-source tsunamis, which have repeatedly impacted the coast in the last few centuries66.

We consider probabilistic sea-level rise projections from the Los Angeles tide gauge (33° 43.2′ N, 118° 16.4′ W67; TG1 in Fig. 1c)60 under two methodological approaches for the Antarctic ice sheet (K14 and DP16) and two different emissions pathways (RCP2.6 and RCP 8.5)60,68. RSL projections are determined from 10,000 Monte Carlo samples of SLR projected at the Los Angeles Tide Gauge using the approach outlined in Kopp et al. 68. Both K14 and DP16 projections combine estimates of thermal expansion and ocean dynamics from CMIP5 global climate model simulations, glacier melt from CMIP5-forced surface-mass balance modeling, global land water storage changes from semi-empirical modeling, long-term non-climatic relative sea-level change based on spatio-temporal statistical modeling of tide-gauge data, and gravitational, rotational, and deformational effects of glacier and ice sheet changes from geophysical modeling. Both sets also use Greenland ice sheet projections based on a combination of AR5 expert assessment regarding likely changes and tail-risk information from the structured expert judgment exercise of Bamber and Aspinall69. The K14 projections use the same approach for Antarctica as for Greenland (and are thus generally consistent with the projections of AR5)53,68, while the DP16 projections60 replaced the K14 Antarctic projection with projections from the continental-scale ice-sheet/ice-shelf model of Deconto and Pollard59. The DP16 projections were the first continental-scale RCP-driven projections to account for marine ice-cliff instability associated with the combined effects of ice-shelf hydrofracturing and gravitational instability59,60,70. The two sets of projections taken together provide a reasonable approach to bracketing the range of plausible probability distributions of future rise47.

### Earthquake realizations

To study the influence of future relative sea-level rise (RSLR) on tsunami impacts in the Ports of Los Angeles and Long Beach, we consider the same suite of earthquakes between Mw8.0 and Mw9.4 (with 15 magnitude steps) in each year. We do not take the occurrence probability of each earthquake magnitude into account in order to focus on the tsunami impact that each magnitude step would have under different sea-level rise projections. For our analysis, we generate robust distributions of maximum nearshore tsunami heights (MNTH) that are based on 50 spatially varying earthquakes in each magnitude step to address uncertainties in epicenter locations (see more details on this approach in the paragraph below). We also considered another possible source of uncertainty in the MNTH generated by our earthquake realizations: uniform vs. non-uniform slip. Traditionally, it was assumed that the tsunami-wave dynamics filters and averages the slip differences across the rupture area as the tsunami propagates away from the source area. However, Li et al. and Melgar et al. 15,34,71 demonstrated that tsunami amplitudes are underestimated in earthquakes with uniform slip across the earthquake area, even in the far-field. Indeed, slip inversion studies of historical earthquakes show that slip distribution varies greatly across the plate interface, and if this is not considered in earthquake realizations, MNTH will be underestimated35. To avoid underestimating tsunami amplitude in the Ports of Los Angeles and Long Beach, we devised the method of varying the number of unit sources over which slip is distributed for each earthquake magnitude (described below). Our approach is similar to the variable-area-uniform-slip (VAUS) applied by Davies35.

We employ the empirical equations from Strasser72 to estimate the average earthquake area that characterizes each magnitude step (15 magnitude steps between Mw8.0 and Mw9.4). Because the earthquake area varies in each magnitude step around the average, we multiply the calculated earthquake area by a random factor varying between 0.5 and 1.5 to produce 50 randomized earthquake areas (15 magnitude steps × 50 earthquake areas per magnitude = 750 simulations). We use the 50 earthquake areas per magnitude step to determine how many adjacent NOAA unit sources (100 km × 50 km)32 per earthquake have to be used to cover the earthquake area. At the same time, to vary the hypocenter locations within each magnitude step, we place the unit sources associated with each earthquake randomly within the unit source grid of the Semidi and Kodiak sections (Fig. 1b). Unit sources are not superposed. It should be noted that the arrangement of the unit sources is loosely constrained by the length of the computed earthquake area to avoid unrealistically long and thin earthquake areas. To determine the slip (D; in this study, slip is uniform across unit sources) for each of the 50 randomized earthquake areas and hypocenter locations per magnitude step, we use the following equation, derived from the moment magnitude and the seismic moment:

$$D=\frac{{10}^{1.5({M}_{{{{{{\mathrm{w}}}}}}}+10.7)}}{\mu {{{{{\mathrm{A}}}}}}}$$

For example, a Mw8.1 can be composed of one, two, or three-unit sources, translating into slips of D ≈ 8 m (one unit source), D ≈ 4 m (two unit sources), or D ≈ 2.7 m (three unit sources). Thus, for each earthquake magnitude, slip can be concentrated over a variable amount of unit sources to account for slip variability within each magnitude step. The minimum, average, and maximum slip and resultant deformation for each magnitude step are reported in Supplementary Table S1.

### Tsunami simulations

To generate the initial conditions for the tsunami simulations from the aforementioned suite of earthquakes, we employ the Okada deterministic method31 to generate the maximum vertical ocean-surface deformation that is responsible for tsunami generation (Supplementary Table S1). Okada’s method requires the surface area of the earthquake, its depth, rake, strike, and dip. We utilize the NOAA tsunami unit sources to provide the required information (depth: 5–40 km, rake: 90°, strike: see unit source orientation on Fig. 1b, dip: 15°32).

We use GeoClaw to carry out the tsunami simulations. GeoClaw is a widely used modeling tool for geophysical flows and is part of ClawPack software package73. GeoClaw has been validated and verified74 and applied to a variety of different past tsunamis, such as the 2015 Chile75 and 2011 Japan76,77 events. One of the main advantages of GeoClaw is the Adaptive Mesh Refinement (AMR) that is implemented and available for tsunami simulations. AMR automatically refines the computational grid in areas where a finer resolution of the employed grid helps to find a more accurate numerical solution. For tsunami simulations, this area coincides with the traveling tsunami wave train. It is possible to force the refinement level in certain areas (e.g., southern California), which is a powerful method to reduce the computational time, for example, when many model runs are needed such as in our case. Supplementary Fig. S2 depicts the refinement areas we used in our simulations. As mentioned earlier, GeoClaw employs AMR to make the computations more efficient. In the open Pacific Ocean (Supplementary Fig. S2A, Box A), GeoClaw uses resolutions between 1° and 20′. For the tsunami evolution from the deep sea to the continental shelf in the region around Los Angeles (Supplementary Fig. S2B) grid resolutions between 20′ and 10″ are employed in the simulations; while tsunami impact dynamics in the immediate vicinity of the Ports of Los Angeles and Long Beach are computed with resolutions varying from 10″ to 1″ (Supplementary Fig. S2, Box C). ETOPO1 elevation data78 (1′ resolution, interpolated for resolutions < 1′) was employed for Boxes A and B. The resolution of the elevation data employed for Box C is 0.3″.

For each of the tsunami simulations, we determine the maximum tsunami amplitude relative to mean sea level (MSL) at a synthetic tide gauge in the port (see TG2 in Fig. 1c). We use a synthetic tide gauge ~50 m offshore, 17 m water depth (TG2; Fig. 1c) because smaller earthquakes and smaller tsunamis do not trigger AMR to move to the finest grid resolution at a tide gauge at the position of TG167, therefore not registering that a tsunami has occurred. The tide gauge location at TG2 is far enough offshore to register the lower MNTH. We omit inundation analysis from our study because of the spurious results possible in a flat port setting and the highly resolved computational grids necessary to accurately complete the analysis. Our MNTH distribution is based on the 750 individual tsunami simulations for 15 magnitudes steps between Mw8.0 and 9.4 and 50 random hypocenters and earthquake areas per magnitude step. The blue histogram in Fig. 1d represents the MNTH distribution for our entire suite of earthquakes (Mw8.0 to Mw9.4) in the year 2000 relative to MSL with no RSLR or tidal variability included.

### Combining tsunamis, tides, and RSLR projections

To incorporate tidal variability into our MNTH distribution, we create a tidal distribution from the Ports of Los Angeles and Long Beach tide-gauge record (TG1, Fig. 1c) from 01/1/1989 to 12/31/2019 (ID: 9410660, ref. 67). The Ports of Los Angeles and Long Beach have a mixed semidiurnal tidal cycle in which two high and two low tides of different sizes appear every day. The maximum tidal range (MLLW-MHHW) observed at the ports is 1.68 m, while the difference between mean high water (MHW) and mean low water (MLW) is 1.16 m (estimated from the tidal records during 1983–2019). The greatest storm-driven sea level observed at the Ports of Los Angeles and Long Beach tide gauge is 1.55 m relative to MSL (10 January 2005), following the wettest 15-day period on record in Los Angeles79. We use a Gaussian kernel density estimate of the full tidal data to create 2000 random tidal subsamples. We linearly combine each of the tidal subsample values with each of the 50 maximum tsunami-amplitude values for the 15 magnitude steps between Mw8.0 and 9.4. Androsov38 found that in some instances, linearly combining tides and MNTH could significantly underestimate tsunami heights, and argue that tidal amplitudes and tidal currents need to be fully integrated into a tsunami model. However, the integration of tidal amplitudes and tidal currents into a tsunami model is complex and requires more research38. We acknowledge that our linear approach may underestimate MNTH at the ports but argue that the effect is likely much smaller than not considering tidal variability at all.

A Gaussian kernel density estimate is also employed to create 1000 subsamples from the RLSR projection data in each decade between 2000 and 2100 to incorporate RSLR into future MNTH. Every value in the matrix containing combined maximum tsunami amplitude and tidal values (red histogram on Fig. 1d) for the different magnitude steps is element-wise combined with the 1000 subsamples of RSLR values in each decade. We carried out a small parameter study to compare the method described above with a simulation framework that changes the position of the shoreline due to different sea-level rise values and simulates tsunamis in every decade. In the latter simulation framework, the tidal datum is kept constant at MHW and requires significantly more computational resources than our approach. Comparing MNTH (without tides) between the two frameworks revealed that there is a −7% to +15% difference in the MNTH in different decades due to sea-level rise.

### Relative earthquake rates along the Alaska-Aleutian subduction zone

To assess the relative rates of earthquakes of various magnitudes along the Alaska-Aleutian subduction zone, we first determined a regional b-value (Supplementary Fig. S5). To calculate the b-value, earthquake catalogs were constructed by merging original catalogs from the U.S. Geological Survey (USGS)80, the Geological Survey of Canada (GSC)81, and Stover and Coffman39. For the USGS and GSC catalogs, online searches retrieved earthquakes since 1900 that meet the following characteristics: (a) magnitude ≥ 3.8, (b) 46°N ≤ latitude ≤ 73°N, and (c) +165° ≤ longitude ≤ −120°. Catalog processing generally followed the methodology described by ref. 39,40, with steps including reformatting, estimating a moment magnitude for each event, deleting duplicates, and declustering. The final catalog used for the analysis was spatially trimmed to the area of the Alaska-Aleutian megathrust and depth < 50 km. Magnitude-frequency distributions were modeled using the maximum-likelihood methodology of Weichert82. Incremental earthquake rates in 0.2-magnitude-unit bins were determined by counting earthquakes in the catalog, assuming completeness levels for M7.4 since 1900, M7.0 since 1950, M5.6 since 1964, and 5.0 since 1990. Fits to the binned rates yielded a b-value 0.75 for the declustered catalog (Supplementary Fig. S5).

We use the regional b-value to assess relative rates of earthquakes of various magnitudes along the Alaska-Aleutian subduction zone (Supplementary Table S2). We note that here, as in the main text, we do not use the relative earthquake rates in our modeling and instead use them to put the shift from higher to lower earthquake magnitudes needed to produce similar MNTH into context. A b-value of 0.75 gives an incremental rate of M8.0 earthquakes that is 6.7 times greater than the rate of M9.1 earthquakes (Supplementary Table S2). To explore the possible uncertainty in the relative frequency rate introduced by variations in the b-value (following Weichert82), we also considered b-values of 0.7 and 0.8 in our calculations. Using b-values of 0.7 and 0.8, the relative frequency of a M8.0 vs a M9.1 changes to 5.9–7.6 (i.e., 6.7 +0.9/−0.8) times, respectively. Because our consideration of b-value variability did not result in significant changes to the relative frequency of earthquake magnitudes, we use the declustered catalog b-value of 0.75 to calculate our relative earthquake frequencies in the main text and in Supplementary Table S2.

## Data availability

All data integral to the stated conclusions are presented within the paper and “Methods” section. Earthquake data used to calculate the relative probability of Alaska-Aleutian subduction zone earthquakes are publicly available at (http://earthquake.usgs.gov/earthquakes/search/) and (http://earthquakescanada.nrcan.gc.ca/stndon/NEDB-BNDS/bulletin-en.php).

## Code availability

The tsunami simulation code (GeoClaw) used to generate distant-source tsunami flood heights in this study is publicly available at (http://www.clawpack.org/installing.html#). The sea-level rise projections used in this study were generated using ProjectSL (https://github.com/bobkopp/ProjectSL) and LocalizeSL (https://github.com/bobkopp/LocalizeSL). The code used to combine distant-source tsunami flood heights with relative sea-level rise projections is available at (https://github.com/weiszr/PortLLALB_SLRTsun).

## References

1. Kulp, S. A. & Strauss, B. H. New elevation data triple estimates of global vulnerability to sea-level rise and coastal flooding. Nat. Commun. 10, 4844 (2019).

2. Sweet, W. V. & Park, J. From the extreme to the mean: acceleration and tipping points of coastal inundation from sea level rise. Earths Future 2, 579–600 (2014).

3. Muis, S., Verlaan, M., Winsemius, H. C., Aerts, J. C. & Ward, P. J. A global reanalysis of storm surges and extreme sea levels. Nat. Commun. 7, 11969 (2016).

4. Neumann, J. E. et al. Joint effects of storm surge and sea-level rise on US Coasts: new economic estimates of impacts, adaptation, and benefits of mitigation policy. Clim. Change 129, 337–349 (2015).

5. Rahmstorf, S. Rising hazard of storm-surge flooding. Proc. Natl Acad. Sci. USA 114, 11806–11808 (2017).

6. Barnard, P. L. et al. Dynamic flood modeling essential to assess the coastal impacts of climate change. Sci. Rep. 9, 4309 (2019).

7. Kemp, A. C. & Horton, B. P. Contribution of relative sea‐level rise to historical hurricane flooding in New York City. J. Quat. Sci. 28, 537–541 (2013).

8. Reed, A. J. et al. Increased threat of tropical cyclones and coastal flooding to New York City during the anthropogenic era. Proc. Natl Acad. Sci.USA 112, 12610–12615 (2015).

9. Lin, N., Kopp, R. E., Horton, B. P. & Donnelly, J. P. Hurricane Sandy’s flood frequency increasing from year 1800 to 2100. Proc. Natl Acad. Sci. USA 113, 12071–12075 (2016).

10. Garner, A. J. et al. Impact of climate change on New York City’s coastal flood hazard: Increasing flood heights from the preindustrial to 2300 CE. Proc. Natl Acad. Sci. USA 114, 11861–11866 (2017).

11. Buchanan, M. K., Oppenheimer, M. & Kopp, R. E. Amplification of flood frequencies with local sea level rise and emerging flood regimes. Environ. Res. Lett. 12, 064009 (2017).

12. McInnes, K. L. et al. Natural hazards in Australia: sea level and coastal extremes. Clim. Change 139, 69–83 (2016).

13. Arns, A., Wahl, T., Dangendorf, S. & Jensen, J. The impact of sea level rise on storm surge water levels in the northern part of the German Bight. Coast. Eng. 96, 118–131 (2015).

14. Wahl, T. et al. Understanding extreme sea levels for broad-scale coastal impact and adaptation analysis. Nat. Commun. 8, 16075 (2017).

15. Li, L. et al. A modest 0.5-m rise in sea level will double the tsunami hazard in Macau. Sci. Adv. 4, eaat1180 (2018).

16. Nagai, R., Takabatake, T., Esteban, M., Ishii, H. & Shibayama, T. Tsunami risk hazard in Tokyo Bay: The challenge of future sea level rise. Int. J. Disaster Risk Reduct. 45, 101321 (2020).

17. Sepúlveda, I., Haase, J. S., Liu, P. L.-F., Grigoriu, M. & Winckler, P. Non‐stationary probabilistic tsunami hazard assessments incorporating climate‐change‐driven sea level rise. Earths Future 9, e2021EF002007.

18. Ross, S. L. et al. SAFRR (Science Application for Risk Reduction) Tsunami Scenario–Executive Summary and Introduction: Chapter A in The SAFRR (Science Application for Risk Reduction) Tsunami Scenario (2013).

19. Wilson, R. et al. The Search for Geologic Evidence of Distant-Source Tsunamis Using New Field Data in California: Chapter C in The SAFRR (Science Application for Risk Reduction) Tsunami Scenario. https://doi.org/10.3133/ofr20131170c (2014).

21. Uslu, B., Eble, M. C., Titov, V. V. & Bernard, E. N. Tsunami hazard assessment special series: Vol. 2 Distant tsunami threats to the ports of Los Angeles and Long Beach, California. NOAA OAR Spec. Rep. 2, 100 (2010).

22. Ross, S. L., and Jones, L. M. (eds) The SAFRR Tsunami Modeling Working Group, 2013, Modeling for the SAFRR Tsunami Scenario—Generation, Propagation, Inundation, and Currents in Ports and Harbors, Chapter D, The SAFRR (Science Application for Risk Reduction) Tsunami Scenario 136. http://pubs.usgs.gov/of/2013/1170/d/ (2013).

23. Kalligeris, N., Montoya, L., Ayca, A. & Lynett, P. An approach for estimating the largest probable tsunami from far-field subduction zone earthquakes. Nat. Hazards 89, 233–253 (2017).

24. von Huene, R., Miller, J. J. & Dartnell, P. A possible transoceanic tsunami directed toward the US west coast from the Semidi segment, Alaska convergent margin. Geochem. Geophys. Geosyst. 17, 645–659 (2016).

25. Lander, J. Tsunamis affecting Alaska, 1737-1996. Oceanogr. Lit. Rev. 6, 546–547 (1997).

26. Soloviev, S. L. Sanak-Kodiak tsunami of 1788. Sci. Tsunami Hazards 8, 34–38 (1990).

27. Briggs, R. W. et al. Uplift and subsidence reveal a nonpersistent megathrust rupture boundary (Sitkinak Island, Alaska). Geophys. Res. Lett. 41, 2289–2296 (2014).

28. Shennan, I. et al. Great tsunamigenic earthquakes during the past 1000 yr on the Alaska megathrust. Geology 42, 687–690 (2014).

29. Nelson, A. R. et al. Tsunami recurrence in the eastern Alaska-Aleutian arc: a Holocene stratigraphic record from Chirikof Island, Alaska. Geosphere 11, 1172–1203 (2015).

30. Wesson, R. L. et al. Revision of Time-independent Probabilistic Seismic Hazard Maps for Alaska (2007).

31. Okada, Y. Surface deformation due to shear and tensile faults in a half-space. Bull. Seismol. Soc. Am. 75, 1135–1154 (1985).

32. Gica, E. Development of the Forecast Propagation Database for NOAA’s Short-Term Inundation Forecast for Tsunamis (SIFT) (2008).

33. LeVeque, R. J., George, D. L. & Berger, M. J. Tsunami modelling with adaptively refined finite volume methods. Acta Numer. 20, 211–289 (2011).

34. Li, L. et al. How heterogeneous coseismic slip affects regional probabilistic tsunami hazard assessment: a case study in the South China Sea. J. Geophys. Res. Solid Earth 121, 6250–6272 (2016).

35. Davies, G. Tsunami variability from uncalibrated stochastic earthquake models: tests against deep ocean observations 2006–2016. Geophys. J. Int. 218, 1939–1960 (2019).

36. Lynett, P. J. et al. Observations and modeling of tsunami-induced currents in ports and harbors. Earth Planet. Sci. Lett. 327, 68–74 (2012).

37. Borrero, J. C., Lynett, P. J. & Kalligeris, N. Tsunami currents in ports. Philos. Trans. R. Soc. Math. Phys. Eng. Sci. 373, 20140372 (2015).

38. Androsov, A., Behrens, J. & Danilov, S. in Computational Science and High Performance Computing IV 191–206 (Springer, 2011).

39. Stover, C. W. & Coffman, J. L. Seismicity of the United States, 1568-1989 (revised) (US Government Printing Office, 1993).

40. Mueller, C. S. Earthquake catalogs for the USGS national seismic hazard maps. Seismol. Res. Lett. 90, 251–261 (2019).

41. Grezio, A. et al. Probabilistic tsunami hazard analysis: multiple sources and global applications. Rev. Geophys. 55, 1158–1198 (2017).

42. Davies, G. et al. A global probabilistic tsunami hazard assessment from earthquake sources. Geol. Soc. Lond. Spec. Publ. 456, 219–244 (2018).

43. Zhang, Y. J., Witter, R. C. & Priest, G. R. Tsunami–tide interaction in 1964 Prince William Sound tsunami. Ocean Model 40, 246–259 (2011).

44. Gallovič, F. & Brokešová, J. The k-2 rupture model parametric study: example of the 1999 Athens earthquake. Stud. Geophys. Geod. 48, 589–613 (2004).

45. Gallovič, F. & Brokešová, J. On strong ground motion synthesis with k−2 slip distributions. J. Seismol. 8, 211–224 (2004).

46. Gregory, J. M. et al. Concepts and terminology for sea level: mean, variability and change, both local and global. Surv. Geophys. 40, 1251–1289 (2019).

47. Horton, B. P. et al. Mapping sea-level change in time, space, and probability. Annu. Rev. Environ. Resour. 43, 481–521 (2018).

48. Griggs, G. et al. Rising seas in California: an update on sea-level rise science. Calif. Ocean Sci. Trust (2017).

49. Rignot, E., Mouginot, J. & Scheuchl, B. Ice flow of the Antarctic Ice Sheet. Science 333, 1427–1430 (2011).

50. Kopp, R. E. et al. Probabilistic 21st and 22nd century sea-level projections at a global network of tide-gauge sites. Earths Future 2, 383–406 (2014).

51. Riahi, K. et al. RCP 8.5—A scenario of comparatively high greenhouse gas emissions. Clim. Change 109, 33 (2011).

52. van Vuuren, D. P. et al. The representative concentration pathways: an overview. Clim. Change 109, 5 (2011).

53. Church, J. A. et al. Sea level change. in Climate Change 2013: The Physical Science Basis. Contribution of Working Group I to the Fifth Assessment Report of the Intergovernmental Panel on Climate Change (PM Cambridge University Press, 2013).

54. DeConto, R. M. & Pollard, D. Contribution of Antarctica to past and future sea-level rise. Nature 531, 591 (2016).

55. Kopp, R. E. et al. Evolving understanding of Antarctic ice-sheet physics and ambiguity in probabilistic sea-level projections. Earths Future 5, 1217–1233 (2017).

56. Lin, N., Emanuel, K., Oppenheimer, M. & Vanmarcke, E. Physically based assessment of hurricane surge threat under climate change. Nat. Clim. Change 2, 462–467 (2012).

57. NOAA. NOAA Report- Heavy Precipitation Event Southern California January 7–11. https://www.cnrfc.noaa.gov/storm_summaries/jan2005storms.php (2005).

58. Neumann, B., Vafeidis, A. T., Zimmermann, J. & Nicholls, R. J. Future coastal population growth and exposure to sea-level rise and coastal flooding-a global assessment. PLoS ONE 10, e0118571 (2015).

59. DeConto, R. M. & Pollard, D. Contribution of Antarctica to past and future sea-level rise. Nature 531, 591–597 (2016).

60. Kopp, R. E. et al. Evolving understanding of Antarctic ice‐sheet physics and ambiguity in probabilistic sea‐level projections. Earths Future 5, 1217–1233 (2017).

61. Horton, B. P., Rahmstorf, S., Engelhart, S. E. & Kemp, A. C. Expert assessment of sea-level rise by AD 2100 and AD 2300. Quat. Sci. Rev. 84, 1–6 (2014).

62. Sweet, W. W. V. et al. Global and Regional Sea Level Rise Scenarios for the United States (2017).

63. Board, O. S. & Council, N. R. Sea-level Rise for the Coasts of California, Oregon, and Washington: Past, Present, and Future (National Academies Press, 2012).

64. Griggs, G. et al. Rising Seas in California-An Update on Sea-Level Rise Science (2017).

65. Barnard, P. L. et al. Dynamic flood modeling essential to assess the coastal impacts of climate change. Sci. Rep. 9, 1–13 (2019).

66. Wilson, R. et al. The search for geologic evidence of distant-source tsunamis using new field data in California: Chapter C in The SAFRR (Science Application for Risk Reduction) Tsunami Scenario. https://doi.org/10.3133/ofr20131170c (2014).

68. Kopp, R. E. et al. Probabilistic 21st and 22nd century sea‐level projections at a global network of tide‐gauge sites. Earths Future 2, 383–406 (2014).

69. Bamber, J. L. & Aspinall, W. P. An expert judgement assessment of future sea level rise from the ice sheets. Nat. Clim. Change 3, 424–427 (2013).

70. Pollard, D., DeConto, R. M. & Alley, R. B. Potential Antarctic Ice Sheet retreat driven by hydrofracturing and ice cliff failure. Earth Planet. Sci. Lett. 412, 112–121 (2015).

71. Melgar, D., Williamson, A. L. & Salazar-Monroy, E. F. Differences between heterogenous and homogenous slip in regional tsunami hazards modelling. Geophys. J. Int. 219, 553–562 (2019).

72. Strasser, F. O., Arango, M. C. & Bommer, J. J. Scaling of the source dimensions of interface and intraslab subduction-zone earthquakes with moment magnitude. Seismol. Res. Lett. 81, 941–950 (2010).

73. Mandli, K. T. et al. Clawpack: building an open source ecosystem for solving hyperbolic PDEs. PeerJ Comput. Sci. 2, e68 (2016).

74. Gonzalez, F. et al. in Results of the 2011 NTHMP Model Benchmarking Workshop (2011).

75. Melgar, D. et al. Local tsunami warnings: perspectives from recent large events. Geophys. Res. Lett. 43, 1109–1117 (2016).

76. MacInnes, B. T., Gusman, A. R., LeVeque, R. J. & Tanioka, Y. Comparison of earthquake source models for the 2011 Tohoku event using tsunami simulations and near‐field observations. Bull. Seismol. Soc. Am. 103, 1256–1274 (2013).

77. Melgar, D. & Bock, Y. Kinematic earthquake source inversion and tsunami runup prediction with regional geophysical data. J. Geophys. Res. Solid Earth 120, 3324–3349 (2015).

78. Amante, C. & Eakins, B. W. ETOPO1 Arc-Minute Global Relief Model: Procedures, Data Sources and Analysis (2009).

79. NOAA. NOAA Report- Heavy Precipitation Event Southern California January 7–11. https://www.cnrfc.noaa.gov/storm_summaries/jan2005storms.php (2005).

80. United States Geological Survey. Catalog USGS. earthquake.usgs.gov/earthquakes/search/.

82. Weichert, D. H. Estimation of the earthquake recurrence parameters for unequal observation periods for different magnitudes. Bull. Seismol. Soc. Am. 70, 1337–1346 (1980).

## Acknowledgements

This work was supported by funding from National Science Foundation awards to T.D. (EAR-1624795), T.D. and B.P.H. (EAR-1624533), R.W. (DGE-1735139 and GLD-1630099), A.J.G. (EAR-1625150), and R.E.K. (ICER-1663807), and from the National Aeronautics and Space Administration to R.E.K. (80NSSC17K0698). B.P.H. is also supported by the Singapore Ministry of Education Academic Research Fund MOE2019-T3-1-004 and MOE2018-T2-1-030, the National Research Foundation Singapore, and the Singapore Ministry of Education, under the Research Centers of Excellence initiative. R.C.W., R.W.B., C.S.M., and A.R.N. are supported by the Earthquake Hazard Program of the U.S. Geological Survey. This work is a contribution to PALSEA2 (Palaeo-Constraints on Sea-Level Rise) and the International Geoscience Programme (IGCP) Project 639 and 725. This work is Earth Observatory of Singapore contribution 417. Any use of trade, firm, or product names is for descriptive purposes only and does not imply endorsement by the U.S. Government.

## Author information

Authors

### Contributions

T.D., A.J.G., R.W., and B.P.H. led the writing of the main text, with contributions from other authors. T.D., R.W., and A.J.G. prepared the figures and tables. R.W. ran and analyzed the earthquake and tsunami simulations. A.J.G. and R.E.K. produced the local probabilistic sea-level rise projections. C.S.M. constructed the earthquake catalog. S.E.E., R.C.W., R.W.B, and A.R.N. contributed to the earthquake modeling and preparation of the manuscript.

### Corresponding author

Correspondence to Tina Dura.

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Peer review information

Nature Communications thanks Jörn Behrens, Debi Kilb, and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Peer reviewer reports are available.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Dura, T., Garner, A.J., Weiss, R. et al. Changing impacts of Alaska-Aleutian subduction zone tsunamis in California under future sea-level rise. Nat Commun 12, 7119 (2021). https://doi.org/10.1038/s41467-021-27445-8

• Accepted:

• Published:

• DOI: https://doi.org/10.1038/s41467-021-27445-8


text: References of "Discrete Applied Mathematics"      in Complete repository Arts & humanities   Archaeology   Art & art history   Classical & oriental studies   History   Languages & linguistics   Literature   Performing arts   Philosophy & ethics   Religion & theology   Multidisciplinary, general & others Business & economic sciences   Accounting & auditing   Production, distribution & supply chain management   Finance   General management & organizational theory   Human resources management   Management information systems   Marketing   Strategy & innovation   Quantitative methods in economics & management   General economics & history of economic thought   International economics   Macroeconomics & monetary economics   Microeconomics   Economic systems & public economics   Social economics   Special economic topics (health, labor, transportation…)   Multidisciplinary, general & others Engineering, computing & technology   Aerospace & aeronautics engineering   Architecture   Chemical engineering   Civil engineering   Computer science   Electrical & electronics engineering   Energy   Geological, petroleum & mining engineering   Materials science & engineering   Mechanical engineering   Multidisciplinary, general & others Human health sciences   Alternative medicine   Anesthesia & intensive care   Cardiovascular & respiratory systems   Dentistry & oral medicine   Dermatology   Endocrinology, metabolism & nutrition   Forensic medicine   Gastroenterology & hepatology   General & internal medicine   Geriatrics   Hematology   Immunology & infectious disease   Laboratory medicine & medical technology   Neurology   Oncology   Ophthalmology   Orthopedics, rehabilitation & sports medicine   Otolaryngology   Pediatrics   Pharmacy, pharmacology & toxicology   Psychiatry   Public health, health care sciences & services   Radiology, nuclear medicine & imaging   Reproductive medicine (gynecology, andrology, obstetrics)   Rheumatology   Surgery   Urology & nephrology   Multidisciplinary, general & others Law, criminology & political science   Civil law   Criminal law & procedure   Criminology   Economic & commercial law   European & international law   Judicial law   Metalaw, Roman law, history of law & comparative law   Political science, public administration & international relations   Public law   Social law   Tax law   Multidisciplinary, general & others Life sciences   Agriculture & agronomy   Anatomy (cytology, histology, embryology...) & physiology   Animal production & animal husbandry   Aquatic sciences & oceanology   Biochemistry, biophysics & molecular biology   Biotechnology   Entomology & pest control   Environmental sciences & ecology   Food science   Genetics & genetic processes   Microbiology   Phytobiology (plant sciences, forestry, mycology...)   Veterinary medicine & animal health   Zoology   Multidisciplinary, general & others Physical, chemical, mathematical & earth Sciences   Chemistry   Earth sciences & physical geography   Mathematics   Physics   Space science, astronomy & astrophysics   Multidisciplinary, general & others Social & behavioral sciences, psychology   Animal psychology, ethology & psychobiology   Anthropology   Communication & mass media   Education & instruction   Human geography & demography   Library & information sciences   Neurosciences & behavior   Regional & inter-regional studies   Social work & social policy   Sociology & social sciences   Social, industrial & organizational psychology   Theoretical & cognitive psychology   Treatment & clinical psychology   Multidisciplinary, general & others     Showing results 1 to 9 of 9 1 Quadratization of symmetric pseudo-Boolean functionsAnthony, Martin; Boros, Endre; Crama, Yves et alin Discrete Applied Mathematics (2016), 203A pseudo-Boolean function is a real-valued function $f(x)=f(x_1,x_2,\ldots,x_n)$ of $n$ binary variables; that is, a mapping from $\{0,1\}^n$ to ${\bbr}$. For a pseudo-Boolean function $f(x)$ on $\{0,1 ... [more ▼]A pseudo-Boolean function is a real-valued function$f(x)=f(x_1,x_2,\ldots,x_n)$of$n$binary variables; that is, a mapping from$\{0,1\}^n$to${\bbr}$. For a pseudo-Boolean function$f(x)$on$\{0,1\}^n$, we say that$g(x,y)$is a quadratization of$f$if$g(x,y)$is a Quadratic polynomial depending on$x$and on$m$auxiliary binary variables$y_1,y_2,\ldots,y_m$such that$f(x)= \min \{ g(x,y) : y \in \{0,1\}^m \} $for all$x \in \{0,1\}^n$. By means of quadratizations, minimization of$f$is reduced to minimization (over its extended set of variables) of the quadratic function$g(x,y)$. This is of some practical interest because minimization of quadratic functions has been thoroughly studied for the last few decades, and much progress has been made in solving such problems exactly or heuristically. A related paper initiated a systematic study of the minimum number of auxiliary$y$-variables required in a quadratization of an arbitrary function$f$(a natural question, since the complexity of minimizing the quadratic function$g(x,y)$depends, among other factors, on the number of binary variables). In this paper, we determine more precisely the number of auxiliary variables required by quadratizations of \emph{symmetric} pseudo-Boolean functions$f(x)$, those functions whose value depends only on the Hamming weight of the input$x\$ (the number of variables equal to 1). [less ▲]Detailed reference viewed: 85 (12 ULg) Influence and interaction indexes for pseudo-Boolean functions: a unified least squares approachMarichal, Jean-Luc; Mathonet, Pierre in Discrete Applied Mathematics (2014), 179The Banzhaf power and interaction indexes for a pseudo-Boolean function (or a cooperative game) appear naturally as leading coefficients in the stan- dard least squares approximation of the function by a ... [more ▼]The Banzhaf power and interaction indexes for a pseudo-Boolean function (or a cooperative game) appear naturally as leading coefficients in the stan- dard least squares approximation of the function by a pseudo-Boolean func- tion of a specified degree. We first observe that this property still holds if we consider approximations by pseudo-Boolean functions depending only on specified variables. We then show that the Banzhaf influence index can also be obtained from the latter approximation problem. Considering cer- tain weighted versions of this approximation problem, we introduce a class of weighted Banzhaf influence indexes, analyze their most important properties, and point out similarities between the weighted Banzhaf influence index and the corresponding weighted Banzhaf interaction index. We also discuss the issue of reconstructing a pseudo-Boolean function from prescribed influences and point out very different behaviors in the weighted and non-weighted cases. [less ▲]Detailed reference viewed: 13 (1 ULg) The interval ordering problemDurr, Christophe; Queyranne, Maurice; Spieksma, Frits C.R. et alin Discrete Applied Mathematics (2012)Detailed reference viewed: 12 (0 ULg) Approximations of Lovász extensions and their induced interaction indexMarichal, Jean-Luc; Mathonet, Pierre in Discrete Applied Mathematics (2008), 156(1), 11-24The Lovasz extension of a pseudo-Boolean function f : (0, 1)(n) -> R is defined on each simplex of the standard triangulation of [0, 1](n) as the unique affine function (f) over cap : [0, 1](n) -> R that ... [more ▼]The Lovasz extension of a pseudo-Boolean function f : (0, 1)(n) -> R is defined on each simplex of the standard triangulation of [0, 1](n) as the unique affine function (f) over cap : [0, 1](n) -> R that interpolates f at the n + 1 vertices of the simplex. Its degree is that of the unique multilinear polynomial that expresses f. In this paper we investigate the least squares approximation problem of an arbitrary Lovasz extension (f) over cap by Lovasz extensions of (at most) a specified degree. We derive explicit expressions of these approximations. The corresponding approximation problem for pseudo-Boolean functions was investigated by Hammer and Holzman [Approximations of pseudo-Boolean functions; applications to game theory, Z. Oper. Res. 36(1) (1992) 3-21] and then solved explicitly by Grabisch et al. [Equivalent representations of set functions, Math. Oper. Res. 25(2) (2000) 157-178], giving rise to an alternative definition of Banzhaf interaction index. Similarly we introduce a new interaction index from approximations of (f) over cap and we present some of its properties. It turns out that its corresponding power index identifies with the power index introduced by Grabisch and Labreuche [How to improve acts: an alternative representation of the importance of criteria in MCDM, Internat. J. Uncertain. Fuzziness Knowledge-Based Syst. 9(2) (2001) 145-157]. (c) 2007 Elsevier B.V. All rights reserved. [less ▲]Detailed reference viewed: 64 (10 ULg) Counting and enumerating aggregate classifiersAdem, Jan; Crama, Yves ; Gochet, Willy et alin Discrete Applied Mathematics (2008), 156(3), 2459-2468We propose a generic model for the "weighted voting" aggregation step performed by several methods in supervised classification. Further, we construct an algorithm to count the number of distinct ... [more ▼]We propose a generic model for the "weighted voting" aggregation step performed by several methods in supervised classification. Further, we construct an algorithm to count the number of distinct aggregate classifiers that arise in this model. When there are only two classes in the classification problem, we show that a class of functions that arises from aggregate classifiers coincides with the class of self-dual positive threshold Boolean functions. [less ▲]Detailed reference viewed: 48 (14 ULg) Consensus algorithms for the generation of all maximal bicliquesAlexe, Gabriela; Alexe, Sorin; Crama, Yves et alin Discrete Applied Mathematics (2004), 145(1 Sp. Iss. SI), 11-21We describe a new algorithm for generating all maximal bicliques (i.e. complete bipartite. not necessarily induced subgraphs) of a graph. The algorithm is inspired by, and is quite similar to. the ... [more ▼]We describe a new algorithm for generating all maximal bicliques (i.e. complete bipartite. not necessarily induced subgraphs) of a graph. The algorithm is inspired by, and is quite similar to. the consensus method used in propositional logic. We show that some variants of the algorithm are totally polynomial, and even incrementally polynomial. The total complexity of the most efficient variant of the algorithms presented here is polynomial in the input size. and only linear in the output size. Computational experiments demonstrate its high efficiency on randomly generated graphs with up to 2000 vertices and 20,000 edges. (C) 2003 Elsevier B.V. All rights reserved. [less ▲]Detailed reference viewed: 88 (6 ULg) The maximum deviation just-in-time scheduling problemBrauner, Nadia; Crama, Yves in Discrete Applied Mathematics (2004), 134(1-3), 25-50This note revisits the maximum deviation just-in-time (MDJIT) scheduling problem previously investigated by Steiner and Yeomans. Its main result is a set of algebraic necessary and sufficient conditions ... [more ▼]This note revisits the maximum deviation just-in-time (MDJIT) scheduling problem previously investigated by Steiner and Yeomans. Its main result is a set of algebraic necessary and sufficient conditions for the existence of a MDJIT schedule with a given objective function value. These conditions are used to provide a finer analysis of the complexity of the MDJIT problem. The note also investigates various special cases of the MDJIT problem and suggests several questions for further investigation. (C) 2003 Elsevier B.V. All rights reserved. [less ▲]Detailed reference viewed: 181 (5 ULg) The commutative closure of a binary slip-language is context-free: a new proofRigo, Michel in Discrete Applied Mathematics (2003), 131(3), 665-672Using original arguments about sets of integers satisfying some first-order formula of the Presburger arithmetic , we give a new proof that the commutative closure of a slip-language over a two ... [more ▼]Using original arguments about sets of integers satisfying some first-order formula of the Presburger arithmetic , we give a new proof that the commutative closure of a slip-language over a two letters alphabet is context-free. (C) 2003 Elsevier B.V. All rights reserved. [less ▲]Detailed reference viewed: 19 (4 ULg) Production planning problems in printed circuit board assemblyCrama, Yves ; van de Klundert, Joris; Spieksma, Frits CRin Discrete Applied Mathematics (2002), 123(1-3), 339-361This survey describes some of the main optimization problems arising in the context of production planning for the assembly of printed circuit boards. The discussion is structured around a hierarchical ... [more ▼]This survey describes some of the main optimization problems arising in the context of production planning for the assembly of printed circuit boards. The discussion is structured around a hierarchical decomposition of the planning process into distinct optimization subproblems, addressing issues such as the assignment of board types to machine groups, the allocation of component feeders to individual machines, the determination of optimal production sequences, etc, The paper reviews the literature on this topic with an emphasis on the most recent developments, on the fundamental structure of the mathematical models and on the relation between these models and some 'environmental' variables such as the layout of the shop or the product mix. (C) 2002 Elsevier Science B.V, All rights reserved. [less ▲]Detailed reference viewed: 358 (7 ULg) 1

format: plain


text:
Groups with an automorphism of prime order that is almost regular in the sense of rank

Khukhro, E. I. (2008) Groups with an automorphism of prime order that is almost regular in the sense of rank. J. London Math. Soc., 77. pp. 130-148.

Let $\varphi$ be an automorphism of prime order $p$ of a finite group $G$, and let $r$ be the (Pr\"ufer) rank of the fixed-point subgroup $C_G(\varphi )$. It is proved that if $G$ is nilpotent, then there exists a characteristic subgroup $C$ of nilpotency class bounded in terms of $p$ such that the rank of $G/C$ is bounded in terms of $p$ and $r$. For infinite (locally) nilpotent groups a similar result holds if the group is torsion-free (due to Makarenko), or periodic, or finitely generated; but examples show that these additional conditions cannot be dropped, even for nilpotent groups. As a corollary when $G$ is an arbitrary finite group, the combination with the recent theorems of the author and Mazurov gives characteristic subgroups $R\leqslant N\leqslant G$ such that $N/R$ is nilpotent of class bounded in terms of $p$, while the ranks of $R$ and $G/N$ are bounded in terms of $p$ and $r$ (under the additional unavoidable assumption that $p\nmid |G|$ if $G$ is insoluble); in general it is impossible to get rid of the subgroup~$R$. The inverse limit argument yields corresponding consequences for locally finite groups.


text:
# <<Notation raises warnings

In a completely fresh kernel (after Quit[]ing), when I do

<<Notation

I am met with

Join::incpt: Incompatible elements in Join[<|intt ->RowBox[{\[Integral],
RowBox[{\[SelectionPlaceholder] ,RowBox[{\[DifferentialD],\[Placeholder] }]}]}],
dintt ->RowBox[{SubsuperscriptBox[\[Integral],\[SelectionPlaceholder] ,
\[Placeholder] ],RowBox[{\[Placeholder] ,RowBox[{\[DifferentialD],\[Placeholder] }]}]}],
rintt ->RowBox[{UnderscriptBox[\[Integral],RowBox[{\[SelectionPlaceholder] ,
\[Element],\[Placeholder] }]],\[Placeholder] }],<<42>>,
cS ->TemplateBox[{},CombinatorS ],cW ->TemplateBox[{},CombinatorW ],
cY ->TemplateBox[{},CombinatorY ]|>,{<<1>>},{<<1>>},<<5>>,{<<1>>},{<<1>>},<<3>>]
cannot be joined.

And another similarly dense error message; both are shown in the image below.

Of course, Join::incpt doesn't link to anything in the documentation, and it's not clear at all what this warning/error means.

Questions:

• Since it's in the Notation package, I think this is Wolfram's problem?
• Does it happen for others?

In case it matters, I am using \$Version == "12.3.0 for Mac OS X x86 (64-bit) (May 10, 2021)". I don't think this happened with recent previous versions.

If so:

• Is it a bug?
• Can you find an example expression that looks like it is correct notation but fails because of this warning?

If not (since @Rohit Namjoshi is unable to reproduce on the same version):

• What might I have done to my installation that caused this?
• Unable to reproduce on "12.3.0 for Mac OS X x86 (64-bit) (May 10, 2021)". Jun 22 at 15:25
• Hmmm THAT is odd. Jun 22 at 15:26
• I'm seeing exactly the same Join: Incompatible elements .... error with 12.3.0 for Mac OS X x86 (64-bit) (May 10, 2021) under macOS Big Sur 11.4. Jun 22 at 15:48
• I'm also on Big Sur 11.4 [macOS 11.4 (20F71)]; on a Intel chip. @RohitNamjoshi are you on 11.4? Intel chip or apple silicon? Jun 22 at 15:50
• Can confirm that this also happens on 12.3 for Windows 10 Jun 22 at 16:05

## 1 Answer

It looks like they changed InputAliases from a list to an association, but this doesn't seem to be properly documented as far as I can tell. And clearly, they also did not update the Notation  package to support the new syntax. Until they fix it, you can use the following code to load the Notation  package without any errors:

InternalInheritedBlock[
{SetDelayed},
Unprotect@SetDelayed;
HoldPattern[
NotationAddInputAlias[args___] :=
With[v : {s_ = _, o_ = _},
With[_, SetOptions[n_, InputAliases -> Join[_, _]]]]] :=
(
NotationAddInputAlias[args] :=
With[v, SetOptions[n, InputAliases -> Join[o, <|s|>]]]
);
<< Notation
]

This effectively fixes the two offending definitions of AddInputAlias such that they work properly with the new format.

You might also need to reset the value of InputAliases to the state before Notation  broke it:

SetOptions[$$FrontEnd, InputAliases -> FirstCase[ Quiet@CurrentValue[$$FrontEnd, InputAliases],
_Association,
Inherited,
All
]
]
`


text:
Tutorials
data manipulation
+3

# Exploratory Data Analysis of Craft Beers: Data Profiling

In this tutorial, you'll learn about exploratory data analysis (EDA) in Python, and more specifically, data profiling with pandas.

Editor's note: Jean-Nicholas Hould is a data scientist at Intel Security in Montreal and he teaches how to get started in data science on his blog.

Exploratory data analysis (EDA) is a statistical approach that aims at discovering and summarizing a dataset. At this step of the data science process, you want to explore the structure of your dataset, the variables and their relationships.

In this post, you’ll focus on one aspect of exploratory data analysis: data profiling.

Data profiling is all about summarizing your dataset through descriptive statistics. You want to use a plethora of measurements to better understand your dataset. Data types, missing values, mean, median and standard deviation are just a few of the many elements you’ll need to gather when profiling a dataset. The goal of data profiling is to have a solid understanding of your data so you can afterwards start querying and visualizing your data in various ways.

## Know Where Your Data Comes From

Before jumping in any EDA, you should know as much as possible on the provenance of the data you are analyzing. You need to understand how the data was collected and how it was processed. Are there any past transformations on the data that could affect your analysis?

• How was it collected?
• Is it a sample?
• Was it properly sampled?
• Was the dataset transformed in any way?
• Are there some know problems on the dataset?

If you don’t understand where the data is coming from, you will have a hard time drawing any meaningful conclusions from the dataset. You are also at risk of making very important analysis mistakes.

Additionally, you should make sure the dataset is structured in a standardized manner. The recommended format is the third normal form, also named tidy data. A “tidy” dataset has the following attributes:

• Each variable forms a column and contains values
• Each observation forms a row
• Each type of observational unit forms a table

Respecting this standardized format will speed up your analysis since this it’s compatible with many tools and libraries.

## Data Profiling

In this post, you will use a dataset of Craft Beers from the CraftCans website. This dataset only contains data from canned beers from breweries in the United States. It’s not clear from the website if this dataset reports every single canned beer brewed in the US or not. To be safe, you will consider this dataset to be a sample that may contain biases.

Here is the structure of the datasets you’ll be using:

Beers:

• ID: Unique identifier of the beer.
• Name: Name of the beer.
• ABV: Alcohol by volume of the beer.
• IBU: International Bittering Units of the beer.
• Style: Style of the beer.
• Ounces: Ounces of beer.

Breweries:

• ID: Unique identifier of the brewery.
• Name: Name of the brewery.
• City: City where the brewery is located.
• State: State where the brewery is located.

### Data Types

The first step is to understand the composition of your dataset.

What variables are you dealing with?

You can generally fit the data in one of those categories:

• Numerical
• Categorical
• Text
• Date

You’ll first import the datasets that you can find in this repository with pandas’ from_csv function. You’ll also join the beers and breweries datasets together to facilitate analysis down the road.

import pandas as pd

beers = pd.DataFrame.from_csv("https://raw.githubusercontent.com/nickhould/craft-beers-dataset/master/data/craftcans_beers.csv")
breweries = pd.DataFrame.from_csv("https://raw.githubusercontent.com/nickhould/craft-beers-dataset/master/data/craftcans_breweries.csv")

beers_and_breweries = pd.merge(beers,
breweries,
how='inner',
left_on="brewery_id",
right_on="id",
sort=True,
suffixes=('_beer', '_brewery'))

With the pandas library, you can run the function dtypes to list each column and their data types.

beers.dtypes

Which gives you the following result:

abv           float64
ibu           float64
id              int64
name           object
style          object
brewery_id      int64
ounces        float64
dtype: object

As you can see above, that function doesn’t do a clean grouping of the different data types. The various numerical data types (float64 and int64) are not grouped into a single category as we would like to. Also, some columns are listed as objects which is not very helpful.

To go around this, you can build your own function that will determine the category of each column in a DataFrame.

def get_var_category(series):
unique_count = series.nunique(dropna=False)
total_count = len(series)
if pd.api.types.is_numeric_dtype(series):
return 'Numerical'
elif pd.api.types.is_datetime64_dtype(series):
return 'Date'
elif unique_count==total_count:
return 'Text (Unique)'
else:
return 'Categorical'

def print_categories(df):
for column_name in df.columns:
print(column_name, ": ", get_var_category(df[column_name]))

#### Beers Variables

print_categories(beers)

The command above gives you back the following result:

abv :  Numerical
ibu :  Numerical
id :  Numerical
name :  Categorical
style :  Categorical
brewery_id :  Numerical
ounces :  Numerical

#### Breweries Variables

print_categories(breweries)

Which gives you the following result:

name :  Categorical
city :  Categorical
state :  Categorical
id :  Numerical

With this information, you can already better understand our dataset. You know that you are dealing only with categorical and numerical data. Numerical variables can be used to extract many different measurements such as the mean, standard deviation, etc. Categorical variables are generally an interesting way of segmenting and grouping the data. For example, you might want to understand how the IBU differs between the various styles of beers.

### Descriptive Statistics

In this section, you’ll walk through various descriptive statistics that can be used to better understand our data. You’ll notice that each of those measurements in isolation is not very helpful. The combination of those different measurement is where you can extract the most value.

You will focus on the IBU variable because it is a numerical variable. This type of variable offers a broader range of measurements than the categorical variables. You can still run measurements on your categorical variables but you will be much more limited.

#### Length

The len function counts the number of observations in a Series. The function will count all observations, regardless if there are missing or null values.

length = len(beers["ibu"])
print(length)

In this Series we have a total of 2410 observations.

#### Count

The count function will return the number of non-NA/non-null observations in a Series.

count = beers["ibu"].count()
print(count)

As you can see, you have 1405 non-null observations in the Series.

#### Missing Values

With the Length and the Count, we are now able to calculate the number of missing values. The number of missing values is the difference between the Length and the Count.

number_of_missing_values = length - count
pct_of_missing_values = float(number_of_missing_values / length)
pct_of_missing_values = "{0:.1f}%".format(pct_of_missing_values*100)
print(pct_of_missing_values)

To output the missing values as a percentage, you simply divide the number of missing values by the total number of observations, the length. The float function is used to make sure the decimals are captured in the division. The format function is used to nicely format the number as a percentage.

In this case, you are missing almost 42% of the IBU variable. This is important for you to know because it will affect your analysis. Most of the descriptive statistics will ignore those missing values and this will certainly cause a bias.

#### Minimum/Maximum Value

The minimum and maximum value of a dataset can easily be obtained with the min and max function on a Series.

print("Minimum value: ", beers["ibu"].min())
print("Maximum value: ", beers["ibu"].max())

The min/max values are helpful to understand the range of values in a variable. In this case, the IBU ranges from 4 to 138.

#### Mode

The mode is the most frequent value in a dataset. It can be obtained using the mode function on a Series.

print(beers["ibu"].mode())

In a normal distribution, the mode is equal to the mean and median.

In this case, the mode of the IBU variable is 20. It is the most frequent IBU in our dataset.

#### Mean

The mean is a measure of central tendency. It represents the sum of the values divided by the count of non-missing observations.

It can be obtained with the mean function on a Series.

mean = beers["ibu"].mean()

The mean is prone to be influenced by outliers. A few extreme values can greatly change the mean, dragging it up or down.

#### Median

The median is also a measure of central tendency. It is the number exactly in the middle of an ordered list of numerical values.

median = beers["ibu"].median()

In the case of skewed distributions, the median is a much better measure of central tendency than the mean.

In the case of the IBU distribution, the mean and the median are in the same orders of magnitude.

#### Standard Deviation

The standard deviation is a measure of dispersion. A high standard deviation indicates the data points are spread over a wide range of values. The standard deviation is expressed in the same unit as the values.

standarddev = beers["ibu"].std()

In this case, the standard deviation is ~26. 25.954065911259324 to be exact. If the distribution of IBU was a normal distribution, you would know that ~68% of the observations are within one standard deviation of the mean.

#### Quantile Statistics

Quantiles are cut points that split a distribution in equal sizes. Many quantiles have their own name. If you split a distribution into four equal groups, the quantile you created is named quartile. You can easily create quantile using the quantile function on a Series. You can pass to that function an array with the different quantiles to compute. In the case below, we want to split our distribution in four equal groups.

quantile = beers["ibu"].quantile([.25, .5, .75])

 0.25 21.0 0.50 35.0 0.75 64.0 Name: ibu, dtype: float64

As you can see above, the 50% quantile is equal to the median. It is the value that splits the dataset in half. You can also note that 75% of the observations are equal or below to 64 IBU. Furthermore, 50% of the distribution is located between 21 and 64 IBU. It’s important to note that the missing values are not taken into account in those metrics.

#### Distribution Plots

Visualizations are very useful in exploratory data analysis. In this post, we will not go over the topic visualizations. However, we can’t talk about data profiling without mentioning the importance of a frenquency-distribution plot. It is one of the simplest yet most powerful visualization. It demonstrates the frequency of each value in our dataset.

To create this visualization, we are using the seaborn library with thedisplotfunction. This function expects aSeries with no missing values.

import seaborn as sns
sns.set(color_codes=True)
sns.set_palette(sns.color_palette("muted"))

sns.distplot(beers["ibu"].dropna());

In this distribution plot, you can clearly see a few of the values we previously calculated. The minimal value is close to 0 IBU and the maximum value is close to 140 IBU. You clearly see that the most frequent value is close to 20 IBU. Additionally to this information, we now see a peak close to 60 IBU.

Why are there two peaks in this distribution?

What can explain this? This is an aspect that we can explore in the second phase of exploratory data analysis.

#### Correlations

Correlations are a great way to discover relationships between numerical variables. There are various ways to calculate the correlation. The Pearson correlation coefficient is a widely used approach that measures the linear dependence between two variables. The correlation coefficient ranges from -1 to 1. A correlation of 1 is a total positive correlation, a correlation of -1 is a total negative correlation and a correlation of 0 is non-linear correlation. We can perform that calculation using the corr function on a Series. By default, this function will use the Pearson correlation coefficient calculation. It is possible to use different methods of calculation with this function.

beers[["abv", "ibu", "ounces"]].corr()
 abv ibu ounces abv 1 0.670621 0.172529 ibu 0.670621 1 0.054691 ounces 0.172529 0.054691 1

As you can see above, the correlation between IBU and itself is 1. Obviously, numerical variables are perfectly correlated with themselves. More interestingly, you can see that the correlation of the ABV and IBU is equal to 0.670621. While this is not a total positive correlation, it is still highly correlated. This is an interesting aspect that we can explore further down the road.

#### A few notes on non-numerical variables

The metrics that have been previously extracted are mostly applicable for numerical values only. If you are dealing with other types of data such as categorical data, you can still gather some interesting measurements. You could calculate the frequency of each value in the dataset.

DataFrame have a function named describe that summarizes the dataset. If your DataFrame only has categorical or text values, the summary will be adapted specifically for this type of data.

beers[["name", "style"]].describe()
 name style count 2410 2405 unique 2305 99 top Nonstop Hef Hop American IPA freq 12 424

### Profiling Libraries

As you’ve seen above, gathering descriptive statistics can be a tedious process. Gladly, there are libraries that exist that perform all of the data crunching for you. They output a very clear profile of your data. pandas-profiling is one of them. That library offers out-of-the-box statistical profiling of your dataset. Since the dataset we are using is tidy and standardized, we can use the library right away on our dataset.

import pandas_profiling

pandas_profiling.ProfileReport(beers_and_breweries)

### More Questions

Generally, once you have profiled your dataset, you have a lot more question on it than you initially had. This is great because those new questions will fuel your exploratory data analysis.

Here are a few questions that we have gathered while doing this profiling:

• 41.7% of the IBU values are missing. Why is that? How can that affect our analysis?
• There are two peaks in the IBU distribution. What explains this?
• What explains the correlation between IBU and ABV? What is the influence of the beer style in this correlation?
• Are there differences in the IBU, ABV or Style` between geographical regions? What about the East Coast vs the West Coast?

Data profiling is not a linear process. As you filter and segment your dataset, you will come back to it and gather descriptive statistics on subgroups of your data.

## Next Steps

In this post, you have seen how to profile a dataset. You now know how to attribute variables to specific data types groups. You have also calculated different descriptive statistics on the dataset and you understand how to interpret those measurements. Finally, you have seen that there are some libraries that can help you do the crunching to profile your dataset. More importantly, you have generated more questions than ever to fuel your exploratory data analysis.