From 10c1bca57a189850c8319df4362a4f84deca5985 Mon Sep 17 00:00:00 2001 From: SYOUNG9836 <78527477+SYOUNG9836@users.noreply.github.com> Date: Fri, 4 Oct 2024 04:36:41 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20SYOUNG98?= =?UTF-8?q?36/knfi@7351fecb46a8cba890b1b1f9e911eeb0af3226c3=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 6 +++--- pkgdown.yml | 2 +- search.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index f7af2e1..e035522 100644 --- a/index.html +++ b/index.html @@ -17,8 +17,8 @@ - - + + @@ -66,7 +66,7 @@

Overview

-

Understanding the current status of forest resources is essential for monitoring changes in forest ecosystems and generating related statistics. In South Korea, the National Forest Inventory (NFI) surveys over 4,500 sample plots nationwide every five years and records 70 items, including forest stand, forest resource, and forest vegetation surveys. Many researchers use NFI as the primary data for research, such as biomass estimation or analyzing the importance value of each species over time and space, depending on the research purpose. However, the large volume of accumulated forest survey data from across the country can make it challenging to manage and utilize such a vast dataset. To address this issue, we developed an R package that efficiently handles large-scale NFI data across time and space. The package offers a comprehensive workflow for NFI data analysis. It starts with data processing, where read_nfi() function reconstructs NFI data according to the researcher’s needs while performing basic integrity checks for data quality. Following this, the package provides analytical tools that operate on the verified data. These include functions like summary_nfi() for summary statistics, diversity_nfi() for biodiversity analysis, iv_nfi() for calculating species importance value, and biomass_nfi() and cwd_biomass_nfi() for biomass estimation. Finally, for visualization, the tsvis_nfi() function generates graphs and maps, allowing users to visualize forest ecosystem changes across various spatial and temporal scales. This integrated approach and its specialized functions can enhance the efficiency of processing and analyzing NFI data, providing researchers with valuable insights into forest ecosystems. The NFI Excel files (.xlsx) are not included in the R package and must be downloaded separately. Users can access these NFI Excel files by visiting the Korea Forest Service Forestry Statistics Platform (https://kfss.forest.go.kr/stat/ptl/article/articleList.do?curMenu=11694&bbsId=microdataboard) to download the annual NFI Excel files, which are bundled in .zip archives. Please note that this website is only available in Korean, and direct download links can be found in the notes section of the read_nfi() function.

+

Understanding the current status of forest resources is essential for monitoring changes in forest ecosystems and generating related statistics. In South Korea, the National Forest Inventory (NFI) surveys over 4,500 sample plots nationwide every five years and records 70 items, including forest stand, forest resource, and forest vegetation surveys. Many researchers use NFI as the primary data for research, such as biomass estimation or analyzing the importance value of each species over time and space, depending on the research purpose. However, the large volume of accumulated forest survey data from across the country can make it challenging to manage and utilize such a vast dataset. To address this issue, we developed an R package that efficiently handles large-scale NFI data across time and space. The package offers a comprehensive workflow for NFI data analysis. It starts with data processing, where read_nfi() function reconstructs NFI data according to the researcher’s needs while performing basic integrity checks for data quality. Following this, the package provides analytical tools that operate on the verified data. These include functions like summary_nfi() for summary statistics, diversity_nfi() for biodiversity analysis, iv_nfi() for calculating species importance value, and biomass_nfi() and cwd_biomass_nfi() for biomass estimation. Finally, for visualization, the tsvis_nfi() function generates graphs and maps, allowing users to visualize forest ecosystem changes across various spatial and temporal scales. This integrated approach and its specialized functions can enhance the efficiency of processing and analyzing NFI data, providing researchers with insights into forest ecosystems. The NFI Excel files (.xlsx) are not included in the R package and must be downloaded separately. Users can access these NFI Excel files by visiting the Korea Forest Service Forestry Statistics Platform (https://kfss.forest.go.kr/stat/ptl/article/articleList.do?curMenu=11694&bbsId=microdataboard) to download the annual NFI Excel files, which are bundled in .zip archives. Please note that this website is only available in Korean, and direct download links can be found in the notes section of the read_nfi() function.

Plot 1

Distribution of National Forest Inventory sample plots (left) and sampling design of the National Forest Inventory (right) (Korea Forest Research Institute, 2011)

Plot 2

diff --git a/pkgdown.yml b/pkgdown.yml index 9a60508..ec49194 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.1.1 pkgdown_sha: ~ articles: knfi: knfi.html -last_built: 2024-10-04T02:49Z +last_built: 2024-10-04T04:36Z urls: reference: https://syoung9836.github.io/knfi/reference article: https://syoung9836.github.io/knfi/articles diff --git a/search.json b/search.json index 494680a..99b68ef 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://syoung9836.github.io/knfi/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Sinyoung Park. Author, maintainer. Wonhee Cho. Author, contributor. Inyoo Kim. Author, contributor. Wontaek Lim. Author, contributor. Dongwook W. Ko. Author, thesis advisor.","code":""},{"path":"https://syoung9836.github.io/knfi/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Park S (2022). Development Algorithm Analysis Korean National Forest Inventory Data : Focusing Biodiversity Biomass Gangwon-. Master's thesis, Kookmin University, 77, Jeongneung-ro, Seongbuk-gu, Seoul, Republic Korea.","code":"@MastersThesis{, title = {Development of an Algorithm for the Analysis of Korean National Forest Inventory Data : Focusing on Biodiversity and Biomass in Gangwon-do}, author = {Sinyoung Park}, school = {Kookmin University}, address = {77, Jeongneung-ro, Seongbuk-gu, Seoul, Republic of Korea}, year = {2022}, }"},{"path":[]},{"path":"https://syoung9836.github.io/knfi/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Analysis of Korean National Forest Inventory database","text":"Understanding current status forest resources essential monitoring changes forest ecosystems generating related statistics. South Korea, National Forest Inventory (NFI) surveys 4,500 sample plots nationwide every five years records 70 items, including forest stand, forest resource, forest vegetation surveys. Many researchers use NFI primary data research, biomass estimation analyzing importance value species time space, depending research purpose. However, large volume accumulated forest survey data across country can make challenging manage utilize vast dataset. address issue, developed R package efficiently handles large-scale NFI data across time space. package offers comprehensive workflow NFI data analysis. starts data processing, read_nfi() function reconstructs NFI data according researcher’s needs performing basic integrity checks data quality. Following , package provides analytical tools operate verified data. include functions like summary_nfi() summary statistics, diversity_nfi() biodiversity analysis, iv_nfi() calculating species importance value, biomass_nfi() cwd_biomass_nfi() biomass estimation. Finally, visualization, tsvis_nfi() function generates graphs maps, allowing users visualize forest ecosystem changes across various spatial temporal scales. integrated approach specialized functions can enhance efficiency processing analyzing NFI data, providing researchers valuable insights forest ecosystems. NFI Excel files (.xlsx) included R package must downloaded separately. Users can access NFI Excel files visiting Korea Forest Service Forestry Statistics Platform (https://kfss.forest.go.kr/stat/ptl/article/articleList.?curMenu=11694&bbsId=microdataboard) download annual NFI Excel files, bundled .zip archives. Please note website available Korean, direct download links can found notes section read_nfi() function. Distribution National Forest Inventory sample plots (left) sampling design National Forest Inventory (right) (Korea Forest Research Institute, 2011) Plot design National Forest Inventory (Korea Forest Research Institute, 2011)","code":""},{"path":"https://syoung9836.github.io/knfi/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Analysis of Korean National Forest Inventory database","text":"","code":"# The easiest way to get knfi is to install just knfi: install.packages(\"knfi\") # Or the development version from GitHub: remotes::install_github(\"SYOUNG9836/knfi\")"},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"biomass_nfi() function estimates volume, aboveground biomass, biomass, carbon storage carbon dioxide storage. can provide summaries individual plots, entire study area, specific groups within study area using parameters byplot, plotgrp treegrp. calculating biomass individual trees plots level, users flexibility specifying data inclusion criteria analysis levels using parameters clusterplot, largetreearea, stockedland, talltree. parameters determine whether treat cluster plots single plots, include large tree survey plots, focus Stocked land tall trees. Users can also choose criteria post-stratification using strat parameter.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"","code":"biomass_nfi( data, byplot = FALSE, plotgrp = NULL, treegrp = NULL, strat = \"FORTYP_SUB\", clusterplot = FALSE, largetreearea = TRUE, stockedland = TRUE, talltree = TRUE )"},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"data : list generated read_nfi contains 'plot' 'tree' data frames. byplot : logical flag (default FALSE); TRUE, calculates statistics plot separately. FALSE, calculates entire dataset groups specified plotgrp treegrp. plotgrp : character vector; variables 'plot' tables grouping. Use c() combine multiple variables. treegrp : character vector; variables 'tree' tables grouping. Use c() combine multiple variables. strat : character vector; variable used post-stratification. National Forest Inventory Korea, typically used forest type. clusterplot : logical flag (default FALSE); TRUE, treats cluster plot single unit. FALSE, calculates subplot separately. largetreearea : logical flag (default TRUE); TRUE, includes large tree survey plots analysis. FALSE, uses standard tree plots. stockedland : logical flag (default TRUE); TRUE, includes stocked land. FALSE, includes land types. talltree : logical flag (default TRUE); TRUE, includes tall trees. FALSE, includes trees shrubs.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"data.frame includes biomass estimates. structure depends input parameters: byplot = TRUE, row represents plot. byplot = FALSE, row represents entire dataset group specified plotgrp treegrp","code":""},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"function calculates biomass using methodologies employed national statistics (mean, variance, standard error, relative standard error): Applies national carbon emission factors calculate biomass individual tree level. Estimates biomass per hectare cluster subplot level, options include basic survey trees basic large tree survey trees. Uses Double Sampling Post-stratification (DSS) method derive annual statistics. Applies Weighted Moving Average (WMA) method integrate annual statistics 20% plots surveyed year single time point.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"Biomass calculation involves dividing data groups based plotgrp applying post-stratification group. result, data group sufficiently large, relative standard error (RSE) may high. important check RSE statistical measures biomass results.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"Son, Y., Kim, R., Lee, K., Pyo, J., Kim, S., Hwang, J., Lee, S., & Park, H. (2014). Carbon emission factors biomass allometric equations species Korea. Korea Forest Research Institute. Yim, J., Moon, G., Lee, M., Kang, J., Won, M., Ahn, E., & Jeon, J. (2021). 2020 Forest inventory Korea. Korea Forest Research Institute.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"","code":"data(\"nfi_donghae\") # Basic usage biomass <- biomass_nfi(nfi_donghae) # Calculate biomass by administrative district district_biomass <- biomass_nfi(nfi_donghae, plotgrp = \"SGG\") # Calculate biomass for each plot plot_biomass <- biomass_nfi(nfi_donghae, byplot = TRUE) #> Warning: param 'byplot' has priority over param 'strat'"},{"path":"https://syoung9836.github.io/knfi/reference/col_name.html","id":null,"dir":"Reference","previous_headings":"","what":"The Korean and English names of the column names — col_name","title":"The Korean and English names of the column names — col_name","text":"Korean English names column names","code":""},{"path":"https://syoung9836.github.io/knfi/reference/col_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Korean and English names of the column names — col_name","text":"","code":"col_name"},{"path":"https://syoung9836.github.io/knfi/reference/col_name.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"The Korean and English names of the column names — col_name","text":"object class data.frame 174 rows 3 columns.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"cwd_biomass_nfi() function estimates volume, carbon storage carbon dioxide storage Coarse Woody Debris (CWD). can estimate individual plots, entire study area, specific groups within study area using parameters byplot, plotgrp treegrp. Users can choose criteria post-stratification using strat parameter. Users can specify whether focus Stocked land using stockedland parameter.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"","code":"cwd_biomass_nfi( data, byplot = FALSE, plotgrp = NULL, treegrp = NULL, strat = \"FORTYP_SUB\", stockedland = TRUE )"},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"data : list generated read_nfi contains 'plot' 'cwd' data frames. byplot : logical flag (default FALSE); TRUE, calculates statistics plot separately. FALSE, calculates entire dataset. plotgrp : character vector; variables 'plot' tables grouping. Use c() combine multiple variables. treegrp : character vector; variables 'tree' tables grouping. Use c() combine multiple variables. strat : character vector; variable used post-stratification. National Forest Inventory Korea, typically used forest type. stockedland : logical flag (default TRUE); TRUE, includes stocked land. FALSE, includes land types.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"data.frame includes CWD biomass plot study areas. structure depends input parameters: byplot = TRUE, row represents plot. byplot = FALSE, row represents entire dataset group specified plotgrp treegrp","code":""},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"function calculates CWD biomass using methodologies employed national statistics (mean, variance, standard error, relative standard error): Applies national carbon emission factors calculate CWD biomass individual tree level. Estimates biomass per hectare plot level. Uses Double Sampling Post-stratification (DSS) method derive annual statistics. Applies Weighted Moving Average (WMA) method integrate annual statistics 20% plots surveyed year single time point.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"Biomass calculation involves dividing data groups based plotgrp applying post-stratification group. result, data group sufficiently large, relative standard error (RSE) may high. important check RSE statistical measures biomass results.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"Son, Y., Kim, R., Lee, K., Pyo, J., Kim, S., Hwang, J., Lee, S., & Park, H. (2014). Carbon emission factors biomass allometric equations species Korea. Korea Forest Research Institute. Yim, J., Moon, G., Lee, M., Kang, J., Won, M., Ahn, E., & Jeon, J. (2021). 2020 Forest inventory Korea. Korea Forest Research Institute.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"","code":"data(\"nfi_donghae\") # Basic usage cwd <- cwd_biomass_nfi(nfi_donghae) # Calculate CWD biomass grouped by administrative district and decay class cwd_grp <- cwd_biomass_nfi(nfi_donghae, plotgrp = \"SGG\", treegrp = \"DECAY\") # Calculate CWD biomass for each plot plot_biomass <- cwd_biomass_nfi(nfi_donghae, byplot = TRUE) #> Warning: param 'byplot' has priority over param 'strat'"},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"diversity_nfi() function calculates species richness, evenness Shannon Simpson diversity indices National Forest Inventory (NFI) data. can provide diversity measures individual plots, entire study area, specific groups within study area using parameters byplot plotgrp. function can calculate diversity species genus level different vegetation components (trees, herbs, vegetation, saplings). uses diversity function vegan package core calculations. Users flexibility specifying data inclusion criteria analysis levels using parameters clusterplot, largetreearea, stockedland, talltree. parameters determine whether treat cluster plots single plots, include large tree survey plots, focus Stocked land tall trees.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"","code":"diversity_nfi( data, sp = \"SP\", table = \"tree\", basal = FALSE, plotgrp = NULL, byplot = FALSE, clusterplot = FALSE, largetreearea = FALSE, stockedland = TRUE, talltree = TRUE )"},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"data : list generated read_nfi contains 'plot' one ('tree', 'herb', 'veg', 'sapling') data frames. sp : character vector; column name species information (e.g., \"SP\" species, \"GENUS\" genus-level analysis). table : character vector; Specifies vegetation table use diversity analysis. Must one 'tree', 'herb', 'veg', 'sapling'. basal : logical flag (default FALSE); TRUE, calculates tree diversity using basal area. FALSE, uses number individuals. applicable table = \"tree\". plotgrp : character vector; specifies variables 'plot' table use grouping. Use c() combine multiple variables. byplot : logical flag (default FALSE); TRUE, calculates statistics plot separately. FALSE, calculates entire dataset. clusterplot : logical flag (default FALSE); TRUE, treats cluster plot single unit. FALSE, calculates subplot separately. largetreearea : logical flag (default FALSE); TRUE, includes large tree survey plots analysis. FALSE, uses standard tree plots. stockedland : logical flag (default TRUE); TRUE, includes stocked land. FALSE, includes land types. talltree : logical flag (default TRUE); TRUE, includes tall trees. FALSE, includes trees shrubs.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"data.frame includes diversity indices. structure depends input parameters: byplot = TRUE, row represents plot. byplot = FALSE, row represents entire dataset group specified plotgrp","code":""},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"function calculates following diversity indices (mean standard error): Species richness: total number species surveyed. Shannon-Wiener index: Calculated sum proportions individuals basal area species relative total. Gini-Simpson index: Calculated 1 minus Simpson's index. Ranges 0 1, higher values indicating greater diversity. Species evenness: Calculated dividing Shannon diversity natural logarithm species richness. Ranges 0 1, 1 indicating species evenly distributed.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"'herb', 'veg', 'sapling' tables may contain lot errors, use caution interpreting results tables.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"Shannon, C. E. (1948). mathematical theory communication. Bell System Technical Journal, 27(3), 379–423. Simpson, E. H. (1949). Measurement diversity. Nature, 163(4148), 688–688. Pielou, E. C. (1966). measurement diversity different types biological collections. Journal Theoretical Biology, 13, 131–144.","code":""},{"path":[]},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"","code":"data(\"nfi_donghae\") # Calculate tree diversity indices using basal area tree_ba_diversity <- diversity_nfi(nfi_donghae, sp = \"SP\", table = \"tree\", basal = TRUE) # Calculate tree diversity indices using number of individuals tree_indi_diversity <- diversity_nfi(nfi_donghae, sp = \"SP\", table = \"tree\", basal = FALSE)"},{"path":"https://syoung9836.github.io/knfi/reference/filter_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter National Forest Inventory Data — filter_nfi","title":"Filter National Forest Inventory Data — filter_nfi","text":"filter_nfi() function provides hierarchical non-hierarchical filtering approaches complex structure National Forest Inventory data based user-provided condition expressions (expr_texts). function enables effective filtering maintaining relationship plot data (parent data) data (child data).","code":""},{"path":"https://syoung9836.github.io/knfi/reference/filter_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter National Forest Inventory Data — filter_nfi","text":"","code":"filter_nfi(data, expr_texts, hier = TRUE)"},{"path":"https://syoung9836.github.io/knfi/reference/filter_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter National Forest Inventory Data — filter_nfi","text":"data : list generated read_nfi. dataframe 'SUB_PLOT' column. expr_texts : @param expr_texts : character vector; expressions specifying filtering conditions. expression combine dataframe name, dollar sign, condition, separate expressions data frame. (e.g., c(\"plot$OWN_CD == '5'\", \"tree$FAMILY == 'Pinaceae'\"). Conditions must valid R expressions. hier : logical flag (default TRUE); indicates whether apply hierarchical filtering (TRUE) non-hierarchical filtering (FALSE). Hierarchical filtering ensures connected dataframes filtered based results filters applied parent frame.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/filter_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter National Forest Inventory Data — filter_nfi","text":"list dataframes.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/filter_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Filter National Forest Inventory Data — filter_nfi","text":"function parses expressions targeting specific columns dataframes within provided list. Expression requirements: expression expr_texts must start valid dataframe name list (e.g., \"plot\", \"tree\", \"cwd\") combine dataframe name, dollar sign, condition (e.g. c(\"plot$OWN_CD == '5'\"). Separate expressions must provided dataframe filtered (e.g. c(\"plot$OWN_CD == '5'\", \"tree$FAMILY == 'Pinaceae' | tree$WDY_PLNTS_TYP_CD == '1'\"). Hierarchical filtering (hier = TRUE): Filters applied plot table affect connected child data (tree, CWD, stump, etc.). Filters applied child data operate within dataframe affect dataframes. Example: coniferous forest subplots selected plot table, child data retain tree, CWD, stump, etc., associated subplots. Non-hierarchical filtering (hier = FALSE): Filters applied parent dataframe (plot table) affect child data. Filtering results child data affect parent child data. Example: certain species selected tree table, plot table, CWD table, stump table, etc., filtered based remaining subplots selection.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/filter_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Filter National Forest Inventory Data — filter_nfi","text":"","code":"data(\"nfi_donghae\") # Applying hierarchical filtering to select only privately owned forest subplots. # Ensures all child tables' subplots match the filtered plot table's subplots. # Expected results after filtering: # all(nfi_donghae$tree$SUB_PLOT %in% nfi_donghae$plot$SUB_PLOT) result: TRUE nfi_donghae <- filter_nfi(nfi_donghae, c(\"plot$OWN_CD == '5'\"), hier = TRUE) # \\donttest{ # Non-hierarchical filtering to select only privately owned forest subplots. # Child tables remain unfiltered and may not correspond to the plot table subplots. # Expected results after filtering: # all(nfi_donghae$tree$SUB_PLOT %in% nfi_donghae$plot$SUB_PLOT) result: FALSE nfi_donghae <- filter_nfi(nfi_donghae, c(\"plot$OWN_CD == '5'\"), hier = FALSE) # Non-Hierarchical Filtering with only woody plants. # Other tables remain filtered and correspond to the tree table. # Expected results after filtering: # all(nfi_donghae$plot$SUB_PLOT %in% nfi_donghae$tree$SUB_PLOT) result: TRUE nfi_donghae <- filter_nfi(nfi_donghae, c(\"tree$WDY_PLNTS_TYP_CD == '1'\"), hier = FALSE) # Combining multiple filters across different dataframes nfi_donghae <- filter_nfi(nfi_donghae, c(\"plot$OWN_CD == '5'\", \"tree$FAMILY == 'Pinaceae' | tree$WDY_PLNTS_TYP_CD == '1'\")) # }"},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculates the importance values for National Forest Inventory Data — iv_nfi","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"iv_nfi() function calculates importance values tree species based frequency, density coverage. can estimate entire study area specific groups within using plotgrp parameter. uses importancevalue function BiodiversityR package core calculations. Users flexibility specifying data inclusion criteria analysis levels using parameters frequency, clusterplot, largetreearea, stockedland, talltree. parameters determine whether include frequency importance calculations, treat cluster plots single plots, include large tree survey plots, focus Stocked land tall trees.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"","code":"iv_nfi( data, sp = \"SP\", plotgrp = NULL, frequency = TRUE, clusterplot = FALSE, largetreearea = FALSE, stockedland = TRUE, talltree = TRUE )"},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"data : list generated read_nfi contains 'plot' 'tree' data frames. sp :character vector; column name species information (e.g., \"SP\" species, \"GENUS\" genus-level analysis). plotgrp : character vector; specifies variables 'plot' table use grouping. Use c() combine multiple variables. frequency : logical flag (default TRUE); TRUE, includes frequency importance value calculations. clusterplot : logical flag (default FALSE); TRUE, treats cluster plot single unit. FALSE, calculates subplot separately. largetreearea : logical flag (default FALSE); TRUE, includes large tree survey plots analysis. FALSE, uses standard tree plots. stockedland : logical flag (default TRUE); TRUE, includes stocked land. FALSE, includes land types. talltree : logical flag (default TRUE); TRUE, includes tall trees. FALSE, includes trees shrubs.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"data.frame includes importance value tree species. row represents combination tree species groups specified plotgrp treegrp.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"importance value (ranging 0 100) calculated mean : Relative frequency: (number plots species observed / total survey plots) * 100 Relative density: (total number individuals species / sum species' densities) * 100 Relative coverage: (total basal area species / sum species' basal area) * 100","code":""},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"Consider calculating importance genus rather species due potential incompleteness species classification. Since frequencies species may identical across nation, may desirable exclude frequency importance calculation.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"Curtis, J. T. & McIntosh, R. P. (1951). upland forest continuum prairie-forest border region Wisconsin. Ecology, 32(3), 476–496.","code":""},{"path":[]},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"","code":"data(\"nfi_donghae\") # Calculate importance values without frequency importance <- iv_nfi(nfi_donghae, sp = \"SP\", frequency = FALSE) # Calculate importance values using genus genus_importance <- iv_nfi(nfi_donghae, sp = \"GENUS\")"},{"path":"https://syoung9836.github.io/knfi/reference/nfi_donghae.html","id":null,"dir":"Reference","previous_headings":"","what":"National Forest Inventory data for Donghae-si, Gangwon-do, Republic of Korea for testing the function — nfi_donghae","title":"National Forest Inventory data for Donghae-si, Gangwon-do, Republic of Korea for testing the function — nfi_donghae","text":"National Forest Inventory data Donghae-si, Gangwon-, Republic Korea testing function","code":""},{"path":"https://syoung9836.github.io/knfi/reference/nfi_donghae.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"National Forest Inventory data for Donghae-si, Gangwon-do, Republic of Korea for testing the function — nfi_donghae","text":"","code":"nfi_donghae"},{"path":"https://syoung9836.github.io/knfi/reference/nfi_donghae.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"National Forest Inventory data for Donghae-si, Gangwon-do, Republic of Korea for testing the function — nfi_donghae","text":"object class list length 3.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/read_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Read Korean National Forest Inventory — read_nfi","title":"Read Korean National Forest Inventory — read_nfi","text":"read_nfi() function reads processes Korean National Forest Inventory (NFI). loads annual NFI files local computer, transforms data analysis-friendly format, performs data integrity verification. Users can specify districts tables load. NFI data can downloaded https://kfss.forest.go.kr/stat/.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/read_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read Korean National Forest Inventory — read_nfi","text":"","code":"read_nfi(dir, district = NULL, tables = c(\"tree\", \"cwd\"))"},{"path":"https://syoung9836.github.io/knfi/reference/read_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read Korean National Forest Inventory — read_nfi","text":"dir : character vector; directory containing NFI files. district : character vector; district names Korean (sido, sigungu, eupmyondong levels). NULL, entire dataset loaded. Combine multiple districts using c(). tables : character vector; tables import. Options: 'tree', 'cwd', 'stump', 'sapling', 'veg', 'herb', 'soil'. Combine multiple tables using c(). e.g., c('tree', 'cwd', 'stump', 'sapling', 'veg', 'herb', 'soil').","code":""},{"path":"https://syoung9836.github.io/knfi/reference/read_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read Korean National Forest Inventory — read_nfi","text":"data.frame; processed NFI data, structured easy analysis.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/read_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read Korean National Forest Inventory — read_nfi","text":"function can load following tables: plot Base table containing subplot data including site, stand non-forest area, among details (automatically included). tree Tree survey table including species, DBH, height, among others. Data collected trees large trees survey plot subplot. cwd Coarse woody debris table including species, tree decay level, cause death, among details. Data collected center subplot cluster plot. stump Stumps table including species diameter 20 cm ground, among details. Data collected center subplot cluster. sapling Saplings table including species, diameter 20 cm ground, number individuals, among details. Data collected sapling survey plot subplot. veg Vegetation table (woody herbaceous plants). records species, number individuals, dominance, among others. Data collected three vegetation survey plots located within selected center subplot. selection includes 25% total number center subplots. herb Herbaceous table focused herbaceous list. Data collected sapling survey plot subplot. soil Soil table including thickness organic layer soil depth, among others. Data collected three soil survey plots located within selected center subplot. selection includes 25% total number center subplots. details, refer National Forest Inventory guidelines. function performs several data integrity validation. Corrects administrative region information subplots. (col: SIDO, SIDO_CD, SGG, SGG_CD, EMD, EMD_CD) Adds ecoregion catchment subplots. (col: ECOREGION, CATCHMENT) Verifies corrects coniferous/deciduous classification tree species. (col: CONDEC_CLASS, CONDEC_CLASS_CD, WDY_PLNTS_TYP, WDY_PLNTS_TYP_CD) Adds scientific names species. (col: SCIENTIFIC_NAME) Adds Korean English names plant families genera. (col: FAMILY, FAMILY_KOREAN, GENUS, GENUS_KOREAN) Adds whether plant native cultivated, identifies food, medicinal, fiber, ornamental resource. (col: NATIVE_CULTIVATED, FOOD, MEDICINAL, FIBER, ORNAMENTAL) Calculates basal area individual tree (col: BASAL_AREA) Calculates forest type, dominant species, dominant species percentage subplot cluster plot. (col: FORTYP_SUB, DOMIN_PERCNT_SUB, DOMIN_SP_SUB, FORTYP_CLST, DOMIN_PERCNT_CLST, DOMIN_SP_CLST) Species classification taxonomy follow standards set Korean Plant Names Index Committee Korea National Arboretum http://www.nature.go.kr/kpni/index..","code":""},{"path":"https://syoung9836.github.io/knfi/reference/read_nfi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Read Korean National Forest Inventory — read_nfi","text":"manually download subsets annual NFI file, visit Korea Forest Service Forestry Statistics Platform (https://kfss.forest.go.kr/stat/), download .zip files, extract . -5th National Forest Inventory file: https://kfss.forest.go.kr/stat/ptl/article/articleFileDown.?fileSeq=2995&workSeq=2203 -6th National Forest Inventory file: https://kfss.forest.go.kr/stat/ptl/article/articleFileDown.?fileSeq=2996&workSeq=2204 -7th National Forest Inventory file: https://kfss.forest.go.kr/stat/ptl/article/articleFileDown.?fileSeq=2997&workSeq=2205 Use data(\"col_name\") view Korean English names column names. National Forest Inventory undergoes rigorous quality control, including internal reviews field inspections, errors may still exist due extensive nature survey (approximately 4,000 plots 70 items 7th phase). Please use data cautiously report anomalies help improve algorithms. want save results computer, can save Excel format. example, can use following code:writexl::write_xlsx(data, \"data.xlsx\") want read saved data back, use code : path <-\"../nfi_donghae.xlsx\" sheet_names <- readxl::excel_sheets(path) (sheet_name sheet_names) {nfi[[sheet_name]] <- readxl::read_excel(path, sheet = sheet_name) }","code":""},{"path":"https://syoung9836.github.io/knfi/reference/read_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read Korean National Forest Inventory — read_nfi","text":"","code":"# \\donttest{ # Load tree and CWD data for all districts nfi5_data <- read_nfi(\"D:/NFI/NFI5\", district = NULL, tables = c(\"tree\", \"cwd\")) #> Error in read_nfi(\"D:/NFI/NFI5\", district = NULL, tables = c(\"tree\", \"cwd\")): Directory D:/NFI/NFI5/ does not exist. # }"},{"path":"https://syoung9836.github.io/knfi/reference/summary_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate descriptive statistics for National Forest Inventory Data — summary_nfi","title":"Calculate descriptive statistics for National Forest Inventory Data — summary_nfi","text":"summary_nfi() function calculates comprehensive descriptive statistics National Forest Inventory (NFI) data. can provide summaries individual plots, entire study area, specific groups within study area using parameters byplot plotgrp. Users flexibility specifying data inclusion criteria analysis levels using parameters clusterplot, largetreearea, stockedland, talltree. parameters determine whether treat cluster plots single plots, include large tree survey plots, focus Stocked land tall trees.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/summary_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate descriptive statistics for National Forest Inventory Data — summary_nfi","text":"","code":"summary_nfi( data, plotgrp = NULL, byplot = FALSE, clusterplot = FALSE, largetreearea = TRUE, stockedland = TRUE, talltree = TRUE )"},{"path":"https://syoung9836.github.io/knfi/reference/summary_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate descriptive statistics for National Forest Inventory Data — summary_nfi","text":"data : list containing 'plot' 'tree' data frames, typically generated read_nfi. plotgrp : character vector; specifies variables 'plot' table use grouping. Use c() combine multiple variables. byplot : logical flag (default FALSE); TRUE, calculates statistics plot separately. FALSE, calculates entire dataset. clusterplot : logical flag (default FALSE); TRUE, treats cluster plot single unit. FALSE, calculates subplot separately. largetreearea : logical flag (default TRUE); TRUE, includes large tree survey plots analysis. FALSE, uses standard tree plots. stockedland : logical flag (default TRUE); TRUE, includes stocked land. FALSE, includes land types. talltree : logical flag (default TRUE); TRUE, includes tall trees. FALSE, includes trees shrubs.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/summary_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate descriptive statistics for National Forest Inventory Data — summary_nfi","text":"data.frame includes summary statistics. structure depends input parameters: byplot = TRUE, row represents plot. byplot = FALSE, row represents entire dataset group specified plotgrp","code":""},{"path":"https://syoung9836.github.io/knfi/reference/summary_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate descriptive statistics for National Forest Inventory Data — summary_nfi","text":"function calculates following statistics: Plot-related statistics: Number cluster plots Number subplots Number subplots large trees (\\(\\geq\\) 30cm) observed Tree-related statistics: Number individual trees Number large trees Number dominant trees Number tree species Tree measurements stand statistics (mean standard deviation): DBH (Diameter Breast Height) Tree height Height dominant trees Number trees per hectare Basal area per hectare Volume per hectare largetreearea parameter affects calculations differently: per-hectare statistics (trees per hectare, basal area per hectare, volume per hectare), setting largetreearea = TRUE includes data large tree survey plots. statistics, trees large tree survey plots always excluded, regardless largetreearea setting.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/summary_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate descriptive statistics for National Forest Inventory Data — summary_nfi","text":"","code":"data(\"nfi_donghae\") # Basic usage summary_stats <- summary_nfi(nfi_donghae) # Summarize by the group, including all land types grouped_stats <- summary_nfi(nfi_donghae, plotgrp = \"OWN_CD\", stockedland = FALSE) # Summarize by individual plots, including both trees and shrubs plot_summaries <- summary_nfi(nfi_donghae, byplot = TRUE, talltree = FALSE)"},{"path":"https://syoung9836.github.io/knfi/reference/switchcol_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Switch column names — switchcol_nfi","title":"Switch column names — switchcol_nfi","text":"switchcol_nfi() function allows switching original Korean column names English column names. input data English column names, changes original Korean names, vice versa.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/switchcol_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Switch column names — switchcol_nfi","text":"","code":"switchcol_nfi(data)"},{"path":"https://syoung9836.github.io/knfi/reference/switchcol_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Switch column names — switchcol_nfi","text":"data : list generated read_nfi.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/switchcol_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Switch column names — switchcol_nfi","text":"list dataframes switched column names.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/switchcol_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Switch column names — switchcol_nfi","text":"Important: Data original Korean column names used read_nfi functions except colchange_nfi() . option revert original Korean names provided solely users wish store process NFI data original column names.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/switchcol_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Switch column names — switchcol_nfi","text":"","code":"data(\"nfi_donghae\") #Switch column names from English to original Korean names nfi_donghae_kor <- switchcol_nfi(nfi_donghae) # Switch column names from original Korean to English names nfi_donghae_eng <- switchcol_nfi(nfi_donghae_kor)"},{"path":"https://syoung9836.github.io/knfi/reference/tsvis_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Visualize time series data for National Forest Inventory Data — tsvis_nfi","title":"Visualize time series data for National Forest Inventory Data — tsvis_nfi","text":"tsvis_nfi() function analyzes visualizes data time series format. can visualize 'biomass', 'cwd', 'iv' data 'table', 'line', 'bar', 'map'. Users need select specific biomass variable, volume carbon visualize biomass. map visualization biomass, users must choose administrative unit level. uses iv_nfi biomass_nfi cwd_biomass_nfi function core calculations.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/tsvis_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Visualize time series data for National Forest Inventory Data — tsvis_nfi","text":"","code":"tsvis_nfi( data, y = \"biomass\", bm_type = NULL, output = \"line\", plotgrp = NULL, isannual = TRUE, admin = NULL, strat = \"FORTYP_SUB\", clusterplot = FALSE, largetreearea = TRUE, stockedland = TRUE, talltree = TRUE, sp = \"SP\", frequency = TRUE )"},{"path":"https://syoung9836.github.io/knfi/reference/tsvis_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Visualize time series data for National Forest Inventory Data — tsvis_nfi","text":"data : list generated read_nfi contains 'plot' 'tree' data frames. y : character vector; variable visualize. Must one 'biomass', 'cwd', 'iv'. bm_type : character vector; specific variable visualize 'biomass' 'cwd'. Must one 'volume', 'biomass', 'AG_biomass', 'carbon', 'co2'. output : character vector; desired type visualization. Must one 'table', 'line', 'bar', 'map'. plotgrp : character vector; specifies variables 'plot' table use grouping. Use c() combine multiple variables, output map, line bar plot, one variable can used. isannual : logical flag (default TRUE); TRUE, result provided annually, FALSE, provided 5-year intervals. admin : character vector; administrative unit visualizing 'biomass' 'cwd' map. Must one 'sido', 'sgg', 'emg'. strat : character vector; variable used post-stratification. National Forest Inventory Korea, typically used forest type. clusterplot : logical flag (default FALSE); TRUE, treats cluster plot single unit. FALSE, calculates subplot separately. largetreearea : logical flag (default FALSE); TRUE, includes large tree survey plots analysis. FALSE, uses standard tree plots. stockedland : logical flag (default TRUE); TRUE, includes stocked land. FALSE, includes land types. talltree : logical flag (default TRUE); TRUE, includes tall trees. FALSE, includes trees shrubs. sp : character vector; column name species information (e.g., \"SP\" species, \"GENUS\" genus-level analysis). frequency : logical flag (default TRUE); TRUE, includes frequency importance value calculations.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/tsvis_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Visualize time series data for National Forest Inventory Data — tsvis_nfi","text":"output map, line, bar plot: object class ggplot. output table: data.frame.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/tsvis_nfi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Visualize time series data for National Forest Inventory Data — tsvis_nfi","text":"visualize data map, need agree install kadmin package function execution install advance. kadmin package loads shapefiles Korea's Si, Si, Gun, Gu Eup, Myeon, Dong. Use drat::addRepo(\"SYOUNG9836\") install.packages(\"kadmin\") remotes::install_github(\"SYOUNG9836/kadmin\")","code":""},{"path":[]},{"path":"https://syoung9836.github.io/knfi/reference/tsvis_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Visualize time series data for National Forest Inventory Data — tsvis_nfi","text":"","code":"data(\"nfi_donghae\") # Visualize importance values as a table tsvis_iv <- tsvis_nfi(nfi_donghae, y = \"iv\", output = \"table\") # Create a bar plot of importance values at 5-year intervals tsvis_iv_bar <- tsvis_nfi(nfi_donghae, y = \"iv\", output = \"bar\", isannual = FALSE) # Generate a line plot of carbon biomass over time, grouped by age class tsvis_bm_line <- tsvis_nfi(nfi_donghae, y = \"biomass\", bm_type = \"carbon\", output = \"line\", plotgrp = \"AGE_CLS\") # \\donttest{ # Create a map of volume at the sido level tsvis_bm_map <- tsvis_nfi(nfi_donghae, admin = \"sido\", y = \"biomass\", bm_type = \"volume\", output = \"map\") # }"},{"path":"https://syoung9836.github.io/knfi/news/index.html","id":"knfi-100","dir":"Changelog","previous_headings":"","what":"knfi 1.0.0","title":"knfi 1.0.0","text":"Initial CRAN submission.","code":""}] +[{"path":"https://syoung9836.github.io/knfi/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Sinyoung Park. Author, maintainer. Wonhee Cho. Author, contributor. Inyoo Kim. Author, contributor. Wontaek Lim. Author, contributor. Dongwook W. Ko. Author, thesis advisor.","code":""},{"path":"https://syoung9836.github.io/knfi/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Park S (2022). Development Algorithm Analysis Korean National Forest Inventory Data : Focusing Biodiversity Biomass Gangwon-. Master's thesis, Kookmin University, 77, Jeongneung-ro, Seongbuk-gu, Seoul, Republic Korea.","code":"@MastersThesis{, title = {Development of an Algorithm for the Analysis of Korean National Forest Inventory Data : Focusing on Biodiversity and Biomass in Gangwon-do}, author = {Sinyoung Park}, school = {Kookmin University}, address = {77, Jeongneung-ro, Seongbuk-gu, Seoul, Republic of Korea}, year = {2022}, }"},{"path":[]},{"path":"https://syoung9836.github.io/knfi/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Analysis of Korean National Forest Inventory database","text":"Understanding current status forest resources essential monitoring changes forest ecosystems generating related statistics. South Korea, National Forest Inventory (NFI) surveys 4,500 sample plots nationwide every five years records 70 items, including forest stand, forest resource, forest vegetation surveys. Many researchers use NFI primary data research, biomass estimation analyzing importance value species time space, depending research purpose. However, large volume accumulated forest survey data across country can make challenging manage utilize vast dataset. address issue, developed R package efficiently handles large-scale NFI data across time space. package offers comprehensive workflow NFI data analysis. starts data processing, read_nfi() function reconstructs NFI data according researcher’s needs performing basic integrity checks data quality. Following , package provides analytical tools operate verified data. include functions like summary_nfi() summary statistics, diversity_nfi() biodiversity analysis, iv_nfi() calculating species importance value, biomass_nfi() cwd_biomass_nfi() biomass estimation. Finally, visualization, tsvis_nfi() function generates graphs maps, allowing users visualize forest ecosystem changes across various spatial temporal scales. integrated approach specialized functions can enhance efficiency processing analyzing NFI data, providing researchers insights forest ecosystems. NFI Excel files (.xlsx) included R package must downloaded separately. Users can access NFI Excel files visiting Korea Forest Service Forestry Statistics Platform (https://kfss.forest.go.kr/stat/ptl/article/articleList.?curMenu=11694&bbsId=microdataboard) download annual NFI Excel files, bundled .zip archives. Please note website available Korean, direct download links can found notes section read_nfi() function. Distribution National Forest Inventory sample plots (left) sampling design National Forest Inventory (right) (Korea Forest Research Institute, 2011) Plot design National Forest Inventory (Korea Forest Research Institute, 2011)","code":""},{"path":"https://syoung9836.github.io/knfi/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Analysis of Korean National Forest Inventory database","text":"","code":"# The easiest way to get knfi is to install just knfi: install.packages(\"knfi\") # Or the development version from GitHub: remotes::install_github(\"SYOUNG9836/knfi\")"},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"biomass_nfi() function estimates volume, aboveground biomass, biomass, carbon storage carbon dioxide storage. can provide summaries individual plots, entire study area, specific groups within study area using parameters byplot, plotgrp treegrp. calculating biomass individual trees plots level, users flexibility specifying data inclusion criteria analysis levels using parameters clusterplot, largetreearea, stockedland, talltree. parameters determine whether treat cluster plots single plots, include large tree survey plots, focus Stocked land tall trees. Users can also choose criteria post-stratification using strat parameter.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"","code":"biomass_nfi( data, byplot = FALSE, plotgrp = NULL, treegrp = NULL, strat = \"FORTYP_SUB\", clusterplot = FALSE, largetreearea = TRUE, stockedland = TRUE, talltree = TRUE )"},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"data : list generated read_nfi contains 'plot' 'tree' data frames. byplot : logical flag (default FALSE); TRUE, calculates statistics plot separately. FALSE, calculates entire dataset groups specified plotgrp treegrp. plotgrp : character vector; variables 'plot' tables grouping. Use c() combine multiple variables. treegrp : character vector; variables 'tree' tables grouping. Use c() combine multiple variables. strat : character vector; variable used post-stratification. National Forest Inventory Korea, typically used forest type. clusterplot : logical flag (default FALSE); TRUE, treats cluster plot single unit. FALSE, calculates subplot separately. largetreearea : logical flag (default TRUE); TRUE, includes large tree survey plots analysis. FALSE, uses standard tree plots. stockedland : logical flag (default TRUE); TRUE, includes stocked land. FALSE, includes land types. talltree : logical flag (default TRUE); TRUE, includes tall trees. FALSE, includes trees shrubs.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"data.frame includes biomass estimates. structure depends input parameters: byplot = TRUE, row represents plot. byplot = FALSE, row represents entire dataset group specified plotgrp treegrp","code":""},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"function calculates biomass using methodologies employed national statistics (mean, variance, standard error, relative standard error): Applies national carbon emission factors calculate biomass individual tree level. Estimates biomass per hectare cluster subplot level, options include basic survey trees basic large tree survey trees. Uses Double Sampling Post-stratification (DSS) method derive annual statistics. Applies Weighted Moving Average (WMA) method integrate annual statistics 20% plots surveyed year single time point.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"Biomass calculation involves dividing data groups based plotgrp applying post-stratification group. result, data group sufficiently large, relative standard error (RSE) may high. important check RSE statistical measures biomass results.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"Son, Y., Kim, R., Lee, K., Pyo, J., Kim, S., Hwang, J., Lee, S., & Park, H. (2014). Carbon emission factors biomass allometric equations species Korea. Korea Forest Research Institute. Yim, J., Moon, G., Lee, M., Kang, J., Won, M., Ahn, E., & Jeon, J. (2021). 2020 Forest inventory Korea. Korea Forest Research Institute.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/biomass_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate Tree Biomass for National Forest Inventory Data — biomass_nfi","text":"","code":"data(\"nfi_donghae\") # Basic usage biomass <- biomass_nfi(nfi_donghae) # Calculate biomass by administrative district district_biomass <- biomass_nfi(nfi_donghae, plotgrp = \"SGG\") # Calculate biomass for each plot plot_biomass <- biomass_nfi(nfi_donghae, byplot = TRUE) #> Warning: param 'byplot' has priority over param 'strat'"},{"path":"https://syoung9836.github.io/knfi/reference/col_name.html","id":null,"dir":"Reference","previous_headings":"","what":"The Korean and English names of the column names — col_name","title":"The Korean and English names of the column names — col_name","text":"Korean English names column names","code":""},{"path":"https://syoung9836.github.io/knfi/reference/col_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The Korean and English names of the column names — col_name","text":"","code":"col_name"},{"path":"https://syoung9836.github.io/knfi/reference/col_name.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"The Korean and English names of the column names — col_name","text":"object class data.frame 174 rows 3 columns.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"cwd_biomass_nfi() function estimates volume, carbon storage carbon dioxide storage Coarse Woody Debris (CWD). can estimate individual plots, entire study area, specific groups within study area using parameters byplot, plotgrp treegrp. Users can choose criteria post-stratification using strat parameter. Users can specify whether focus Stocked land using stockedland parameter.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"","code":"cwd_biomass_nfi( data, byplot = FALSE, plotgrp = NULL, treegrp = NULL, strat = \"FORTYP_SUB\", stockedland = TRUE )"},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"data : list generated read_nfi contains 'plot' 'cwd' data frames. byplot : logical flag (default FALSE); TRUE, calculates statistics plot separately. FALSE, calculates entire dataset. plotgrp : character vector; variables 'plot' tables grouping. Use c() combine multiple variables. treegrp : character vector; variables 'tree' tables grouping. Use c() combine multiple variables. strat : character vector; variable used post-stratification. National Forest Inventory Korea, typically used forest type. stockedland : logical flag (default TRUE); TRUE, includes stocked land. FALSE, includes land types.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"data.frame includes CWD biomass plot study areas. structure depends input parameters: byplot = TRUE, row represents plot. byplot = FALSE, row represents entire dataset group specified plotgrp treegrp","code":""},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"function calculates CWD biomass using methodologies employed national statistics (mean, variance, standard error, relative standard error): Applies national carbon emission factors calculate CWD biomass individual tree level. Estimates biomass per hectare plot level. Uses Double Sampling Post-stratification (DSS) method derive annual statistics. Applies Weighted Moving Average (WMA) method integrate annual statistics 20% plots surveyed year single time point.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"Biomass calculation involves dividing data groups based plotgrp applying post-stratification group. result, data group sufficiently large, relative standard error (RSE) may high. important check RSE statistical measures biomass results.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"Son, Y., Kim, R., Lee, K., Pyo, J., Kim, S., Hwang, J., Lee, S., & Park, H. (2014). Carbon emission factors biomass allometric equations species Korea. Korea Forest Research Institute. Yim, J., Moon, G., Lee, M., Kang, J., Won, M., Ahn, E., & Jeon, J. (2021). 2020 Forest inventory Korea. Korea Forest Research Institute.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/cwd_biomass_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate biomass of Coarse Woody Debris — cwd_biomass_nfi","text":"","code":"data(\"nfi_donghae\") # Basic usage cwd <- cwd_biomass_nfi(nfi_donghae) # Calculate CWD biomass grouped by administrative district and decay class cwd_grp <- cwd_biomass_nfi(nfi_donghae, plotgrp = \"SGG\", treegrp = \"DECAY\") # Calculate CWD biomass for each plot plot_biomass <- cwd_biomass_nfi(nfi_donghae, byplot = TRUE) #> Warning: param 'byplot' has priority over param 'strat'"},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"diversity_nfi() function calculates species richness, evenness Shannon Simpson diversity indices National Forest Inventory (NFI) data. can provide diversity measures individual plots, entire study area, specific groups within study area using parameters byplot plotgrp. function can calculate diversity species genus level different vegetation components (trees, herbs, vegetation, saplings). uses diversity function vegan package core calculations. Users flexibility specifying data inclusion criteria analysis levels using parameters clusterplot, largetreearea, stockedland, talltree. parameters determine whether treat cluster plots single plots, include large tree survey plots, focus Stocked land tall trees.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"","code":"diversity_nfi( data, sp = \"SP\", table = \"tree\", basal = FALSE, plotgrp = NULL, byplot = FALSE, clusterplot = FALSE, largetreearea = FALSE, stockedland = TRUE, talltree = TRUE )"},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"data : list generated read_nfi contains 'plot' one ('tree', 'herb', 'veg', 'sapling') data frames. sp : character vector; column name species information (e.g., \"SP\" species, \"GENUS\" genus-level analysis). table : character vector; Specifies vegetation table use diversity analysis. Must one 'tree', 'herb', 'veg', 'sapling'. basal : logical flag (default FALSE); TRUE, calculates tree diversity using basal area. FALSE, uses number individuals. applicable table = \"tree\". plotgrp : character vector; specifies variables 'plot' table use grouping. Use c() combine multiple variables. byplot : logical flag (default FALSE); TRUE, calculates statistics plot separately. FALSE, calculates entire dataset. clusterplot : logical flag (default FALSE); TRUE, treats cluster plot single unit. FALSE, calculates subplot separately. largetreearea : logical flag (default FALSE); TRUE, includes large tree survey plots analysis. FALSE, uses standard tree plots. stockedland : logical flag (default TRUE); TRUE, includes stocked land. FALSE, includes land types. talltree : logical flag (default TRUE); TRUE, includes tall trees. FALSE, includes trees shrubs.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"data.frame includes diversity indices. structure depends input parameters: byplot = TRUE, row represents plot. byplot = FALSE, row represents entire dataset group specified plotgrp","code":""},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"function calculates following diversity indices (mean standard error): Species richness: total number species surveyed. Shannon-Wiener index: Calculated sum proportions individuals basal area species relative total. Gini-Simpson index: Calculated 1 minus Simpson's index. Ranges 0 1, higher values indicating greater diversity. Species evenness: Calculated dividing Shannon diversity natural logarithm species richness. Ranges 0 1, 1 indicating species evenly distributed.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"'herb', 'veg', 'sapling' tables may contain lot errors, use caution interpreting results tables.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"Shannon, C. E. (1948). mathematical theory communication. Bell System Technical Journal, 27(3), 379–423. Simpson, E. H. (1949). Measurement diversity. Nature, 163(4148), 688–688. Pielou, E. C. (1966). measurement diversity different types biological collections. Journal Theoretical Biology, 13, 131–144.","code":""},{"path":[]},{"path":"https://syoung9836.github.io/knfi/reference/diversity_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate species diversity indices for National Forest Inventory Data — diversity_nfi","text":"","code":"data(\"nfi_donghae\") # Calculate tree diversity indices using basal area tree_ba_diversity <- diversity_nfi(nfi_donghae, sp = \"SP\", table = \"tree\", basal = TRUE) # Calculate tree diversity indices using number of individuals tree_indi_diversity <- diversity_nfi(nfi_donghae, sp = \"SP\", table = \"tree\", basal = FALSE)"},{"path":"https://syoung9836.github.io/knfi/reference/filter_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter National Forest Inventory Data — filter_nfi","title":"Filter National Forest Inventory Data — filter_nfi","text":"filter_nfi() function provides hierarchical non-hierarchical filtering approaches complex structure National Forest Inventory data based user-provided condition expressions (expr_texts). function enables effective filtering maintaining relationship plot data (parent data) data (child data).","code":""},{"path":"https://syoung9836.github.io/knfi/reference/filter_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter National Forest Inventory Data — filter_nfi","text":"","code":"filter_nfi(data, expr_texts, hier = TRUE)"},{"path":"https://syoung9836.github.io/knfi/reference/filter_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter National Forest Inventory Data — filter_nfi","text":"data : list generated read_nfi. dataframe 'SUB_PLOT' column. expr_texts : @param expr_texts : character vector; expressions specifying filtering conditions. expression combine dataframe name, dollar sign, condition, separate expressions data frame. (e.g., c(\"plot$OWN_CD == '5'\", \"tree$FAMILY == 'Pinaceae'\"). Conditions must valid R expressions. hier : logical flag (default TRUE); indicates whether apply hierarchical filtering (TRUE) non-hierarchical filtering (FALSE). Hierarchical filtering ensures connected dataframes filtered based results filters applied parent frame.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/filter_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter National Forest Inventory Data — filter_nfi","text":"list dataframes.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/filter_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Filter National Forest Inventory Data — filter_nfi","text":"function parses expressions targeting specific columns dataframes within provided list. Expression requirements: expression expr_texts must start valid dataframe name list (e.g., \"plot\", \"tree\", \"cwd\") combine dataframe name, dollar sign, condition (e.g. c(\"plot$OWN_CD == '5'\"). Separate expressions must provided dataframe filtered (e.g. c(\"plot$OWN_CD == '5'\", \"tree$FAMILY == 'Pinaceae' | tree$WDY_PLNTS_TYP_CD == '1'\"). Hierarchical filtering (hier = TRUE): Filters applied plot table affect connected child data (tree, CWD, stump, etc.). Filters applied child data operate within dataframe affect dataframes. Example: coniferous forest subplots selected plot table, child data retain tree, CWD, stump, etc., associated subplots. Non-hierarchical filtering (hier = FALSE): Filters applied parent dataframe (plot table) affect child data. Filtering results child data affect parent child data. Example: certain species selected tree table, plot table, CWD table, stump table, etc., filtered based remaining subplots selection.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/filter_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Filter National Forest Inventory Data — filter_nfi","text":"","code":"data(\"nfi_donghae\") # Applying hierarchical filtering to select only privately owned forest subplots. # Ensures all child tables' subplots match the filtered plot table's subplots. # Expected results after filtering: # all(nfi_donghae$tree$SUB_PLOT %in% nfi_donghae$plot$SUB_PLOT) result: TRUE nfi_donghae <- filter_nfi(nfi_donghae, c(\"plot$OWN_CD == '5'\"), hier = TRUE) # \\donttest{ # Non-hierarchical filtering to select only privately owned forest subplots. # Child tables remain unfiltered and may not correspond to the plot table subplots. # Expected results after filtering: # all(nfi_donghae$tree$SUB_PLOT %in% nfi_donghae$plot$SUB_PLOT) result: FALSE nfi_donghae <- filter_nfi(nfi_donghae, c(\"plot$OWN_CD == '5'\"), hier = FALSE) # Non-Hierarchical Filtering with only woody plants. # Other tables remain filtered and correspond to the tree table. # Expected results after filtering: # all(nfi_donghae$plot$SUB_PLOT %in% nfi_donghae$tree$SUB_PLOT) result: TRUE nfi_donghae <- filter_nfi(nfi_donghae, c(\"tree$WDY_PLNTS_TYP_CD == '1'\"), hier = FALSE) # Combining multiple filters across different dataframes nfi_donghae <- filter_nfi(nfi_donghae, c(\"plot$OWN_CD == '5'\", \"tree$FAMILY == 'Pinaceae' | tree$WDY_PLNTS_TYP_CD == '1'\")) # }"},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculates the importance values for National Forest Inventory Data — iv_nfi","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"iv_nfi() function calculates importance values tree species based frequency, density coverage. can estimate entire study area specific groups within using plotgrp parameter. uses importancevalue function BiodiversityR package core calculations. Users flexibility specifying data inclusion criteria analysis levels using parameters frequency, clusterplot, largetreearea, stockedland, talltree. parameters determine whether include frequency importance calculations, treat cluster plots single plots, include large tree survey plots, focus Stocked land tall trees.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"","code":"iv_nfi( data, sp = \"SP\", plotgrp = NULL, frequency = TRUE, clusterplot = FALSE, largetreearea = FALSE, stockedland = TRUE, talltree = TRUE )"},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"data : list generated read_nfi contains 'plot' 'tree' data frames. sp :character vector; column name species information (e.g., \"SP\" species, \"GENUS\" genus-level analysis). plotgrp : character vector; specifies variables 'plot' table use grouping. Use c() combine multiple variables. frequency : logical flag (default TRUE); TRUE, includes frequency importance value calculations. clusterplot : logical flag (default FALSE); TRUE, treats cluster plot single unit. FALSE, calculates subplot separately. largetreearea : logical flag (default FALSE); TRUE, includes large tree survey plots analysis. FALSE, uses standard tree plots. stockedland : logical flag (default TRUE); TRUE, includes stocked land. FALSE, includes land types. talltree : logical flag (default TRUE); TRUE, includes tall trees. FALSE, includes trees shrubs.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"data.frame includes importance value tree species. row represents combination tree species groups specified plotgrp treegrp.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"importance value (ranging 0 100) calculated mean : Relative frequency: (number plots species observed / total survey plots) * 100 Relative density: (total number individuals species / sum species' densities) * 100 Relative coverage: (total basal area species / sum species' basal area) * 100","code":""},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"Consider calculating importance genus rather species due potential incompleteness species classification. Since frequencies species may identical across nation, may desirable exclude frequency importance calculation.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"Curtis, J. T. & McIntosh, R. P. (1951). upland forest continuum prairie-forest border region Wisconsin. Ecology, 32(3), 476–496.","code":""},{"path":[]},{"path":"https://syoung9836.github.io/knfi/reference/iv_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculates the importance values for National Forest Inventory Data — iv_nfi","text":"","code":"data(\"nfi_donghae\") # Calculate importance values without frequency importance <- iv_nfi(nfi_donghae, sp = \"SP\", frequency = FALSE) # Calculate importance values using genus genus_importance <- iv_nfi(nfi_donghae, sp = \"GENUS\")"},{"path":"https://syoung9836.github.io/knfi/reference/nfi_donghae.html","id":null,"dir":"Reference","previous_headings":"","what":"National Forest Inventory data for Donghae-si, Gangwon-do, Republic of Korea for testing the function — nfi_donghae","title":"National Forest Inventory data for Donghae-si, Gangwon-do, Republic of Korea for testing the function — nfi_donghae","text":"National Forest Inventory data Donghae-si, Gangwon-, Republic Korea testing function","code":""},{"path":"https://syoung9836.github.io/knfi/reference/nfi_donghae.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"National Forest Inventory data for Donghae-si, Gangwon-do, Republic of Korea for testing the function — nfi_donghae","text":"","code":"nfi_donghae"},{"path":"https://syoung9836.github.io/knfi/reference/nfi_donghae.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"National Forest Inventory data for Donghae-si, Gangwon-do, Republic of Korea for testing the function — nfi_donghae","text":"object class list length 3.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/read_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Read Korean National Forest Inventory — read_nfi","title":"Read Korean National Forest Inventory — read_nfi","text":"read_nfi() function reads processes Korean National Forest Inventory (NFI). loads annual NFI files local computer, transforms data analysis-friendly format, performs data integrity verification. Users can specify districts tables load. NFI data can downloaded https://kfss.forest.go.kr/stat/.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/read_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read Korean National Forest Inventory — read_nfi","text":"","code":"read_nfi(dir, district = NULL, tables = c(\"tree\", \"cwd\"))"},{"path":"https://syoung9836.github.io/knfi/reference/read_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read Korean National Forest Inventory — read_nfi","text":"dir : character vector; directory containing NFI files. district : character vector; district names Korean (sido, sigungu, eupmyondong levels). NULL, entire dataset loaded. Combine multiple districts using c(). tables : character vector; tables import. Options: 'tree', 'cwd', 'stump', 'sapling', 'veg', 'herb', 'soil'. Combine multiple tables using c(). e.g., c('tree', 'cwd', 'stump', 'sapling', 'veg', 'herb', 'soil').","code":""},{"path":"https://syoung9836.github.io/knfi/reference/read_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read Korean National Forest Inventory — read_nfi","text":"data.frame; processed NFI data, structured easy analysis.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/read_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read Korean National Forest Inventory — read_nfi","text":"function can load following tables: plot Base table containing subplot data including site, stand non-forest area, among details (automatically included). tree Tree survey table including species, DBH, height, among others. Data collected trees large trees survey plot subplot. cwd Coarse woody debris table including species, tree decay level, cause death, among details. Data collected center subplot cluster plot. stump Stumps table including species diameter 20 cm ground, among details. Data collected center subplot cluster. sapling Saplings table including species, diameter 20 cm ground, number individuals, among details. Data collected sapling survey plot subplot. veg Vegetation table (woody herbaceous plants). records species, number individuals, dominance, among others. Data collected three vegetation survey plots located within selected center subplot. selection includes 25% total number center subplots. herb Herbaceous table focused herbaceous list. Data collected sapling survey plot subplot. soil Soil table including thickness organic layer soil depth, among others. Data collected three soil survey plots located within selected center subplot. selection includes 25% total number center subplots. details, refer National Forest Inventory guidelines. function performs several data integrity validation. Corrects administrative region information subplots. (col: SIDO, SIDO_CD, SGG, SGG_CD, EMD, EMD_CD) Adds ecoregion catchment subplots. (col: ECOREGION, CATCHMENT) Verifies corrects coniferous/deciduous classification tree species. (col: CONDEC_CLASS, CONDEC_CLASS_CD, WDY_PLNTS_TYP, WDY_PLNTS_TYP_CD) Adds scientific names species. (col: SCIENTIFIC_NAME) Adds Korean English names plant families genera. (col: FAMILY, FAMILY_KOREAN, GENUS, GENUS_KOREAN) Adds whether plant native cultivated, identifies food, medicinal, fiber, ornamental resource. (col: NATIVE_CULTIVATED, FOOD, MEDICINAL, FIBER, ORNAMENTAL) Calculates basal area individual tree (col: BASAL_AREA) Calculates forest type, dominant species, dominant species percentage subplot cluster plot. (col: FORTYP_SUB, DOMIN_PERCNT_SUB, DOMIN_SP_SUB, FORTYP_CLST, DOMIN_PERCNT_CLST, DOMIN_SP_CLST) Species classification taxonomy follow standards set Korean Plant Names Index Committee Korea National Arboretum http://www.nature.go.kr/kpni/index..","code":""},{"path":"https://syoung9836.github.io/knfi/reference/read_nfi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Read Korean National Forest Inventory — read_nfi","text":"manually download subsets annual NFI file, visit Korea Forest Service Forestry Statistics Platform (https://kfss.forest.go.kr/stat/), download .zip files, extract . -5th National Forest Inventory file: https://kfss.forest.go.kr/stat/ptl/article/articleFileDown.?fileSeq=2995&workSeq=2203 -6th National Forest Inventory file: https://kfss.forest.go.kr/stat/ptl/article/articleFileDown.?fileSeq=2996&workSeq=2204 -7th National Forest Inventory file: https://kfss.forest.go.kr/stat/ptl/article/articleFileDown.?fileSeq=2997&workSeq=2205 Use data(\"col_name\") view Korean English names column names. National Forest Inventory undergoes rigorous quality control, including internal reviews field inspections, errors may still exist due extensive nature survey (approximately 4,000 plots 70 items 7th phase). Please use data cautiously report anomalies help improve algorithms. want save results computer, can save Excel format. example, can use following code:writexl::write_xlsx(data, \"data.xlsx\") want read saved data back, use code : path <-\"../nfi_donghae.xlsx\" sheet_names <- readxl::excel_sheets(path) (sheet_name sheet_names) {nfi[[sheet_name]] <- readxl::read_excel(path, sheet = sheet_name) }","code":""},{"path":"https://syoung9836.github.io/knfi/reference/read_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read Korean National Forest Inventory — read_nfi","text":"","code":"# \\donttest{ # Load tree and CWD data for all districts nfi5_data <- read_nfi(\"D:/NFI/NFI5\", district = NULL, tables = c(\"tree\", \"cwd\")) #> Error in read_nfi(\"D:/NFI/NFI5\", district = NULL, tables = c(\"tree\", \"cwd\")): Directory D:/NFI/NFI5/ does not exist. # }"},{"path":"https://syoung9836.github.io/knfi/reference/summary_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate descriptive statistics for National Forest Inventory Data — summary_nfi","title":"Calculate descriptive statistics for National Forest Inventory Data — summary_nfi","text":"summary_nfi() function calculates comprehensive descriptive statistics National Forest Inventory (NFI) data. can provide summaries individual plots, entire study area, specific groups within study area using parameters byplot plotgrp. Users flexibility specifying data inclusion criteria analysis levels using parameters clusterplot, largetreearea, stockedland, talltree. parameters determine whether treat cluster plots single plots, include large tree survey plots, focus Stocked land tall trees.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/summary_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate descriptive statistics for National Forest Inventory Data — summary_nfi","text":"","code":"summary_nfi( data, plotgrp = NULL, byplot = FALSE, clusterplot = FALSE, largetreearea = TRUE, stockedland = TRUE, talltree = TRUE )"},{"path":"https://syoung9836.github.io/knfi/reference/summary_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate descriptive statistics for National Forest Inventory Data — summary_nfi","text":"data : list containing 'plot' 'tree' data frames, typically generated read_nfi. plotgrp : character vector; specifies variables 'plot' table use grouping. Use c() combine multiple variables. byplot : logical flag (default FALSE); TRUE, calculates statistics plot separately. FALSE, calculates entire dataset. clusterplot : logical flag (default FALSE); TRUE, treats cluster plot single unit. FALSE, calculates subplot separately. largetreearea : logical flag (default TRUE); TRUE, includes large tree survey plots analysis. FALSE, uses standard tree plots. stockedland : logical flag (default TRUE); TRUE, includes stocked land. FALSE, includes land types. talltree : logical flag (default TRUE); TRUE, includes tall trees. FALSE, includes trees shrubs.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/summary_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate descriptive statistics for National Forest Inventory Data — summary_nfi","text":"data.frame includes summary statistics. structure depends input parameters: byplot = TRUE, row represents plot. byplot = FALSE, row represents entire dataset group specified plotgrp","code":""},{"path":"https://syoung9836.github.io/knfi/reference/summary_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate descriptive statistics for National Forest Inventory Data — summary_nfi","text":"function calculates following statistics: Plot-related statistics: Number cluster plots Number subplots Number subplots large trees (\\(\\geq\\) 30cm) observed Tree-related statistics: Number individual trees Number large trees Number dominant trees Number tree species Tree measurements stand statistics (mean standard deviation): DBH (Diameter Breast Height) Tree height Height dominant trees Number trees per hectare Basal area per hectare Volume per hectare largetreearea parameter affects calculations differently: per-hectare statistics (trees per hectare, basal area per hectare, volume per hectare), setting largetreearea = TRUE includes data large tree survey plots. statistics, trees large tree survey plots always excluded, regardless largetreearea setting.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/summary_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate descriptive statistics for National Forest Inventory Data — summary_nfi","text":"","code":"data(\"nfi_donghae\") # Basic usage summary_stats <- summary_nfi(nfi_donghae) # Summarize by the group, including all land types grouped_stats <- summary_nfi(nfi_donghae, plotgrp = \"OWN_CD\", stockedland = FALSE) # Summarize by individual plots, including both trees and shrubs plot_summaries <- summary_nfi(nfi_donghae, byplot = TRUE, talltree = FALSE)"},{"path":"https://syoung9836.github.io/knfi/reference/switchcol_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Switch column names — switchcol_nfi","title":"Switch column names — switchcol_nfi","text":"switchcol_nfi() function allows switching original Korean column names English column names. input data English column names, changes original Korean names, vice versa.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/switchcol_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Switch column names — switchcol_nfi","text":"","code":"switchcol_nfi(data)"},{"path":"https://syoung9836.github.io/knfi/reference/switchcol_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Switch column names — switchcol_nfi","text":"data : list generated read_nfi.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/switchcol_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Switch column names — switchcol_nfi","text":"list dataframes switched column names.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/switchcol_nfi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Switch column names — switchcol_nfi","text":"Important: Data original Korean column names used read_nfi functions except colchange_nfi() . option revert original Korean names provided solely users wish store process NFI data original column names.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/switchcol_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Switch column names — switchcol_nfi","text":"","code":"data(\"nfi_donghae\") #Switch column names from English to original Korean names nfi_donghae_kor <- switchcol_nfi(nfi_donghae) # Switch column names from original Korean to English names nfi_donghae_eng <- switchcol_nfi(nfi_donghae_kor)"},{"path":"https://syoung9836.github.io/knfi/reference/tsvis_nfi.html","id":null,"dir":"Reference","previous_headings":"","what":"Visualize time series data for National Forest Inventory Data — tsvis_nfi","title":"Visualize time series data for National Forest Inventory Data — tsvis_nfi","text":"tsvis_nfi() function analyzes visualizes data time series format. can visualize 'biomass', 'cwd', 'iv' data 'table', 'line', 'bar', 'map'. Users need select specific biomass variable, volume carbon visualize biomass. map visualization biomass, users must choose administrative unit level. uses iv_nfi biomass_nfi cwd_biomass_nfi function core calculations.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/tsvis_nfi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Visualize time series data for National Forest Inventory Data — tsvis_nfi","text":"","code":"tsvis_nfi( data, y = \"biomass\", bm_type = NULL, output = \"line\", plotgrp = NULL, isannual = TRUE, admin = NULL, strat = \"FORTYP_SUB\", clusterplot = FALSE, largetreearea = TRUE, stockedland = TRUE, talltree = TRUE, sp = \"SP\", frequency = TRUE )"},{"path":"https://syoung9836.github.io/knfi/reference/tsvis_nfi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Visualize time series data for National Forest Inventory Data — tsvis_nfi","text":"data : list generated read_nfi contains 'plot' 'tree' data frames. y : character vector; variable visualize. Must one 'biomass', 'cwd', 'iv'. bm_type : character vector; specific variable visualize 'biomass' 'cwd'. Must one 'volume', 'biomass', 'AG_biomass', 'carbon', 'co2'. output : character vector; desired type visualization. Must one 'table', 'line', 'bar', 'map'. plotgrp : character vector; specifies variables 'plot' table use grouping. Use c() combine multiple variables, output map, line bar plot, one variable can used. isannual : logical flag (default TRUE); TRUE, result provided annually, FALSE, provided 5-year intervals. admin : character vector; administrative unit visualizing 'biomass' 'cwd' map. Must one 'sido', 'sgg', 'emg'. strat : character vector; variable used post-stratification. National Forest Inventory Korea, typically used forest type. clusterplot : logical flag (default FALSE); TRUE, treats cluster plot single unit. FALSE, calculates subplot separately. largetreearea : logical flag (default FALSE); TRUE, includes large tree survey plots analysis. FALSE, uses standard tree plots. stockedland : logical flag (default TRUE); TRUE, includes stocked land. FALSE, includes land types. talltree : logical flag (default TRUE); TRUE, includes tall trees. FALSE, includes trees shrubs. sp : character vector; column name species information (e.g., \"SP\" species, \"GENUS\" genus-level analysis). frequency : logical flag (default TRUE); TRUE, includes frequency importance value calculations.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/tsvis_nfi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Visualize time series data for National Forest Inventory Data — tsvis_nfi","text":"output map, line, bar plot: object class ggplot. output table: data.frame.","code":""},{"path":"https://syoung9836.github.io/knfi/reference/tsvis_nfi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Visualize time series data for National Forest Inventory Data — tsvis_nfi","text":"visualize data map, need agree install kadmin package function execution install advance. kadmin package loads shapefiles Korea's Si, Si, Gun, Gu Eup, Myeon, Dong. Use drat::addRepo(\"SYOUNG9836\") install.packages(\"kadmin\") remotes::install_github(\"SYOUNG9836/kadmin\")","code":""},{"path":[]},{"path":"https://syoung9836.github.io/knfi/reference/tsvis_nfi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Visualize time series data for National Forest Inventory Data — tsvis_nfi","text":"","code":"data(\"nfi_donghae\") # Visualize importance values as a table tsvis_iv <- tsvis_nfi(nfi_donghae, y = \"iv\", output = \"table\") # Create a bar plot of importance values at 5-year intervals tsvis_iv_bar <- tsvis_nfi(nfi_donghae, y = \"iv\", output = \"bar\", isannual = FALSE) # Generate a line plot of carbon biomass over time, grouped by age class tsvis_bm_line <- tsvis_nfi(nfi_donghae, y = \"biomass\", bm_type = \"carbon\", output = \"line\", plotgrp = \"AGE_CLS\") # \\donttest{ # Create a map of volume at the sido level tsvis_bm_map <- tsvis_nfi(nfi_donghae, admin = \"sido\", y = \"biomass\", bm_type = \"volume\", output = \"map\") # }"},{"path":"https://syoung9836.github.io/knfi/news/index.html","id":"knfi-100","dir":"Changelog","previous_headings":"","what":"knfi 1.0.0","title":"knfi 1.0.0","text":"Initial CRAN submission.","code":""}]