Butterfly species richness in Los Angeles



This dashboard presents open data (iNaturalist and BioScan) from Prudic, K.L.; Oliver, J.C.; Brown, B.V.; Long, E.C. Comparisons of Citizen Science Data-Gathering Approaches to Evaluate Urban Butterfly Diversity. Insects 2018, 9, 186. In their study, Prudic and colleagues compared citizen science with traditional methods in the measurement of butterfly populations.

I developed this dashboard after reproducing the analyses of the original study in a Reprohack session.

My coding tasks included transforming the data to a long format,

# There are pseudovariables, that is, observations entered as variables. Since most R processes 
# need the tidy format, convert below (see https://r4ds.had.co.nz/tidy-data.html).
# The specific numbers found through traps and crowdsourcing methods are preserved.

BioScan = BioScan %>% pivot_longer(
    cols = Anthocharis_sara:Vanessa_cardui, names_to = "Species",
    values_to = "Number", values_drop_na = TRUE
  )

# Compare
#str(BioScan)
#str(dat)
# 928 rows now; the result of 29 pseudo-variables being transposed into
# rows, interacting with 32 previous rows, i.e., 29 * 32 = 928.


merging three data sets,

# The iNaturalist data set presents a slightly different challenge from the pseudovariables found above.
# The number of animals of each species must be computed from repeated entries, per site.

iNaturalist = merge(iNaturalist, iNaturalist %>% count(species, site, name = 'Number'))


and, as ever, wrangling with the format of the dashboard pages to preserve the format of a table.

Species details {style="background-color: #FCFCFC;"}
=======================================================================

Column {style="data-width:100%; position:static; height:1000px;"}
-----------------------------------------------------------------------


Reference

Bernabeu, P. (2020). Dashboard with data from Prudic, Oliver, Brown, & Long (2018), Comparisons of Citizen Science Data-Gathering Approaches to Evaluate Urban Butterfly Diversity, Insects, 9, 186. Retrieved from https://pablobernabeu.github.io/dashboards/Butterfly-species-richness-in-LA/d.html.


Avatar
Pablo Bernabeu
Psychology PhD student and teaching assistant at Lancaster University

After doing a research master's, I became a PhD student and graduate teaching assistant in Psychology. I'm investigating how conceptual processing is supported by linguistic and sensorimotor brain systems. I use methods such as behavioural and electroencephalographic experiments, corpus analysis, statistics and programming.

comments powered by Disqus

Related