Title: | Sources and standardizes permanent sample plot data |
---|---|
Description: | Converts all data into two keyed tables. One is for tree measurements, and the other is for plot data. Some arguments exist for handling disturbance agents. |
Authors: | Ian M S Eddy [aut, cre], Alex M Chubaty [ctb] |
Maintainer: | Ian M S Eddy <[email protected]> |
License: | GPL-3 |
Version: | 0.1.5.9002 |
Built: | 2024-10-31 22:16:19 UTC |
Source: | https://github.com/ianmseddy/PSPclean |
standardize and treat the Alberta PSP data
dataPurification_ABPSP( treeMeasure, plotMeasure, tree, plot, codesToExclude = 3, excludeAllObs = TRUE, areaDiffThresh = 0.95 )
dataPurification_ABPSP( treeMeasure, plotMeasure, tree, plot, codesToExclude = 3, excludeAllObs = TRUE, areaDiffThresh = 0.95 )
treeMeasure |
the tree measurement csv |
plotMeasure |
the plot_measurement csv |
tree |
the tree csv |
plot |
the plot csv |
codesToExclude |
damage agent codes used to filter tree data - see GOA PSP Manual. Measurements with these codes will be removed |
excludeAllObs |
if removing observations of individual trees due to damage codes, |
areaDiffThresh |
the threshold of plot size discrepancy to allow below which
plots will be given a new ID column. Expressed as |
a list of plot and tree data.tables
standardize and treat the BC PSP data
dataPurification_BCPSP( treeDataRaw, plotHeaderDataRaw, damageAgentCodes, codesToExclude = "IBM", excludeAllObs = TRUE )
dataPurification_BCPSP( treeDataRaw, plotHeaderDataRaw, damageAgentCodes, codesToExclude = "IBM", excludeAllObs = TRUE )
treeDataRaw |
the tree measurement csv |
plotHeaderDataRaw |
the plot header csv |
damageAgentCodes |
vector of damage agent codes |
codesToExclude |
damage agents to exclude from measurements |
excludeAllObs |
if removing observations of individual trees due to damage codes,
remove all prior and future observations if |
a list of plot and tree data.tables
standardize and treat the New Brunswick PSP data
dataPurification_NBPSP(NB_PSP_Data, sppEquiv = LandR::sppEquivalencies_CA)
dataPurification_NBPSP(NB_PSP_Data, sppEquiv = LandR::sppEquivalencies_CA)
NB_PSP_Data |
list of data tables resulting from |
sppEquiv |
species equivalencies table with column |
a list of standardized plot and tree data.tables
standardize and treat the NFI PSP data
dataPurification_NFIPSP(NFIdata, codesToExclude = "IB", excludeAllObs = TRUE)
dataPurification_NFIPSP(NFIdata, codesToExclude = "IB", excludeAllObs = TRUE)
NFIdata |
list of NFI tree, plot, and location data |
codesToExclude |
damage agents to exclude from measurements |
excludeAllObs |
if removing observations of individual trees due to damage codes,
remove all prior and future observations if |
a list of plot and tree data.tables
standardize and treat the Ontario PSP data
dataPurification_ONPSP(ONPSPlist, sppEquiv = LandR::sppEquivalencies_CA)
dataPurification_ONPSP(ONPSPlist, sppEquiv = LandR::sppEquivalencies_CA)
ONPSPlist |
list of relevant plots |
sppEquiv |
table of species names - see |
a list of plot and tree data.tables
standardize and treat the QUEBEC PSP data
dataPurification_QCPSP( QuebecPSP, codesToExclude = NULL, excludeAllObs = TRUE, sppEquiv = LandR::sppEquivalencies_CA )
dataPurification_QCPSP( QuebecPSP, codesToExclude = NULL, excludeAllObs = TRUE, sppEquiv = LandR::sppEquivalencies_CA )
QuebecPSP |
list of PSP data.tables obtained via |
codesToExclude |
TODO: eventually add codes for pest disturbance if applicable |
excludeAllObs |
assuming codesToExclude is not NULL, exclude these obs or prior ones too |
sppEquiv |
table of species names - see |
a list of standardized plot and tree data.tables
standardize and treat the Saskatchewan PSP data
dataPurification_SKPSP( SADataRaw, plotHeaderRaw, measureHeaderRaw, treeDataRaw, codesToExclude = NULL, excludeAllObs = TRUE )
dataPurification_SKPSP( SADataRaw, plotHeaderRaw, measureHeaderRaw, treeDataRaw, codesToExclude = NULL, excludeAllObs = TRUE )
SADataRaw |
the tree measurement csv |
plotHeaderRaw |
the plot header data |
measureHeaderRaw |
the measurement header raw |
treeDataRaw |
tree data |
codesToExclude |
damage agent codes used to filter tree data. Natural or Undetermined = 1, Disease = 2, Insect = 3, Human 4, Wind = 5, Snow = 6, Other Trees = 7, Hail or Ice Storm = 8. Measurements with these codes will be removed |
excludeAllObs |
if removing observations of individual trees due to damage codes,
remove all prior and future observations if |
a list of plot and tree data.tables
standardize and treat the Saskatchewan Mistik TSP data
dataPurification_SKTSP_Mistik(compiledPlotData, compiledTreeData)
dataPurification_SKTSP_Mistik(compiledPlotData, compiledTreeData)
compiledPlotData |
the plot header data |
compiledTreeData |
the tree data |
a list of plot and tree data.tables
convert plot location data to long/lat and output in a sf object
geoCleanPSP(Locations)
geoCleanPSP(Locations)
Locations |
the compiled plot data |
an sf object with OrigPlotID1
column
return a merged PSP object from a vector of data sources
getPSP( PSPdataTypes, destinationPath, forGMCS = FALSE, sppEquiv = LandR::sppEquivalencies_CA )
getPSP( PSPdataTypes, destinationPath, forGMCS = FALSE, sppEquiv = LandR::sppEquivalencies_CA )
PSPdataTypes |
character vector of PSP data sources - e.g. |
destinationPath |
destination folder for downloaded objects |
forGMCS |
if |
sppEquiv |
species equivalencies table. |
a list of standardized plot and tree data.tables
source the Alberta PSP data
prepInputsAlbertaPSP(dPath)
prepInputsAlbertaPSP(dPath)
dPath |
passed to prepInputs destinationPath |
a list of Alberta PSP data.tables
Source the BC PSP data
prepInputsBCPSP(dPath)
prepInputsBCPSP(dPath)
dPath |
passed to |
a list of BC PSP objects
retrieve the New Brunswick PSP raw data
prepInputsNBPSP(dPath)
prepInputsNBPSP(dPath)
dPath |
data directory for raw data |
a list of plot, tree, measurement, and location data.tables after exporting mdb to csv txt
source the NFI PSP data
prepInputsNFIPSP(dPath)
prepInputsNFIPSP(dPath)
dPath |
passed to prepInputs destinationPath |
a list of NFI PSP data.tables
retrieve preprocessed Ontario PSP and PGP data
prepInputsOntarioPSP(dPath, ...)
prepInputsOntarioPSP(dPath, ...)
dPath |
the Access database for PSP and PGP plots |
... |
additional args passed to prepInputs |
a list of plot and tree data.tables
retrieve the Quebec PSP raw data
prepInputsQCPSP(dPath)
prepInputsQCPSP(dPath)
dPath |
data directory for raw data |
a list of plot, tree, measurement, and location data.tables after exporting mdb to csv txt
source the Saskatchewan PSP data
prepInputsSaskatchwanPSP(dPath)
prepInputsSaskatchwanPSP(dPath)
dPath |
passed to prepInputs destinationPath |
a list of Saskatchewan PSP data.tables
source the Saskatchewan PSP data
prepInputsSaskatchwanTSP(dPath)
prepInputsSaskatchwanTSP(dPath)
dPath |
passed to prepInputs destinationPath |
a list of Saskatchewan PSP data.tables
standardize and treat the BC PSP data
prepPSP_climateNA(dPath, filename2, PSPplot, PSPgis)
prepPSP_climateNA(dPath, filename2, PSPplot, PSPgis)
dPath |
directory to download elevation data |
filename2 |
the full filename of the output file |
PSPplot |
the standardized PSP plot attribute data |
PSPgis |
the standardized plot location sf object |
a text file
standardize the species names in a given PSP measurement data.table
standardizeSpeciesNames(speciesTable, forestInventorySource)
standardizeSpeciesNames(speciesTable, forestInventorySource)
speciesTable |
the tree measurement csv |
forestInventorySource |
one of MBTSP, ABPSP, BCPSP, SKPSP, NWTTSP, NFIPSP. |
the species table with standardized species names