## code to prepare `ForestGeoProfile` dataset goes here
ForestGeoProfile <-
list(
TreeHeightUnitMan = "none",
Family = "Family",
TreeHeight = "none",
Date = "ExactDate",
Month = "none",
Day = "none",
POM = "none",
HOM = "hom",
PlotAreaUnitMan = "none",
XTreeUTM = "none",
IdStem = "stemID",
PlotMan = "ForestGEO",
Species = "Species",
ScientificNameSepMan = "",
YTreePlot = "gy",
YTreeSubplot = "none",
CircUnitMan = "none",
BD = "none",
BDUnitMan = "none",
BPOM = "none",
BHOM = "none",
BHOMUnitMan = "none",
BCirc = "none",
BCircUnitMan = "none",
IdMeasure = "MeasureID",
IdLevel = "IDLevel",
TreeFieldNum = "tag",
ScientificName = "Latin",
DateFormatMan = "yyyy-mm-dd",
IdCensus = "CensusID",
PlotAreaMan = -999,
Year = "none",
LifeStatus = "DFstatus",
PlotArea = "none",
CommercialSp = "none",
SubplotAreaUnitMan = "none",
YTreeUTM = "none",
TreeUTMUnitMan = "none",
YearMan = -999,
Circ = "none",
SubplotAreaMan = -999,
SubplotMan = "",
Site = "none",
TreeLon = "none",
Plot = "none",
IdTree = "treeID",
LifeForm = "none",
VernName = "none",
SubplotArea = "none",
SiteMan = "",
IsLiveMan = c("alive", "broken below"),
TreeCodes = "codes",
TreeCodesSepMan = "[[:punct:]]",
Authority = "SpeciesID",
TreeLat = "none",
Genus = "Genus",
Subplot = "quadrat",
DiameterUnitMan = "mm",
MinDBH = "none",
MinDBHMan = 10,
MinDBHUnitMan = "none",
XTreePlot = "gx",
XTreeSubplot = "none",
TreePlotUnitMan = "m",
TreeSubplotUnitMan = "none",
Diameter = "dbh",
HOMUnitMan = "m",
Variety = "none",
Voucher = "none",
SpeciesDensity = "none",
SpeciesBasalAreaDensity = "none",
SpeciesBasalAreaDensityUnitMan = "none",
SpeciesTotalBasalArea = "none",
SpeciesTotalBasalAreaUnitMan = "none",
SpeciesVolume = "none",
SpeciesVolumeUnitMan = "none",
PlotVolume = "none",
PlotDensity = "none",
YPlotUTM = "none",
PlotElevation = "none",
SpeciesDensityUnitMan = "none",
Subspecies = "none",
PlotVolumeUnitMan = "none",
PlotNDead = "none",
PlotNLive = "none",
PlotSpeciesRichness = "none",
XSubplotUTM = "none",
PlotBasalAreaDensity = "none",
YSubplotUTM = "none",
SpeciesCoverageIndex = "none",
PlotElevationMan = 265L,
SpeciesRelativeDensity = "none",
XPlotUTM = "none",
SubplotLon = "none",
PlotLon = "none",
SpeciesRelativeDominance = "none",
PlotDensityUnitMan = "none",
PlotBasalAreaDensityUnitMan = "none",
SpeciesImportanceIndex = "none",
PlotLat = "none",
StemFieldNum = "StemTag",
SpeciesAbundance = "none",
SubplotLat = "none",
SpeciesRelativeFrequency = "none",
AllCodes = structure(
list(
Column = c(
"codes",
"codes",
"codes",
"codes",
"codes",
"codes",
"codes",
"codes",
"codes",
"codes",
"codes",
"codes",
"codes",
"codes",
"codes"
),
Value = c(
"B",
"M",
"A",
"I",
"P",
"L",
"Q",
"X",
"C",
"Y",
"R",
"DS",
"DC",
"DT",
"DN"
),
Definition = c(
"large buttress, requiring ladder to measure",
"multiple stems",
"POM at alternative height, not breast height",
"stem irregular where measured",
"any problem requiring further attention",
"stem leaning",
"stem broken above breast height",
"stem broken below breast height",
"POM has changed since prior census",
"prostrate stem",
"resprout (main stem broken but resprouted since last census)",
"dead, stem standing",
"dead, stem fallen",
"dead, only tag found",
"presumed dead, no tag nor stem"
)
),
class = "data.frame",
row.names = c(NA, -15L)
),
MeasLevel = "Stem",
Tidy = structure(0L, class = c("integer",
"shinyActionButtonValue")),
ClearValueName = structure(0L, class = c("integer",
"shinyActionButtonValue")),
TickedMelt3 = FALSE,
Variablecolumns1 = c("sp",
"gx", "gy"),
ValueName4 = "Specis",
TickedMelt1 = FALSE,
ValueName6 = "",
ValueName5 = "",
ValueName2 = "om",
TickedMelt4 = FALSE,
TickedMelt6 = FALSE,
TickedMelt5 = FALSE,
Variablecolumns3 = c("DFstatus",
"status"),
ValueName3 = "stau",
TickedMelt2 = FALSE,
Variablecolumns2 = c("pom",
"hom"),
Variablecolumns4 = c("Species", "SpeciesID"),
ValueName1 = ""
)
usethis::use_data(ForestGeoProfile, overwrite = TRUE)
# also save for the app
saveRDS(ForestGeoProfile, "inst/app/data/ForestGeoProfile.rds")
## For ForestGeoProfile.Rmd run next line of code and paste in the item section of R/ForestGeoProfile.R
x <- read.csv("inst/app/data/interactive_items.csv")
write.csv(
gsub("\\]", "\\\\]", gsub("\\[", "\\\\[", paste0(
"#' \\item{",
names(ForestGeoProfile),
"}",
ifelse(
is.na(x$Label[match(names(ForestGeoProfile), x$ItemID)]),
"{Some value created via interaction with the Shiny app",
paste0(
"{Value or column name in data set @ForestGeoSubset (",
ForestGeoProfile,
") corresponding to ",
x$Label[match(names(ForestGeoProfile), x$ItemID)]
)
),
"}"
))),
"clipboard",
quote = F,
row.names = F
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.