knitr::opts_chunk$set(echo = FALSE) library(plyr)
This document provides a preliminary data quality check for data collected by Region 7 MBM Waterfowl Division aerial surveys. Currently supported surveys include the Arctic Coastal Plain (ACP), Yukon-Kuskokwim Delta duck (YKD) and goose (YKG), Copper River Dusky (CRD), and North American Waterfowl Breeding Population (BPOP).
All data checks are currently using assumptions for data fields as expected to be written into protocols and summarized and analyzed using the R7MBM survey analysis R package AKaerial. For information and current version, see https://github.com/cfrost3/AKaerial.
You have chosen the file:
print(path.name)
For the area:
print(area)
We have standardized the mandatory column headings as:
r necessary
r if(s.colmatch != "green") {"\\begin{comment}"}
This file contains all of the required column names.
Status - GREEN
r if(s.colmatch != "green") {"\\end{comment}"}
r if(s.colmatch != "red") {"\\begin{comment}"}
This file does not contain all of the required column names.
r colnames(data)
Status - RED
r if(s.colmatch != "red") {"\\end{comment}"}
There are no spatial checks provided here. Spatial checks will be unique to the analysis.
Swan nests should only be recorded if a swan is also present (active). Correct notation is recording the nest as open, 1 and the associated swan on a separate entry as single or pair, 1.
r if(s.swan != "green") {"\\begin{comment}"}
All swan nests and associated swans appear to be recorded correctly.
Status - GREEN
r if(s.swan != "green") {"\\end{comment}"}
r if(length(test.swan$bad[,1]) == 0) {"\\begin{comment}"}
There are r length(test.swan$bad[,1])
not recorded as open, 1.
Status - RED
r if(length(test.swan$bad[,1]) == 0) {"\\end{comment}"}
r if(length(test.swan$missing[,1]) == 0) {"\\begin{comment}"}
There are r length(test.swan$missing[,1])
nests without associated swan records.
Status - RED
r if(length(test.swan$missing[,1]) == 0) {"\\end{comment}"}
The following Obs_Type codes are acceptable- single, pair, open, flkdrake. Leading or trailing spaces are not acceptable.
r if(s.unit != "green") {"\\begin{comment}"}
All Obs_Type codes appear to be recorded correctly.
Status - GREEN
r if(s.unit != "green") {"\\end{comment}"}
r if(length(test.unit$bad[,1]) == 0) {"\\begin{comment}"}
The following Obs_Type values are not acceptable (if more than 6, only the first 6 shown):
kableExtra::kable_styling(kableExtra::kable(head(test.unit$bad)))
Status - RED
r if(length(test.unit$bad[,1]) == 0) {"\\end{comment}"}
Seat codes must be either LF, RF, LR, or RR, and are case-sensitive.
r if(s.seat != "green") {"\\begin{comment}"}
All seat codes appear to be recorded correctly.
Status - GREEN
r if(s.seat != "green") {"\\end{comment}"}
r if(length(test.seat$bad[,1]) == 0) {"\\begin{comment}"}
The following seat values are not acceptable (first 6 shown):
kableExtra::kable_styling(kableExtra::kable(head(test.seat$bad)))
Status - RED
r if(length(test.seat$bad[,1]) == 0) {"\\end{comment}"}
The current list of acceptable species codes can be found at: https://github.com/cfrost3/AKaerial/tree/master/data/AKAerialSpeciesAOUCodes.csv
r if(s.species != "green") {"\\begin{comment}"}
All species codes appear to be recorded correctly, or at least an acceptable substitute is known (for any YELLOW status codes entered).
Status - GREEN
r if(s.species != "green") {"\\end{comment}"}
r if(length(test.species$change[,1]) == 0) {"\\begin{comment}"}
The following species codes are not acceptable and will be updated:
kableExtra::kable_styling(kableExtra::kable(table(test.species$change$Species)))
Status - YELLOW
r if(length(test.species$change[,1]) == 0) {"\\end{comment}"}
r if(length(test.species$bad[,1]) == 0) {"\\begin{comment}"}
The following species codes are not acceptable and no replacement is available:
kableExtra::kable_styling(kableExtra::kable(table(test.species$bad$Species)))
Status - RED
r if(length(test.species$bad[,1]) == 0) {"\\end{comment}"}
Observer intials must be input as 3 characters, all uppercase.
r if(s.observer != "green") {"\\begin{comment}"}
All observers appear to be recorded correctly.
Status - GREEN
r if(s.observer != "green") {"\\end{comment}"}
r if(s.observer != "red") {"\\begin{comment}"}
Some observer initials have been entered incorrectly.
print(unique(data$Observer))
Status - RED
r if(s.observer != "red") {"\\end{comment}"}
Must be numeric.
r if(s.year != "green") {"\\begin{comment}"}
All years appear to be recorded correctly.
Status - GREEN
r if(s.year != "green") {"\\end{comment}"}
r if(s.year != "red") {"\\begin{comment}"}
There are non-numeric values in Year. If more than 6, only the first 6 shown.
kableExtra::kable_styling(kableExtra::kable(head(data[test.year$bad, ])))
Status - RED
r if(s.year != "red") {"\\end{comment}"}
r if(s.month != "green") {"\\begin{comment}"}
All months appear to be recorded correctly.
Status - GREEN
r if(s.month != "green") {"\\end{comment}"}
r if(s.month != "red") {"\\begin{comment}"}
There are non-numeric values in Month. If more than 6, only the first 6 shown.
kableExtra::kable_styling(kableExtra::kable(head(data[test.month$bad, ])))
Status - RED
r if(s.month != "red") {"\\end{comment}"}
r if(s.day != "green") {"\\begin{comment}"}
All days appear to be recorded correctly.
Status - GREEN
r if(s.day != "green") {"\\end{comment}"}
r if(s.day != "red") {"\\begin{comment}"}
There are non-numeric values in Day. If more than 6, only the first 6 shown.
kableExtra::kable_styling(kableExtra::kable(head(data[test.day$bad, ])))
Status - RED
r if(s.day != "red") {"\\end{comment}"}
Must all be numeric (or NA).
r if(s.wind != "green") {"\\begin{comment}"}
All Wind_Vel values appear to be recorded correctly.
Status - GREEN
r if(s.wind != "green") {"\\end{comment}"}
r if(s.wind != "red") {"\\begin{comment}"}
There are non-numeric values in Wind_Vel. If more than 6, only the first 6 shown.
kableExtra::kable_styling(kableExtra::kable(head(data[test.wind$bad, ])))
Status - RED
r if(s.wind != "red") {"\\end{comment}"}
r if(s.lat != "green") {"\\begin{comment}"}
All Latitude values appear to be recorded correctly.
Status - GREEN
r if(s.lat != "green") {"\\end{comment}"}
r if(s.lat != "red") {"\\begin{comment}"}
There are non-numeric values in Lat. If more than 6, only the first 6 shown.
kableExtra::kable_styling(kableExtra::kable(head(data[test.lat$bad, ])))
Status - RED
r if(s.lat != "red") {"\\end{comment}"}
r if(s.lon != "green") {"\\begin{comment}"}
All Longitude values appear to be recorded correctly.
Status - GREEN
r if(s.lon != "green") {"\\end{comment}"}
r if(s.lon != "red") {"\\begin{comment}"}
There are non-numeric values in Lon. If more than 6, only the first 6 shown.
kableExtra::kable_styling(kableExtra::kable(head(data[test.lon$bad, ])))
Status - RED
r if(s.lon != "red") {"\\end{comment}"}
r if(s.time != "green") {"\\begin{comment}"}
All times appear to be recorded correctly.
Status - GREEN
r if(s.time != "green") {"\\end{comment}"}
r if(s.time != "red") {"\\begin{comment}"}
There are non-numeric values in Time. If more than 6, only the first 6 shown.
kableExtra::kable_styling(kableExtra::kable(head(data[test.time$bad, ])))
Status - RED
r if(s.time != "red") {"\\end{comment}"}
r if(s.delay != "green") {"\\begin{comment}"}
All delays appear to be recorded correctly.
Status - GREEN
r if(s.delay != "green") {"\\end{comment}"}
r if(s.delay != "red") {"\\begin{comment}"}
There are non-numeric values in Delay. If more than 6, only the first 6 shown.
kableExtra::kable_styling(kableExtra::kable(head(data[test.delay$bad, ])))
Status - RED
r if(s.delay != "red") {"\\end{comment}"}
r if(s.num != "green") {"\\begin{comment}"}
All group sizes (Num) appear to be recorded correctly.
Status - GREEN
r if(s.num != "green") {"\\end{comment}"}
r if(s.num != "red") {"\\begin{comment}"}
There are non-numeric values in Num. If more than 6, only the first 6 shown.
kableExtra::kable_styling(kableExtra::kable(head(data[test.num$bad, ])))
Status - RED
r if(s.num != "red") {"\\end{comment}"}
r if(s.code != "green") {"\\begin{comment}"}
All data codes appear to be recorded correctly.
Status - GREEN
r if(s.code != "green") {"\\end{comment}"}
r if(s.code != "red") {"\\begin{comment}"}
There are non-numeric values in Code. If more than 6, only the first 6 shown.
kableExtra::kable_styling(kableExtra::kable(head(data[test.code$bad, ])))
Status - RED
r if(s.code != "red") {"\\end{comment}"}
obs_plot= ggplot2::ggplot(data, ggplot2::aes(Obs_Type)) + ggplot2::geom_bar(fill = "#0073C2FF") sp_plot= ggplot2::ggplot(data, ggplot2::aes(Species)) + ggplot2::geom_bar(fill = "#0073C2FF") + ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 45, hjust = 1)) num_plot= ggplot2::ggplot(data, ggplot2::aes(Num)) + ggplot2::geom_bar(fill = "#0073C2FF") print(obs_plot) print(sp_plot) print(num_plot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.