The Species-Specific Location Drilldown tab provides a species-specific and location-specific visual overview for individual bird species. It displays species-specific observations for a given location as an interactive histogram, allowing the user to view the distribution of observations over the year and across different habitat types (locations). Users can make selections from the histogram to display a table view of specific observations. Users can launch a separate application to manually review individual observations from this table view.
User Inputs
User inputs are found on the sidebar for this tab.
| Input Name | Input Choices | Description |
| Model-Match Scale
‘Model Proximity’ or ‘Model Adherence’ |
Numerical value or range of values between 0 and 1. | This input allows you to filter that output on this tab based on BirdNET-Analyzer’s ‘Confidence’ attribute. We have renamed this input to ‘BirdNET Model-Match Scale’’ because BirdNET’s confidence isn’t actually a probability and is not related to confidence intervals. Read more about that here. |
| Species Lookup | Categorical selection based on species present in the dataset. Single selection only. | Note: The Species Lookup tool on this page behave differently than the Species Lookup tool in Prairie Haven Overview. On this tab, only one species can be selected. This controls what species is displayed on the page. |
| Plot Settings | Time interval choices:
· Week · Month |
This input controls how the histogram bins are defined. If a user selects week, data is grouped and displayed at a weekly interval. If a user selects month, data is grouped and displayed at a monthly interval. Weeks are defined as beginning on Sundays. Week 1 begins on the first Sunday of the year. |
| Cornell Ornithology Links | Button choices for launching a new window. | ‘All About Birds’ launches the Cornelll Ornithology All About Birds web page for the current species displayed.
‘Macaulay Library’ launches the Cornell Ornithology Macaulay Library web page for the current displayed species. |
Output Explanation
Histogram Output
Example histogram output for Species-Specific Location Drilldown
Data Table Output
Example data table output for Species-Specific Location Drilldown
Interacting with the Output
Hovering over bins to view plot details
Hovering over individual bins allows you to see details including Week #, Date range, and count of observations.
Selecting years in the legend
Toggle specific years in the legend on or off to display them in the plot.
Select bins in the histogram plot to display data table
One bin can be selected by a single click, or you can select multiple bins by holding down the shift key as you click. This will dynamically generate and display an associated data table for the selected bins.
Click the ‘Open Observation’ button from the data table to launch the application ‘Tiny Shiny’ to manually review the selected observation.
Notes for Admins
The starting point for this output is the data stored in `filtered_data`, which is the same data from Prairie Haven overview. It comes from our original FST file, but it is filtered based on the values in ‘Model Match’. The following steps describe how the histogram output is produced in the code:
- First, a for loop is used to sequence through each unique Location value in the dataset. For each location, `filtered_data` is filtered by the select Species and the current selected Location in the for loop. This filtered data is saved as the variable `species_data`. If there are no observations available for the species at this location, an informational message will display in the app.
- The `species_data` is grouped by year and saved as `complete_data`.
- Two new variables are saved, corresponding to the two options for viewing histogram (by Month and by Week). `count_data_week` divides each year of data into weekly bins, and calculates the number of observations in that bin. `count_data_month` divides each month of data into monthly bins, and calculates the number of observations in that bin.
- The output graph is produced using ggplot’s `geom_bar` function. This is saved as the variable `p`.
- `p` is converted into a plotly object which allows it to be interacted with by a user.
- Only the three most recent years of data are displayed in the histogram output by default, which is defined by the variable `recent_years`.
- Steps 2 – 6 are repeated for each unique Location value.
The data table output appears when a user selects one or more of the bins in the histogram output. The steps below outline how the data table is calculated and displayed:
- Each histogram bin in the plot has a ‘key’ that stores either `Year.Loc` for weekly intervals (i.e. 25,2023,Prairie) or `Month.Year.Loc` for monthly intervals (i.e. 6,2023,Wetland). When histogram bin(s) are selected in the plot, we updated a variable called `selected_data`with the ‘key’.
- Some generic filters then get applied to our filtered_data First we create a variable `species_data` which is filtered by the selected species and then formatted with new columns that contain the grouping variables (Week.Year.Loc and Month.Year.Loc).
- The code filters the dataset further by filtering based on the weekly or monthly key (depending on your time interval selection). It saves this output as `out_df`.
- Each row in the `out_df` gets a dynamically created ‘Open Observation button’ which redirects the user to a new application.
- The data tables is then rendered, displaying a subset of the original columns.






