Spaces:
Running
Running
box::use(highcharter[highchart, | |
hcaes, | |
hc_title, | |
hc_xAxis, | |
hc_yAxis, | |
hc_tooltip]) | |
box::use(dplyr[filter]) | |
#* @param df data frame containing the data | |
#* @param vernacular the vernacular names of the animals | |
plotData <- function(df,vernacular,locality) { | |
df |> | |
filter(vernacularName == vernacular,locality == locality) |> | |
hchart( | |
type = "scatter", | |
hcaes(x = eventDate, | |
y = individualCount)) |> | |
hc_title(text = "Biodiversity in Poland") |> | |
hc_xAxis(title = list(text = "Event Date")) |> | |
hc_yAxis(title = list(text = "Individual Count")) |> | |
hc_tooltip( | |
pointFormat = 'Date: {point.x:%Y-%m-%d}<br>Individual Count: {point.y:.2f}' | |
) | |
} | |
# plotData(bio_pol, | |
# vernacular = "Mandarin Duck") | |