Scripting the Oyster HSI from Theuerkauf et al. (2019)#


Problem Description

Theuerkauf et al. (2019) thumbnail
Figure 1. Theuerkauf et al. 2019 thumbnail

As an independent study topic, I took on the responsibility of learning and scripting the North Carolina oyster habitat suitability index (HSI) described in Theuerkauf et al. (2019). I worked under the guidance of my project team that included Dr. David Eggleston and Dr. Del Bohnenstiehl from NC State, Dr. Brandon Puckett from the National Oceanic and Atmospheric Administration (NOAA), and Bennett Paradis from the North Carolina Department of Marine Fisheries (NCDMF).

The goals of this effort were to script and document the HSI process, HSI comparison, and HSI to oyster density comparison to expedite the process and allow for a more streamlined analysis.


Analysis

To establish a firm understanding of the concept and application, I reviewed the paper linked in the Problem Description, as well as two other relavant papers. The project team helped me learn the structure of observed oyster data and also helped me understand how the data related to the HSI by testing with updated data alongside historical data for comparison. The team also advised me on the which explanatory variables should or should not be considered.

ReadMe page introduction
Figure 2. HSI readme document intro section
ReadMe page variables section sample
Figure 3. HSI readme document variables section

The exclusionary variables included: bathymetry, bottom type, shellfish leases, nursery areas, military zones, and navigational channels. The threshold variables included: salinity, larval import/export to different habitat types, dissolved oxygen, material stockpile sites, boat ramps, chlorophyll, and flow.

A data inventory, a ReadMe/user guide (see Figure 2 and Figure 3), and a script were packaged to organize the data and analysis into a user-friendly Python environment. The script includes logic to calculate the HSI, but also includes logic to perform further assessments such as HSI to HSI comparisons and relating HSI to oyster density.

The HSI calculation function within the tool includes two parameters that can be toggled to alter the scope of a specific HSI run: the model focus and the model type. The model can focus on either metapopulation persistence, water filtration, or both. The model type can be null (general), reproduction-based, or time-based.


Results

HSI compared to oyster density from 2007-2023
Figure 4. HSI and oyster density relationship

The results of the process are served via the Python console outputs, output data sheets, and graphs produced by the scripts. The input variables are used by the script to produce HSI estimates that can be compared.

The comparison function compares two sets of HSI results, which are the oldest and newest result files by default, but both datasets can be specified by the user. For example, the previous HSI run results shown in Figure 5 can be compared to the new results shown in Figure 6.

The script also automates the assessment of the relationship between HSI results and oyster density and an example output from that process is shown in Figure 4.

Original HSI map from the latest runs
Figure 5. Map of previous HSI run
Updated HSI map from the latest runs
Figure 6. Map of updated HSI run

Reflection

This project was a great opportunity to learn how spatial tools are developed and used for real-world applications. The project team seems eager to continue developing the tool further to become more data-driven and automated. I hope to continue working with them to make this a reality. It would be very fulfilling for me to assist in making improvements that would influence real-world decisions regarding our State’s critical habitats and natural resources.


Automating Output Visuals for Venus Flytrap observations using Python and HTML#


Problem Description

To streamline the process of producing some visual outputs for my Venus Flytrap project, I decided to create a script to automate the process. The project focuses on identifying the overlap between expected Venus flytrap habitats and field observations, to highlight areas where researchers should visit.

Based on user inputs, contextual visuals need to be produced by the script to show research-grade iNaturalist observations being considered in the analysis. The goal of this effort was to produce a static web page showing flytrap observation images and details for all observations that meet the user-defined criteria.


Analysis

ArcTools GUI for the process
Figure 1. ArcTools user interface for static web page generation
Python code to create html output
Figure 2. Python code used to generate static web pages

The process is bundled in within an ArcGIS Toolbox (see Figure 1) to present the user with an easy-to-use graphical interface for setting their desired criteria.

The primary criteria set by the user are the count of observations and cutoff year. These criteria filter the observations for the user's focus region and limits all outputs to the same scope.

The script used for automating the static web page generation is shown below in Figure 2.


Results

Web map resulting from ArcServer content
Figure 3. Example output web page of flytrap observations

An example output static web page is shown in Figure 3. The process leverages Python to automate the generation of custom html code that is defined by user criteria.


Reflection

This effort helped me learn how to automate the generation of HTML code using Python. This made it easy to integrate these steps with my existing processes. In the future, it would be nice expand on this by customizing style of the static pages.