diff --git a/DESCRIPTION b/DESCRIPTION index bbb645da..40e36ec5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: fistools Title: Tools & data used for wildlife management & invasive species in Flanders -Version: 1.2.19 +Version: 1.2.20 Authors@R: c( person(given = "Sander", middle = "", family = "Devisscher", "sander.devisscher@inbo.be", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2015-5731")), @@ -38,5 +38,6 @@ Imports: mapview (>= 2.11.2), osmdata (>= 0.2.5), readr (>= 2.1.5), + RCurl (>= 1.98.1.16), tcltk, aws.s3 (>= 0.3.21) diff --git a/NAMESPACE b/NAMESPACE index 3ab9c44f..b78ed080 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -13,6 +13,7 @@ export(connect_to_bucket) export(download_dep_media) export(download_gdrive_if_missing) export(download_seq_media) +export(install_depricated) export(install_sp) export(label_converter) export(label_selecter) diff --git a/R/install_depricated.R b/R/install_depricated.R new file mode 100644 index 00000000..8f9572d7 --- /dev/null +++ b/R/install_depricated.R @@ -0,0 +1,70 @@ +#' install depricated package +#' +#' Helper function that installs depricated package when missing, from a tarball. +#' +#' @param package_name A character string indicating the name of the package to be installed +#' @param version A character string indicating the version of the package to be installed +#' @param force A logical indicating whether the installation should be forced +#' +#' @details +#' Sometimes a package is depricated and no longer available on CRAN. +#' This function allows you to install a depricated package from a tarball. +#' It is recommended to use this function only when necessary. +#' In first instance try to find an alternative package. +#' Using depricated packages may cause conflicts and unexpected behaviour. +#' +#' @importFrom utils install.packages +#' +#' @export +#' @family other +#' @examples +#' \dontrun{ +#' # install latest version of sp package instead of install_sp() +#' install_depricated("sp", "2.1-3") +#' # trying to install a wrong version of maptools +#' install_depricated("maptools", "2.1-3", force = TRUE) +#' +#' } +#' +#' @author Sander Devisscher + +install_depricated <- function(package_name, + version, + force = FALSE) { + if (!rlang::is_installed(package_name)) { + message(paste0(package_name, " is not installed, installing it now")) + # download the tarball from CRAN https://cran.r-project.org/src/contrib/Archive/sp/sp_2.1-3.tar.gz + # and place it in a temporary directory + # create url + version_url <- paste0("https://cran.r-project.org/src/contrib/Archive/", package_name, "/", package_name, "_", version, ".tar.gz") + + # test url + test_version_url <- RCurl::url.exists(version_url) + + # create tempfile + tempfile <- tempfile() + + # download the tarball if url exists + if(test_version_url == FALSE){ + warning(paste0(package_name, " version ", version, " is not available on CRAN")) + package_url <- paste0("https://cran.r-project.org/src/contrib/Archive/", package_name) + test_package_url <- RCurl::url.exists(package_url) + + if(test_package_url == TRUE ){ + if(askYesNo("You are trying to install a non existing version of the package. Do you want to browse the CRAN Archive to look up a usable version?") == TRUE){ + browseURL(paste0("https://cran.r-project.org/src/contrib/Archive/", package_name)) + } + } else { + stop("The package is not available on the CRAN archive") + } + } else { + download.file(version_url, destfile = tempfile) + } + + # install the tarball + install.packages(tempfile, repos = NULL, type = "source", force = force) + } + if(rlang::is_installed(package_name) == TRUE){ + print(paste0(package_name, " is installed \U0001F389")) + } +} diff --git a/R/install_sp.R b/R/install_sp.R index e1b514d3..df9de29a 100644 --- a/R/install_sp.R +++ b/R/install_sp.R @@ -13,6 +13,7 @@ #' @importFrom utils install.packages #' #' @export +#' @family other #' #' @author Sander Devisscher diff --git a/docs/404.html b/docs/404.html index 4837a40c..3ff45a18 100644 --- a/docs/404.html +++ b/docs/404.html @@ -20,7 +20,7 @@ fistools - 1.2.19 + 1.2.20
+ +Other other:
+install_depricated(),
+label_selecter()
Site built with pkgdown 2.1.1.
+Site built with pkgdown 2.1.3.
diff --git a/docs/reference/label_selecter.html b/docs/reference/label_selecter.html index e639743c..ed7c9c70 100644 --- a/docs/reference/label_selecter.html +++ b/docs/reference/label_selecter.html @@ -7,7 +7,7 @@ fistools - 1.2.19 + 1.2.20update is een boolean die aangeeft of de nog niet wegeschreven dwh - bestanden moeten worden gecontroleerd.
om dit te kunnen lopen is een verbinding met de DWH nodig. Dit is enkel mogelijk als je met de VPN van het INBO verbonden bent.
Of als je aanwezig bent op een vestiging van de Vlaamse Overheid (VAC).
Other other:
+install_depricated(),
+install_sp()
Site built with pkgdown 2.1.1.
+Site built with pkgdown 2.1.3.
Site built with pkgdown 2.1.1.
+Site built with pkgdown 2.1.3.
diff --git a/docs/reference/qd_pci2.html b/docs/reference/qd_pci2.html index dc55d911..000afc41 100644 --- a/docs/reference/qd_pci2.html +++ b/docs/reference/qd_pci2.html @@ -7,7 +7,7 @@ fistools - 1.2.19 + 1.2.20Site built with pkgdown 2.1.1.
+Site built with pkgdown 2.1.3.
diff --git a/docs/reference/qd_pci2_D.html b/docs/reference/qd_pci2_D.html index 96739146..5e3ac9e0 100644 --- a/docs/reference/qd_pci2_D.html +++ b/docs/reference/qd_pci2_D.html @@ -7,7 +7,7 @@ fistools - 1.2.19 + 1.2.20Site built with pkgdown 2.1.1.
+Site built with pkgdown 2.1.3.
diff --git a/docs/reference/rename_ct_files.html b/docs/reference/rename_ct_files.html index ca7f7f48..4e9dff21 100644 --- a/docs/reference/rename_ct_files.html +++ b/docs/reference/rename_ct_files.html @@ -15,7 +15,7 @@ fistools - 1.2.19 + 1.2.20Site built with pkgdown 2.1.1.
+Site built with pkgdown 2.1.3.
diff --git a/docs/reference/sunsetter.html b/docs/reference/sunsetter.html index bebcf65d..f7f8070c 100644 --- a/docs/reference/sunsetter.html +++ b/docs/reference/sunsetter.html @@ -9,7 +9,7 @@ fistools - 1.2.19 + 1.2.20Site built with pkgdown 2.1.1.
+Site built with pkgdown 2.1.3.
diff --git a/docs/reference/sunsetter2.html b/docs/reference/sunsetter2.html index 6f1b77e3..13db50de 100644 --- a/docs/reference/sunsetter2.html +++ b/docs/reference/sunsetter2.html @@ -7,7 +7,7 @@ fistools - 1.2.19 + 1.2.20Site built with pkgdown 2.1.1.
+Site built with pkgdown 2.1.3.
diff --git a/docs/search.json b/docs/search.json index f0508676..ac99ed76 100644 --- a/docs/search.json +++ b/docs/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement codeofconduct@posit.co. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 fistools authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Sander Devisscher. Author, maintainer. Lynn Pallemaerts. Author. Soria Delva. Author. Emma Cartuyvels. Author. Martijn Bollen. Author.","code":""},{"path":"/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Devisscher S, Pallemaerts L, Delva S, Cartuyvels E, Bollen M (2025). fistools: Tools & data used wildlife management & invasive species Flanders. R package version 1.2.19.","code":"@Manual{, title = {fistools: Tools & data used for wildlife management & invasive species in Flanders}, author = {Sander Devisscher and Lynn Pallemaerts and Soria Delva and Emma Cartuyvels and Martijn Bollen}, year = {2025}, note = {R package version 1.2.19}, }"},{"path":"/index.html","id":"fistools","dir":"","previous_headings":"","what":"Tools & data used for wildlife management & invasive species in Flanders","title":"Tools & data used for wildlife management & invasive species in Flanders","text":"Repo containing widely used data & functions FIS team","code":""},{"path":"/index.html","id":"installatie","dir":"","previous_headings":"","what":"installatie","title":"Tools & data used for wildlife management & invasive species in Flanders","text":"","code":"devtools::install_github(\"inbo/fistools\")"},{"path":"/index.html","id":"what-can-i-do-with-this-package","dir":"","previous_headings":"","what":"what can I do with this package?","title":"Tools & data used for wildlife management & invasive species in Flanders","text":"list functions & datasets can found reference page","code":""},{"path":"/reference/CRS_extracter.html","id":null,"dir":"Reference","previous_headings":"","what":"CRS_extracter — CRS_extracter","title":"CRS_extracter — CRS_extracter","text":"Extracts coordinate reference system (CRS) library commonly used CRS codes also fixes issues belge lambert 72 use. EPSG code 31370, proj4string one EPSG database.","code":""},{"path":"/reference/CRS_extracter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"CRS_extracter — CRS_extracter","text":"","code":"CRS_extracter(CRS, EPSG = TRUE)"},{"path":"/reference/CRS_extracter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"CRS_extracter — CRS_extracter","text":"CRS character string name CRS EPSG logical indicating whether output EPSG format","code":""},{"path":"/reference/CRS_extracter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"CRS_extracter — CRS_extracter","text":"CRS object","code":""},{"path":[]},{"path":"/reference/CRS_extracter.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"CRS_extracter — CRS_extracter","text":"Sander Devisscher","code":""},{"path":"/reference/CRS_extracter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"CRS_extracter — CRS_extracter","text":"","code":"if (FALSE) { # \\dontrun{ # Example of how to use the CRS_extracter function crs_wgs <- CRS_extracter(\"WGS\", EPSG = FALSE) crs_bel <- CRS_extracter(\"BEL72\", EPSG = FALSE) epsg_wgs <- CRS_extracter(\"WGS\", EPSG = TRUE) # Example of how to use the CRS_extracter function in combination with the sf & leaflet packages library(sf) library(tidyverse) library(leaflet) boswachterijen_df <- boswachterijen$boswachterijen_2024 %>% st_transform(crs_bel) %>% mutate(centroid = st_centroid(geometry)) %>% st_drop_geometry() %>% st_as_sf(sf_column_name = \"centroid\", crs = crs_bel) %>% st_transform(crs_wgs) leaflet() %>% addTiles() %>% addPolylines(data = boswachterijen$boswachterijen_2024) %>% addCircles(data = boswachterijen_df, color = \"red\", radius = 1000) } # }"},{"path":"/reference/UUID_List.html","id":null,"dir":"Reference","previous_headings":"","what":"UUID list generator — UUID_List","title":"UUID list generator — UUID_List","text":"helper script generate list UUIDs","code":""},{"path":"/reference/UUID_List.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"UUID list generator — UUID_List","text":"","code":"UUID_List(temp_input)"},{"path":"/reference/UUID_List.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"UUID list generator — UUID_List","text":"temp_input data.frame UUIDs appended","code":""},{"path":"/reference/apply_grtsdb.html","id":null,"dir":"Reference","previous_headings":"","what":"apply grtsdb — apply_grtsdb","title":"apply grtsdb — apply_grtsdb","text":"Applies grtsdb::extract_sample inbo/GRTSdb custom perimeter. function installs GRTSdb missing machine.","code":""},{"path":"/reference/apply_grtsdb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"apply grtsdb — apply_grtsdb","text":"","code":"apply_grtsdb(perimeter, cellsize = 100, n = 20, export_path = \".\", seed)"},{"path":"/reference/apply_grtsdb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"apply grtsdb — apply_grtsdb","text":"perimeter simple features (sf) object cellsize optional integer. size cell. Either single value one value dimension. Passed onto extract_sample GRTSdb. Default 100. n optional integer. sample size. Passed onto extract_sample GRTSdb. Default 20 export_path optional character string pointing path GRTSdb.sqlite created. Default \".\" seed optional character. Allowing rerun previous use.","code":""},{"path":"/reference/apply_grtsdb.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"apply grtsdb — apply_grtsdb","text":"function apply grtsdb custom perimeter GRTSdb automatically installed missing system.","code":""},{"path":[]},{"path":"/reference/apply_grtsdb.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"apply grtsdb — apply_grtsdb","text":"Sander Devisscher","code":""},{"path":"/reference/apply_grtsdb.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"apply grtsdb — apply_grtsdb","text":"","code":"if (FALSE) { # \\dontrun{ # Preparation perimeter <- sf::st_as_sf(boswachterijen$boswachterijen_2024) %>% dplyr::filter(Regio == \"Taxandria\", Naam == \"vacant 4\") # A new sample sample <- apply_grtsdb(perimeter, cellsize = 1000, n = 20, export_path = \".\") leaflet::leaflet() %>% leaflet::addTiles() %>% leaflet::addCircles(data = sample$samples, color = \"red\") %>% leaflet::addPolylines(data = sample$grid, color = \"blue\") %>% leaflet::addPolylines(data = perimeter, color = \"black\") # Reuse a old sample seed <- sample$seed sample <- apply_grtsdb(perimeter, cellsize = 1000, n = 20, export_path = \".\", seed = seed) leaflet::leaflet() %>% leaflet::addTiles() %>% leaflet::addCircles(data = sample$samples, color = \"red\") %>% leaflet::addPolylines(data = sample$grid, color = \"blue\") %>% leaflet::addPolylines(data = perimeter, color = \"black\") } # }"},{"path":"/reference/boswachterijen.html","id":null,"dir":"Reference","previous_headings":"","what":"Boswachterijen — boswachterijen","title":"Boswachterijen — boswachterijen","text":"Spatiale en andere informatie (o.. telefoonummers) van de boswachterijen van ANB.","code":""},{"path":"/reference/boswachterijen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Boswachterijen — boswachterijen","text":"","code":"boswachterijen"},{"path":[]},{"path":"/reference/boswachterijen.html","id":"boswachterijen","dir":"Reference","previous_headings":"","what":"boswachterijen","title":"Boswachterijen — boswachterijen","text":"En sf data frame 98 rijen 11 kolommen per jaar: Regio Beheerregio Naam Naam van de boswachter telefoon Telefoon nr van de boswachter","code":""},{"path":"/reference/boswachterijen.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Boswachterijen — boswachterijen","text":"https://www..int/teams/global-tuberculosis-programme/data","code":""},{"path":[]},{"path":"/reference/calculate_polygon_centroid.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate the centroid of a polygon — calculate_polygon_centroid","title":"Calculate the centroid of a polygon — calculate_polygon_centroid","text":"function calculates centroid polygon returns latitude, longitude uncertainty centroid.","code":""},{"path":"/reference/calculate_polygon_centroid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate the centroid of a polygon — calculate_polygon_centroid","text":"","code":"calculate_polygon_centroid(sf_df, id)"},{"path":"/reference/calculate_polygon_centroid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate the centroid of a polygon — calculate_polygon_centroid","text":"sf_df sf object polygons id character string name column containing unique identifier","code":""},{"path":"/reference/calculate_polygon_centroid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate the centroid of a polygon — calculate_polygon_centroid","text":"data frame unique identifier, latitude, longitude uncertainty centroid","code":""},{"path":"/reference/calculate_polygon_centroid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate the centroid of a polygon — calculate_polygon_centroid","text":"function always returns latitude & longitude polygon centroid uncertainty centroid. uncertainty calculated maximum distance centroid vertrexes polygon. crs input wgs84 centroidX & centroidY also returned. crs columns equal crs input sf data frame.","code":""},{"path":[]},{"path":"/reference/calculate_polygon_centroid.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculate the centroid of a polygon — calculate_polygon_centroid","text":"Sander Devisscher","code":""},{"path":"/reference/calculate_polygon_centroid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate the centroid of a polygon — calculate_polygon_centroid","text":"","code":"if (FALSE) { # \\dontrun{ # Example of how to use the calculate_polygon_centroid function # Load the necessary data boswachterijen <- boswachterijen$boswachterijen_2024 # add a unique identifier to the sf object boswachterijen <- boswachterijen %>% dplyr::mutate(UUID = as.character(row_number())) # Calculate the centroid of the polygons centroids_data_final <- calculate_polygon_centroid(sf_df = boswachterijen, id = \"UUID\") # Plot the polygons and the centroids library(leaflet) # Sample 1 polygon and 1 centroid to plot using id sample_id <- sample(centroids_data_final$UUID, 1) leaflet() %>% addProviderTiles(\"CartoDB.Positron\") %>% addPolygons(data = boswachterijen %>% dplyr::filter(UUID == sample_id), weight = 1, color = \"black\", fillOpacity = 0.5) %>% addCircles(data = centroids_data_final %>% dplyr::filter(UUID == sample_id), lat = ~centroidLatitude, lng = ~centroidLongitude, radius = 5, color = \"black\") %>% addCircles(data = centroids_data_final %>% dplyr::filter(UUID == sample_id), lat = ~centroidLatitude, lng = ~centroidLongitude, radius = ~centroidUncertainty, color = \"red\", weight = 1) } # }"},{"path":"/reference/check.html","id":null,"dir":"Reference","previous_headings":"","what":"Check — check","title":"Check — check","text":"Helper script determine existence environment panel","code":""},{"path":"/reference/check.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check — check","text":"","code":"check(x)"},{"path":"/reference/check.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check — check","text":"x environment object","code":""},{"path":"/reference/check.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check — check","text":"1 = object exists environment 0 = object exist environment","code":""},{"path":"/reference/check.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check — check","text":"work functions yield 0 default.","code":""},{"path":"/reference/check.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check — check","text":"Sander Devisscher","code":""},{"path":"/reference/cleanup_sqlite.html","id":null,"dir":"Reference","previous_headings":"","what":"cleanup sqlite — cleanup_sqlite","title":"cleanup sqlite — cleanup_sqlite","text":"helper script cleanup use apply_gtrsdb.","code":""},{"path":"/reference/cleanup_sqlite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"cleanup sqlite — cleanup_sqlite","text":"","code":"cleanup_sqlite(db = \"grts.sqlite\")"},{"path":"/reference/cleanup_sqlite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"cleanup sqlite — cleanup_sqlite","text":"db name temporary .sqlite db removed","code":""},{"path":"/reference/col_content_compare.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare column contents of two dataframes — col_content_compare","title":"Compare column contents of two dataframes — col_content_compare","text":"Compares content 2 similar columns two data frames. function prints list values missing first column, missing second column, values columns.","code":""},{"path":"/reference/col_content_compare.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare column contents of two dataframes — col_content_compare","text":"","code":"col_content_compare(df1, col1, df2, col2)"},{"path":"/reference/col_content_compare.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare column contents of two dataframes — col_content_compare","text":"df1 data frame col1 column name df1 df2 data frame col2 column name df2","code":""},{"path":"/reference/col_content_compare.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compare column contents of two dataframes — col_content_compare","text":"list values missing first column, missing second column, values columns.","code":""},{"path":[]},{"path":"/reference/col_content_compare.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compare column contents of two dataframes — col_content_compare","text":"Sander Devisscher","code":""},{"path":"/reference/col_content_compare.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compare column contents of two dataframes — col_content_compare","text":"","code":"if (FALSE) { # \\dontrun{ dataset1 <- data.frame(a = c(1, 2, 3, 4, 5), b = c(\"a\", \"b\", \"c\", \"d\", \"e\")) dataset2 <- data.frame(c = c(1, 2, 3, 4, 5), d = c(\"a\", \"b\", \"f\", \"d\", \"e\")) col_content_compare(df1 = dataset1, \"b\", df2 = dataset2, \"d\") } # }"},{"path":"/reference/colcompare.html","id":null,"dir":"Reference","previous_headings":"","what":"Columnname comparison — colcompare","title":"Columnname comparison — colcompare","text":"simple function list difference column names 2 datasets.","code":""},{"path":"/reference/colcompare.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Columnname comparison — colcompare","text":"","code":"colcompare(x, y)"},{"path":"/reference/colcompare.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Columnname comparison — colcompare","text":"x dataframe 1 y dataframe 2","code":""},{"path":"/reference/colcompare.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Columnname comparison — colcompare","text":"list columns present x y list columns present y x.","code":""},{"path":[]},{"path":"/reference/colcompare.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Columnname comparison — colcompare","text":"Sander Devisscher","code":""},{"path":"/reference/colcompare.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Columnname comparison — colcompare","text":"","code":"if (FALSE) { # \\dontrun{ # create example dataframes super_sleepers <- data.frame(rating=1:4, animal=c('koala', 'hedgehog', 'sloth', 'panda'), country=c('Australia', 'Italy', 'Peru', 'China'), avg_sleep_hours=c(21, 18, 17, 10)) super_actives <- data.frame(rating=1:4, animal=c('kangeroo', 'wolf', 'jaguar', 'tiger'), country=c('Australia', 'Italy', 'Peru', 'China'), avg_active_hours=c(16, 15, 8, 10)) colcompare(super_sleepers, super_actives) } # }"},{"path":"/reference/collect_osm_features.html","id":null,"dir":"Reference","previous_headings":"","what":"collect OpenStreetMaps features — collect_osm_features","title":"collect OpenStreetMaps features — collect_osm_features","text":"Extracts spatial features OpenStreetMaps server: features extracted re-classified broad categories: osm_polygons: urban, agriculture, open, forest, water osm_lines: roads, waterways osm_points: city names","code":""},{"path":"/reference/collect_osm_features.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"collect OpenStreetMaps features — collect_osm_features","text":"","code":"collect_osm_features( proj_bbox, download_features = \"all\", landuse_elements = \"all\", line_elements = \"all\" )"},{"path":"/reference/collect_osm_features.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"collect OpenStreetMaps features — collect_osm_features","text":"proj_bbox bbox. bounding box project/ study area extract osm features. download_features character. \"\" download features. \"polygons\", \"lines\" \"points\" download polygon, line point features respectively. Combinations also possible (e.g. c(\"polygons\", \"points\")). Default \"\". landuse_elements character. \"\" download landuse classes. \"urban\", \"agriculture\", \"open\", \"forest\" \"water\" download landuse classes interest. Combinations also possible (e.g. c(\"urban\", \"forest\", \"water\")) Default \"\". line_elements character. \"\" download line elements. \"road\", \"water\" download roads rivers, streams etc. respectively. Default \"\"","code":""},{"path":"/reference/collect_osm_features.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"collect OpenStreetMaps features — collect_osm_features","text":"named list 3 sf data frames: osm_polygons, osm_lines, osm_points. sf data frame contains corresponding geometry types.","code":""},{"path":"/reference/collect_osm_features.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"collect OpenStreetMaps features — collect_osm_features","text":"function collect custom osm features project dplyr osmdata automatically installed missing system.","code":""},{"path":[]},{"path":"/reference/collect_osm_features.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"collect OpenStreetMaps features — collect_osm_features","text":"Martijn Bollen","code":""},{"path":"/reference/collect_osm_features.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"collect OpenStreetMaps features — collect_osm_features","text":"","code":"if (FALSE) { # \\dontrun{ # extract the bounding box (WGS84) for the Project proj_sf <- st_sfc(st_polygon(list(drg_example$spatial$coordinates[1,,])), crs = 4326) proj_bbox <- st_bbox(proj_sf) class(proj_bbox) # extract selected OSM features osm <- collect_osm_features(proj_bbox) # extract only polygon OSM features osm_polygons <- collect_osm_features(proj_bbox, download_features = \"polygons\") osm_lines <- collect_osm_features(proj_bbox, download_features = \"lines\") osm_points <- collect_osm_features(proj_bbox, download_features = \"points\") osm_forest_water <- collect_osm_features(proj_bbox, download_features = c(\"polygons\", \"points\"), landuse_elements = c(\"forest\", \"water\")) # extract combination of OSM features, subset line elements osm_polygons_roads <- collect_osm_features(proj_bbox, download_features = c(\"polygons\", \"lines\"), line_elements = \"road\") # calculate the area of each landuse class within the bbox landuse <- osm_polygons$osm_polygons %>% st_make_valid() %>% mutate(area = set_units(st_area(.), \"km^2\")) %>% group_by(landuse) %>% summarise(area = sum(area)) # plot ## polygons (p1 <- ggplot(osm_polygons$osm_polygons %>% filter(!is.na(landuse)) %>% arrange(landuse)) + geom_sf(aes(fill = landuse), col = NA) + scale_fill_manual(values = unique(arrange(osm$osm_polygons, landuse)$osm_fill)) + theme_void() + theme(legend.position = \"right\")) ## lines (p2 <- ggplot(osm_lines$osm_lines) + geom_sf(aes(col = line_element)) + scale_color_manual(values = c(\"grey50\", \"#0092da\")) + theme_void() + theme(legend.position = \"right\")) ## points (p3 <- ggplot(osm_points$osm_points) + geom_sf_label(aes(label = name))) ## combine features p1 + geom_sf(data = osm$osm_lines, aes(col = line_element)) + geom_sf_label(data = osm$osm_points, aes(label = name)) + scale_color_manual(values = c(\"grey20\", \"#0092da\")) + coord_sf(xlim = proj_bbox[c(\"xmin\", \"xmax\")], ylim = proj_bbox[c(\"ymin\", \"ymax\")]) } # }"},{"path":"/reference/connect_to_bucket.html","id":null,"dir":"Reference","previous_headings":"","what":"connect to bucket — connect_to_bucket","title":"connect to bucket — connect_to_bucket","text":"Deze functie refresht de sessiontoken nodig om contact te leggen met inbo AWS S3 buckets. De functie maakt een profiel aan met een sessiontoken die één uur geldig blijft. Deze heb je nodig om verbinding te maken met de s3 buckets.","code":""},{"path":"/reference/connect_to_bucket.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"connect to bucket — connect_to_bucket","text":"","code":"connect_to_bucket( bucket_name, bucket_type = \"inbo-uat\", role = \"inbo-developers-fis-role\" )"},{"path":"/reference/connect_to_bucket.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"connect to bucket — connect_to_bucket","text":"bucket_name String met de naam van de bucket. bucket_type String met het type bucket. ofwel \"inbo-uat\" \"inbo-prod\" role String met de rechtengroep waartoe je behoort. Default : \"inbo-developers-fis-role\"","code":""},{"path":"/reference/connect_to_bucket.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"connect to bucket — connect_to_bucket","text":"Dataframe met een lijst van bestanden op de bucket met relevante info.","code":""},{"path":"/reference/connect_to_bucket.html","id":"voorbereiding-","dir":"Reference","previous_headings":"","what":"Voorbereiding:","title":"connect to bucket — connect_to_bucket","text":"De volgende programma's moeten worden geïnstalleerd vooraleer je deze functie kunt gebruiken: -AWS CLI moet worden geïnstalleerd als dat nog niet gebeurd . Hiervoor heb je admin rechten nodig, een ict helpdesk call dus aan de orde. Na de installatie moeten je AWS credentials eenmalig aangemaakt worden. Voer hiervoor aws configure uit windows powershell. De credentials kan je bekomen bij Jens Polspoel. -devops-toolkit moet lokaal worden geïnstalleerd dit doe je door https://github.com/inbo/devops-toolkit te clonen dmv github dekstop. Vervolgens kopiëer je aws-cli-mfa-login.py & common.py naar de Home Directory van Windows. Default dat C:/Users/%voornaam_achternaam%/bin. -Python moet worden geïnstalleerd als dat nog niet gebeurd . Dit kan rechtstreeks R met onderstaande code: install.packages(\"reticulate\") reticulate::install_python() system('pip install boto3')","code":""},{"path":"/reference/connect_to_bucket.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"connect to bucket — connect_to_bucket","text":"Sander Devisscher Jens Polspoel","code":""},{"path":"/reference/connect_to_bucket.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"connect to bucket — connect_to_bucket","text":"","code":"if (FALSE) { # \\dontrun{ # Alleen de bucket_name is uiterst noodzakelijk: # Connect to the UAT bucket of exotenportaal: connect_to_bucket(\"inbo-exotenportaal-uat-eu-west-1-default\") # Connect to the UAT bucket of faunabeheer: connect_to_bucket(\"inbo-faunabeheer-uat-eu-west-1-default\") } # }"},{"path":"/reference/download_dep_media.html","id":null,"dir":"Reference","previous_headings":"","what":"Download deployment media — download_dep_media","title":"Download deployment media — download_dep_media","text":"function allows user download media related Agouti - dataset matches given parameters.","code":""},{"path":"/reference/download_dep_media.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download deployment media — download_dep_media","text":"","code":"download_dep_media( dataset, depID, species = NULL, favorite = FALSE, outputfolder = NULL )"},{"path":"/reference/download_dep_media.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download deployment media — download_dep_media","text":"dataset character string, path folder camptraptor datapackage unzipped. depID character string, ID deployment download media . species character string, latin name species download favorite boolean, want pretty pictures? outputfolder character string, path function download media ","code":""},{"path":"/reference/download_dep_media.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download deployment media — download_dep_media","text":"Downloads specified media files outputfolder","code":""},{"path":"/reference/download_dep_media.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download deployment media — download_dep_media","text":"getting Authorization Error (#403), probably means Agouti project Restrict Images . needs turned . depID = \"\" favorite = TRUE, function download favorited pictures whole dataset.","code":""},{"path":[]},{"path":"/reference/download_dep_media.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download deployment media — download_dep_media","text":"Lynn Pallemaerts Emma Cartuyvels Sander Devisscher Soria Delva","code":""},{"path":"/reference/download_dep_media.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download deployment media — download_dep_media","text":"","code":"if (FALSE) { # \\dontrun{ drg <- fistools::drg_example # Situation 1: download whole deployment download_dep_media(dataset = drg, depID = \"96413aa6-5f1f-4dfb-8fab-8f06decc179f\") # Situation 2: download only wanted species download_dep_media(dataset = drg, depID = \"96413aa6-5f1f-4dfb-8fab-8f06decc179f\", species = \"Dama dama\") # Situation 3: download only favorited species media download_dep_media(dataset = drg, depID = \"96413aa6-5f1f-4dfb-8fab-8f06decc179f\", species = \"Dama dama\", favorite = TRUE) # Situation 4: download only favorited species media download_dep_media(dataset = drg, depID = \"all\", favorite = TRUE) } # }"},{"path":"/reference/download_gdrive_if_missing.html","id":null,"dir":"Reference","previous_headings":"","what":"Download gdrive if missing — download_gdrive_if_missing","title":"Download gdrive if missing — download_gdrive_if_missing","text":"function downloads specified file google drive destination file exist. exist user prompted download .","code":""},{"path":"/reference/download_gdrive_if_missing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download gdrive if missing — download_gdrive_if_missing","text":"","code":"download_gdrive_if_missing(gfileID, destfile, update_always = FALSE, email)"},{"path":"/reference/download_gdrive_if_missing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download gdrive if missing — download_gdrive_if_missing","text":"gfileID character google file token destfile character destination filename extention update_always optional boolean trigger download everytime function run. default FALSE. email optional character specifying users email used access googledrive file.","code":""},{"path":"/reference/download_gdrive_if_missing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download gdrive if missing — download_gdrive_if_missing","text":"destination file missing downloaded googledrive.","code":""},{"path":"/reference/download_gdrive_if_missing.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download gdrive if missing — download_gdrive_if_missing","text":"best practice provide email encrypted form. can easily achieved adding email item .renviron file even beter using robust encryption methods. PERMISSION_DENIED error occurs, likely file shared email address provided. can fixed sharing file email address. file shared correctly might indicate email address correct permissions access file. can fixed running googledrive::drive_deauth() followed googledrive::drive_auth() making sure 'show, modify delete drive files' option selected. Additionally running options(gargle_oauth_cache = \".secrets\") prior running function can fix issue. error yet persists please create new issue github page.","code":""},{"path":[]},{"path":"/reference/download_gdrive_if_missing.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download gdrive if missing — download_gdrive_if_missing","text":"Sander Devisscher","code":""},{"path":"/reference/download_gdrive_if_missing.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download gdrive if missing — download_gdrive_if_missing","text":"","code":"if (FALSE) { # \\dontrun{ # download newest version of the team charter download_gdrive_if_missing(gfileID = \"1gtqcZojPnbLhEgpul3r9sy2zK3UyyCVG\", destfile = \"../../Teamcharters/Teamcharter_FIS.pdf\", email = Sys.getenv(\"email\"), update_always = TRUE) } # } if (FALSE) { # \\dontrun{ # download newest DRG Agouti export download_gdrive_if_missing(gfileID = \"1FX8DDyREKMH1M3iW9ijWjVjO_tBH8PXi\", destfile = \"../fis-projecten/Grofwild/Drongengoed/Input/Agouti/drongengoed_240502.zip\", email = Sys.getenv(\"email\"), update_always = TRUE) } # }"},{"path":"/reference/download_seq_media.html","id":null,"dir":"Reference","previous_headings":"","what":"Download sequence media — download_seq_media","title":"Download sequence media — download_seq_media","text":"function allows user download media related Agouti - sequence matches given parameters.","code":""},{"path":"/reference/download_seq_media.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download sequence media — download_seq_media","text":"","code":"download_seq_media(dataset, seqID, favorite = FALSE, outputfolder = NULL)"},{"path":"/reference/download_seq_media.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download sequence media — download_seq_media","text":"dataset character string, path folder camptraptor datapackage unzipped. seqID character string, ID sequence download media favorite boolean, want pretty pictures? outputfolder character string, path function download media ","code":""},{"path":"/reference/download_seq_media.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download sequence media — download_seq_media","text":"Downloads specified media files outputfolder","code":""},{"path":"/reference/download_seq_media.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download sequence media — download_seq_media","text":"getting Authorization Error (#403), probably means Agouti project Restrict Images . needs turned .","code":""},{"path":[]},{"path":"/reference/download_seq_media.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download sequence media — download_seq_media","text":"Lynn Pallemaerts Emma Cartuyvels Sander Devisscher Soria Delva","code":""},{"path":"/reference/download_seq_media.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download sequence media — download_seq_media","text":"","code":"if (FALSE) { # \\dontrun{ drg <- fistools::drg_example # Situation 1: download whole sequence download_seq_media(dataset = drg, seqID = \"f4c049d2-d42f-4cd3-a951-fd485ed0279a\") # Situation 2: download only favorited species media within sequence download_seq_media(dataset = drg, seqID = \"f4c049d2-d42f-4cd3-a951-fd485ed0279a\", favorite = TRUE) } # }"},{"path":"/reference/drg_example.html","id":null,"dir":"Reference","previous_headings":"","what":"drg_example — drg_example","title":"drg_example — drg_example","text":"Subset Drongengoed Agouti export testing functions","code":""},{"path":"/reference/drg_example.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"drg_example — drg_example","text":"","code":"drg_example"},{"path":"/reference/drg_example.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"drg_example — drg_example","text":"datapackage deployments Lijst van geselecteerde deployments observations Observaties van de geselecteerde deployments media Lijst van media-urls van de geselecteerde deployments","code":""},{"path":"/reference/drg_example.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"drg_example — drg_example","text":"https://www.agouti.eu","code":""},{"path":[]},{"path":"/reference/install_sp.html","id":null,"dir":"Reference","previous_headings":"","what":"install sp — install_sp","title":"install sp — install_sp","text":"Helper function installs sp missing, tarball.","code":""},{"path":"/reference/install_sp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"install sp — install_sp","text":"","code":"install_sp(force = FALSE)"},{"path":"/reference/install_sp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"install sp — install_sp","text":"force logical indicating whether installation forced","code":""},{"path":"/reference/install_sp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"install sp — install_sp","text":"\"sp\" package unloaded namespace needed anymore. Every function uses \"sp\" start call function. end call unloadNamespace(\"sp\"). \"sp\" package known cause conflicts packages.","code":""},{"path":"/reference/install_sp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"install sp — install_sp","text":"Sander Devisscher","code":""},{"path":"/reference/label_converter.html","id":null,"dir":"Reference","previous_headings":"","what":"label converter — label_converter","title":"label converter — label_converter","text":"Script convert labelnummer, soort en/labeltype en jaar afschotlabel","code":""},{"path":"/reference/label_converter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"label converter — label_converter","text":"","code":"label_converter( input, id_column, labelnummer_column, soort_column, labeltype_column = NULL, jaar_column, output_style = \"eloket\" )"},{"path":"/reference/label_converter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"label converter — label_converter","text":"input dataframe containing necessary columns. id_column character string pointing column used link result input. labelnummer_column character string pointing column containing label numbers. soort_column character string pointing column containing species. labeltype_column character string pointing column containing label types. jaar_column character string pointing column containing years. output_style character string specifying output style. Can \"eloket\" \"labo\". Default \"eloket\".","code":""},{"path":"/reference/label_converter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"label converter — label_converter","text":"dataframe containing 2 columns: id & label","code":""},{"path":"/reference/label_converter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"label converter — label_converter","text":"input dataframe least contain id_column & labelnummer_column values can 'hardcoded'.","code":""},{"path":"/reference/label_converter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"label converter — label_converter","text":"","code":"if (FALSE) { # \\dontrun{ # provide a dataframe with the necessary columns df <- data.frame( id = 1:1000, labelnummer = sample(1:1000, 1000, replace = TRUE), soort = sample(c(\"REE\", \"WILD ZWIJN\", \"DAMHERT\"), 1000, replace = TRUE), labeltype = sample(c(\"REEKITS\", \"REEGEIT\", \"REEBOK\", NA), 1000, replace = TRUE), jaar = sample(2018:2020, 1000, replace = TRUE) ) labels <- label_converter(df, \"id\", \"labelnummer\", \"soort\", \"labeltype\", \"jaar\", \"eloket\") # provide a dataframe with labelnummer & labeltype & hardcode soort & jaar df <- data.frame( id = 1:1000, labelnummer = sample(1:1000, 1000, replace = TRUE), labeltype = sample(c(\"REEKITS\", \"REEGEIT\", \"REEBOK\", NA), 1000, replace = TRUE) ) labels <- label_converter(df, \"id\", \"labelnummer\", \"REE\", \"labeltype\", 2020, \"eloket\") # provide a dataframe with labelnummer & soort & hardcode labeltype & jaar df <- data.frame( id = 1:1000, labelnummer = sample(1:1000, 1000, replace = TRUE), soort = sample(c(\"REE\", \"WILD ZWIJN\", \"DAMHERT\"), 1000, replace = TRUE)) labels <- label_converter(df, \"id\", \"labelnummer\", \"soort\", \"REEKITS\", 2020, \"eloket\") # provide a dataframe with mixed labelnummers & labeltype & hardcode soort & jaar ## remark: run the function once prior to testing df <- labels %>% left_join(df %>% select(-labelnummer), by = \"id\") %>% add_row(id = setdiff(1:1000, labels$id)) %>% mutate(labelnummer = ifelse(is.na(labelnummer), sample(1:1000, 1000, replace = TRUE), labelnummer)) %>% mutate(labeltype = ifelse(is.na(labeltype), sample(c(\"REEKITS\", \"REEGEIT\", \"REEBOK\", NA), 1000, replace = TRUE), labeltype)) labels <- label_converter(df, \"id\", \"labelnummer\", \"REE\", \"labeltype\", 2020, \"eloket\") # to troubleshoot df_test <- df[!df$id %in% labels$id,] } # }"},{"path":"/reference/label_selecter.html","id":null,"dir":"Reference","previous_headings":"","what":"label_selecter — label_selecter","title":"label_selecter — label_selecter","text":"Deze functie onderzoekt de labels bestaan de datasets AfschotMelding (), ToegekendeLabels (TL), Toekenningen_Cleaned (TL_Cleaned), Dieren_met_onderkaakgegevens (DMOG), Dieren_met_onderkaakgegevens_Georef (DMOGG).","code":""},{"path":"/reference/label_selecter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"label_selecter — label_selecter","text":"","code":"label_selecter( label, update = FALSE, label_type, jaar, soort, bo_dir = \"~/Github/backoffice-wild-analyse/\", debug = FALSE )"},{"path":"/reference/label_selecter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"label_selecter — label_selecter","text":"label een character (lijst) met labelnummer(s) die dienen onderzocht te worden. Dit kan 3 vormen (volgnummer, met streepjes zonder streepjes) een combinatie van deze vormen aangeleverd worden update een boolean die aangeeft ook de nog niet wegeschreven dwh - bestanden moeten worden gecontroleerd. label_type een een character (lijst) met labeltypes die dienen onderzocht te worden. jaar een numerieke (lijst) van jaren die dienen onderzocht te worden. soort een character van de soort die onderzocht dient te worden. bo_dir een character met de directory waar de backoffice-wild-analyse repository staat. debug een boolean die aangeeft de debug modus moet worden aangezet.","code":""},{"path":"/reference/label_selecter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"label_selecter — label_selecter","text":"Een dataframe met de volgende kolommen: INPUTLABEL: de input label LABELTYPE: de labeltype(s) die onderzocht worden JAAR: het jaar waarin de labels onderzocht worden AM_OLD: een boolean die aangeeft de label(s) AfschotMelding voorkomen voor de update van DWH_Connect AM_OLD_LABEL: de label(s) die AfschotMelding voorkomen voor de update van DWH_Connect TL_OLD: een boolean die aangeeft de label(s) ToegekendeLabels voorkomen voor de update van DWH_Connect TL_OLD_LABEL: de label(s) die ToegekendeLabels voorkomen voor de update van DWH_Connect TL_CLEANED: een boolean die aangeeft de label(s) Toekenningen_Cleaned voorkomen TL_CLEANED_LABEL: de label(s) die Toekenningen_Cleaned voorkomen DMOG: een boolean die aangeeft de label(s) Dieren_met_onderkaakgegevens voorkomen DMOG_LABEL: de label(s) die Dieren_met_onderkaakgegevens voorkomen DMOG_GEO: een boolean die aangeeft de label(s) Dieren_met_onderkaakgegevens_Georef voorkomen DMOG_GEO_LABEL: de label(s) die Dieren_met_onderkaakgegevens_Georef voorkomen Als update = TRUE worden de volgende kolommen toegevoegd: AM_NEW: een boolean die aangeeft de label(s) AfschotMelding voorkomen na de update van DWH_Connect AM_NEW_LABEL: de label(s) die AfschotMelding voorkomen na de update van DWH_Connect TL_NEW: een boolean die aangeeft de label(s) ToegekendeLabels voorkomen na de update van DWH_Connect TL_NEW_LABEL: de label(s) die ToegekendeLabels voorkomen na de update van DWH_Connect","code":""},{"path":"/reference/label_selecter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"label_selecter — label_selecter","text":"De parameter label_type, jaar en soort zijn enkel relevant als één van de labels de vorm 'volgnummer' heeft. Wanneer deze parameter niet gespecifieerd worden zal een default waarde voor het jaar (2013 t.e.m. max(AfschotMelding$Jaartal)) en label_type (c(\"REEGEIT\", \"REEKITS\", \"REEBOK\", \"WILD ZWIJN\", \"DAMHERT\", \"EDELHERT\")) gebruikt worden. Wanneer soort gespecifieerd zal de lijst van labeltypes beperkt worden tot deze die op de soort betrekking hebben. Voor ree bvb wordt dit reekits, reegeit en reebok. De parameters label, label_type, jaar en soort kunnen als lijst aangeleverd worden. De parameters label_type, jaar en soort zijn niet hoofdlettergevoelig. bo_dir de directory waar de backoffice-wild-analyse repository staat. De functie checkt namelijk de labels voorkomen de lokale versie van de backoffice-wild-analyse repository. Hiervoor het belangrijk dat de backoffice-wild-analyse repository lokaal aanwezig en de laatste versie gepulled . update een boolean die aangeeft de nog niet wegeschreven dwh - bestanden moeten worden gecontroleerd. om dit te kunnen lopen een verbinding met de DWH nodig. Dit enkel mogelijk als je met de VPN van het INBO verbonden bent. als je aanwezig bent op een vestiging van de Vlaamse Overheid (VAC).","code":""},{"path":"/reference/label_selecter.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"label_selecter — label_selecter","text":"Sander Devisscher","code":""},{"path":"/reference/label_selecter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"label_selecter — label_selecter","text":"","code":"if (FALSE) { # \\dontrun{ #enkel label: label <- c(1234, \"ANB2016REEGEIT001234\", \"ANB-2016-REEGEIT001234\") output <- label_selecter(label) #label & labeltype label <- c(1234, \"ANB2016REEGEIT001234\", \"ANB-2016-REEGEIT001234\") labeltype <- c(\"reegeit\", \"REEBOK\") output <- label_selecter(label, label_type = labeltype) #label & jaar & soort label <- c(1234, \"ANB2016REEGEIT001234\", \"ANB-2016-REEGEIT001234\") soort <- \"ree\" jaar <- c(2018, 2019) output <- label_selecter(label, jaar = jaar , soort = soort) } # }"},{"path":"/reference/lib_crs.html","id":null,"dir":"Reference","previous_headings":"","what":"Lib CRS — lib_crs","title":"Lib CRS — lib_crs","text":"Library commonly used coordinate reference system (CRS) codes","code":""},{"path":"/reference/lib_crs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Lib CRS — lib_crs","text":"","code":"lib_crs"},{"path":"/reference/lib_crs.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Lib CRS — lib_crs","text":"named list following elements: CRS_Naam ID CRS Proj4s Javascript Object Notation (JSON) CRS ESPG EPSG code CRS","code":""},{"path":"/reference/lib_crs.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Lib CRS — lib_crs","text":"WGS https://epsg.io/4326 BEL72 https://epsg.io/31300","code":""},{"path":"/reference/qd_pci1.html","id":null,"dir":"Reference","previous_headings":"","what":"Potential conflict index (first variant) — qd_pci1","title":"Potential conflict index (first variant) — qd_pci1","text":"questionnaire data analysis: potential conflict index","code":""},{"path":"/reference/qd_pci1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Potential conflict index (first variant) — qd_pci1","text":"","code":"qd_pci1(x, scale_values = c(-2:2), x_is_table = FALSE)"},{"path":"/reference/qd_pci1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Potential conflict index (first variant) — qd_pci1","text":"x vector scores respondents scale_values vector levels; default: -2:2 x_is_table TRUE, x table distribution scores","code":""},{"path":"/reference/qd_pci1.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Potential conflict index (first variant) — qd_pci1","text":"PCI-score (potential conflict index)","code":""},{"path":[]},{"path":"/reference/qd_pci1.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Potential conflict index (first variant) — qd_pci1","text":"","code":"if (FALSE) { # \\dontrun{ set.seed(201) Xv <- sample(-2:2, size = 100, replace = TRUE) #random responses Yv <- rep(c(-2,2),50) #most extreme difference Zv <- rep(2,100) #minimal difference #qd_pci1 qd_pci1(Xv, scale_values = -2:2, x_is_table = FALSE) # 0.4 qd_pci1(Yv, scale_values = -2:2, x_is_table = FALSE) # 1 qd_pci1(Zv, scale_values = -2:2, x_is_table = FALSE) # 0 } # }"},{"path":"/reference/qd_pci2.html","id":null,"dir":"Reference","previous_headings":"","what":"Potential conflict index (second variant) — qd_pci2","title":"Potential conflict index (second variant) — qd_pci2","text":"Calculates potential conflict index based distance matrix responses.","code":""},{"path":"/reference/qd_pci2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Potential conflict index (second variant) — qd_pci2","text":"","code":"qd_pci2( x, scale_values = c(-2:2), x_is_table = FALSE, m = 1, p = 1, print = FALSE )"},{"path":"/reference/qd_pci2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Potential conflict index (second variant) — qd_pci2","text":"x vector scores respondents scale_values vector levels; default: -2:2 x_is_table TRUE, x table distribution scores m correction; default: m = 1 p power; default: p = 1 print flag; TRUE print results","code":""},{"path":"/reference/qd_pci2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Potential conflict index (second variant) — qd_pci2","text":"PCI-score (potential conflict index)","code":""},{"path":[]},{"path":"/reference/qd_pci2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Potential conflict index (second variant) — qd_pci2","text":"","code":"if (FALSE) { # \\dontrun{ set.seed(201) Xv <- sample(-2:2, size = 100, replace = TRUE) #random responses Yv <- rep(c(-2,2),50) #most extreme difference Zv <- rep(2,100) #minimal difference #qd_pci2 - using D2 (m=1) qd_pci2(Xv, scale_values = -2:2, x_is_table = FALSE, m = 1, p = 1) # 0.37 qd_pci2(Yv, scale_values = -2:2, x_is_table = FALSE, m = 1, p = 1) # 1 qd_pci2(Zv, scale_values = -2:2, x_is_table = FALSE, m = 1, p = 1) # 0 qd_pci2(Xv, scale_values = -2:2, x_is_table = FALSE, m = 2, p = 1) # 0.31 qd_pci2(Yv, scale_values = -2:2, x_is_table = FALSE, m = 2, p = 1) # 1 qd_pci2(Zv, scale_values = -2:2, x_is_table = FALSE, m = 2, p = 1) # 0 } # }"},{"path":"/reference/qd_pci2_D.html","id":null,"dir":"Reference","previous_headings":"","what":"Distance matrix for qd_pci2 — qd_pci2_D","title":"Distance matrix for qd_pci2 — qd_pci2_D","text":"Calculates distance matrix function qd_pci2","code":""},{"path":"/reference/qd_pci2_D.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Distance matrix for qd_pci2 — qd_pci2_D","text":"","code":"qd_pci2_D(x, m = 1, p = 1)"},{"path":"/reference/qd_pci2_D.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Distance matrix for qd_pci2 — qd_pci2_D","text":"x vector scores respondents m m value formula (see details) p power value formula (see details)","code":""},{"path":"/reference/qd_pci2_D.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Distance matrix for qd_pci2 — qd_pci2_D","text":"single value containing pci index","code":""},{"path":"/reference/qd_pci2_D.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Distance matrix for qd_pci2 — qd_pci2_D","text":"$$Dp_{x,y} = (|r_{x} - r_{y}|) - (m-1))^{p}$$ $$sign(r_{x} \\neq r_{y}) \\\\ else d_{x,y} = 0$$ Dp_x,y = (|r_x - r_y| - (m-1))^p","code":""},{"path":[]},{"path":"/reference/qd_pci2_D.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Distance matrix for qd_pci2 — qd_pci2_D","text":"","code":"if (FALSE) { # \\dontrun{ #'set.seed(201) Xv <- sample(-2:2, size = 100, replace = TRUE) #random responses qd_pci2(Xv, scale_values = -2:2, x_is_table = FALSE, m = 1, p = 1) # 0.37 } # }"},{"path":"/reference/rename_ct_files.html","id":null,"dir":"Reference","previous_headings":"","what":"Rename camera trap files for upload in Agouti — rename_ct_files","title":"Rename camera trap files for upload in Agouti — rename_ct_files","text":"Function rename camera trap files (.e. photos) appending folder name (e.g. 1000RECX) file name (e.g. IMG0001) create unique file names across deployment. Needed deployments 9999 pictures, can uploaded Agouti. copy old rename_file_names() old fis-projecten (archived).","code":""},{"path":"/reference/rename_ct_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rename camera trap files for upload in Agouti — rename_ct_files","text":"","code":"rename_ct_files( foldername, extensions = c(\"jpg\", \"png\", \"jpeg\", \"bmp\"), compile = FALSE )"},{"path":"/reference/rename_ct_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rename camera trap files for upload in Agouti — rename_ct_files","text":"foldername DCIM folder treated extensions file extensions rename. Default jpg, jpeg, bmp png compile logical. TRUE, files compiled single folder","code":""},{"path":"/reference/rename_ct_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rename camera trap files for upload in Agouti — rename_ct_files","text":"renamed picture files original folder","code":""},{"path":"/reference/rename_ct_files.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Rename camera trap files for upload in Agouti — rename_ct_files","text":"function rename files subfolders folder specified foldername. foldername provided, user prompted select folder. function rename files extensions specified extensions argument. function also compile files single folder compile set TRUE.","code":""},{"path":"/reference/rename_ct_files.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rename camera trap files for upload in Agouti — rename_ct_files","text":": Lynn Pallemaerts Someone ","code":""},{"path":"/reference/rename_ct_files.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rename camera trap files for upload in Agouti — rename_ct_files","text":"","code":"if (FALSE) { # \\dontrun{ tempzip <- tempfile(fileext = \".zip\") fistools::download_gdrive_if_missing(gfileID = \"1-84hbKouLKGwnLgBSRaQO1BnfogoFZWz\", destfile = tempzip, email = Sys.getenv(\"email\"), update_always = TRUE) foldername <- paste0(tempdir(), \"/test_case_renaming\") unzip(tempzip, exdir = tempdir()) rename_ct_files(foldername) browseURL(foldername) unlink(foldername, recursive = TRUE) # The function also works when no foldername is provided rename_ct_files() # The function can also compile all files in a single folder rename_ct_files(foldername, compile = TRUE) browseURL(foldername) unlink(foldername, recursive = TRUE) } # }"},{"path":"/reference/sunsetter.html","id":null,"dir":"Reference","previous_headings":"","what":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","title":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","text":"sunsetter Calculate sunrise sunset times given range dates location","code":""},{"path":"/reference/sunsetter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","text":"","code":"sunsetter( StartDate = Sys.Date(), EndDate = Sys.Date(), lat = 50.866572, lng = 4.350309 )"},{"path":"/reference/sunsetter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","text":"StartDate Date %y-%m-%d format indicating startdate dataframe. Defaults today EndDate Date %y-%m-%d format indicating enddate dataframe. Defaults today lat Numeric indicating latitude. Defaults Herman Teirlinck building Brussels lng Numeric indicating longitude. Defaults Herman Teirlinck building Brussels","code":""},{"path":"/reference/sunsetter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","text":"dataframe containing dates startdate enddate, corresponding sunrise time sunset time.","code":""},{"path":"/reference/sunsetter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","text":"function uses sunrise-sunset API calculate sunrise sunset times given range dates fixed location. default location Herman Teirlinck building Brussels. StartDate EndDate specified, function return sunrise sunset times today.","code":""},{"path":[]},{"path":"/reference/sunsetter.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","text":"Sander Devisscher","code":""},{"path":"/reference/sunsetter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","text":"","code":"if (FALSE) { # \\dontrun{ # sunrise and sunset times for the first 10 days of 2021 in Brussels sunsetter(StartDate = \"2021-01-01\", EndDate = \"2021-01-10\", lat = 50.866572, lng = 4.350309) # sunrise and sunset times for today in Brussels sunsetter() } # }"},{"path":"/reference/sunsetter2.html","id":null,"dir":"Reference","previous_headings":"","what":"sunsetter2 — sunsetter2","title":"sunsetter2 — sunsetter2","text":"Calculate sunrise sunset times given set date location combinations","code":""},{"path":"/reference/sunsetter2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"sunsetter2 — sunsetter2","text":"","code":"sunsetter2(df, dates, lat, lng)"},{"path":"/reference/sunsetter2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"sunsetter2 — sunsetter2","text":"df dataframe containing dates, latitudes longitudes dates vector dates contained dataframe lat vector latitudes contained dataframe lng vector longitudes contained dataframe","code":""},{"path":"/reference/sunsetter2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"sunsetter2 — sunsetter2","text":"dataframe containing dates, latitudes, longitudes, sunrise time sunset time.","code":""},{"path":"/reference/sunsetter2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"sunsetter2 — sunsetter2","text":"function uses sunrise-sunset API calculate sunrise sunset times given set date location combinations.","code":""},{"path":[]},{"path":"/reference/sunsetter2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"sunsetter2 — sunsetter2","text":"Sander Devisscher","code":""},{"path":"/reference/sunsetter2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"sunsetter2 — sunsetter2","text":"","code":"if (FALSE) { # \\dontrun{ # create a dataframe with dates, latitudes and longitudes df <- data.frame(dates = c(\"2021-01-01\", \"2021-01-01\", \"2020-12-25\"), location = c(\"Brussels\", \"Amsterdam\", \"Brussels\"), lat = c(50.866572, 52.367573, 50.866572), lng = c(4.350309, 4.904138, 4.350309), remarks = c(\"New Year's Day\", \"New Year's Day\", \"Christmas Day\")) # calculate the sunrise and sunset times for the dataframe sunsets <- sunsetter2(df) # add the sunrise and sunset times to the dataframe df <- dplyr::bind_cols(df, sunsets %>% dplyr::select(-dates)) df } # }"}] +[{"path":[]},{"path":"/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement codeofconduct@posit.co. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 fistools authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Sander Devisscher. Author, maintainer. Lynn Pallemaerts. Author. Soria Delva. Author. Emma Cartuyvels. Author. Martijn Bollen. Author.","code":""},{"path":"/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Devisscher S, Pallemaerts L, Delva S, Cartuyvels E, Bollen M (2025). fistools: Tools & data used wildlife management & invasive species Flanders. R package version 1.2.20.","code":"@Manual{, title = {fistools: Tools & data used for wildlife management & invasive species in Flanders}, author = {Sander Devisscher and Lynn Pallemaerts and Soria Delva and Emma Cartuyvels and Martijn Bollen}, year = {2025}, note = {R package version 1.2.20}, }"},{"path":"/index.html","id":"fistools","dir":"","previous_headings":"","what":"Tools & data used for wildlife management & invasive species in Flanders","title":"Tools & data used for wildlife management & invasive species in Flanders","text":"Repo containing widely used data & functions FIS team","code":""},{"path":"/index.html","id":"installatie","dir":"","previous_headings":"","what":"installatie","title":"Tools & data used for wildlife management & invasive species in Flanders","text":"","code":"devtools::install_github(\"inbo/fistools\")"},{"path":"/index.html","id":"what-can-i-do-with-this-package","dir":"","previous_headings":"","what":"what can I do with this package?","title":"Tools & data used for wildlife management & invasive species in Flanders","text":"list functions & datasets can found reference page","code":""},{"path":"/reference/CRS_extracter.html","id":null,"dir":"Reference","previous_headings":"","what":"CRS_extracter — CRS_extracter","title":"CRS_extracter — CRS_extracter","text":"Extracts coordinate reference system (CRS) library commonly used CRS codes also fixes issues belge lambert 72 use. EPSG code 31370, proj4string one EPSG database.","code":""},{"path":"/reference/CRS_extracter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"CRS_extracter — CRS_extracter","text":"","code":"CRS_extracter(CRS, EPSG = TRUE)"},{"path":"/reference/CRS_extracter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"CRS_extracter — CRS_extracter","text":"CRS character string name CRS EPSG logical indicating whether output EPSG format","code":""},{"path":"/reference/CRS_extracter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"CRS_extracter — CRS_extracter","text":"CRS object","code":""},{"path":[]},{"path":"/reference/CRS_extracter.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"CRS_extracter — CRS_extracter","text":"Sander Devisscher","code":""},{"path":"/reference/CRS_extracter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"CRS_extracter — CRS_extracter","text":"","code":"if (FALSE) { # \\dontrun{ # Example of how to use the CRS_extracter function crs_wgs <- CRS_extracter(\"WGS\", EPSG = FALSE) crs_bel <- CRS_extracter(\"BEL72\", EPSG = FALSE) epsg_wgs <- CRS_extracter(\"WGS\", EPSG = TRUE) # Example of how to use the CRS_extracter function in combination with the sf & leaflet packages library(sf) library(tidyverse) library(leaflet) boswachterijen_df <- boswachterijen$boswachterijen_2024 %>% st_transform(crs_bel) %>% mutate(centroid = st_centroid(geometry)) %>% st_drop_geometry() %>% st_as_sf(sf_column_name = \"centroid\", crs = crs_bel) %>% st_transform(crs_wgs) leaflet() %>% addTiles() %>% addPolylines(data = boswachterijen$boswachterijen_2024) %>% addCircles(data = boswachterijen_df, color = \"red\", radius = 1000) } # }"},{"path":"/reference/UUID_List.html","id":null,"dir":"Reference","previous_headings":"","what":"UUID list generator — UUID_List","title":"UUID list generator — UUID_List","text":"helper script generate list UUIDs","code":""},{"path":"/reference/UUID_List.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"UUID list generator — UUID_List","text":"","code":"UUID_List(temp_input)"},{"path":"/reference/UUID_List.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"UUID list generator — UUID_List","text":"temp_input data.frame UUIDs appended","code":""},{"path":"/reference/apply_grtsdb.html","id":null,"dir":"Reference","previous_headings":"","what":"apply grtsdb — apply_grtsdb","title":"apply grtsdb — apply_grtsdb","text":"Applies grtsdb::extract_sample inbo/GRTSdb custom perimeter. function installs GRTSdb missing machine.","code":""},{"path":"/reference/apply_grtsdb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"apply grtsdb — apply_grtsdb","text":"","code":"apply_grtsdb(perimeter, cellsize = 100, n = 20, export_path = \".\", seed)"},{"path":"/reference/apply_grtsdb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"apply grtsdb — apply_grtsdb","text":"perimeter simple features (sf) object cellsize optional integer. size cell. Either single value one value dimension. Passed onto extract_sample GRTSdb. Default 100. n optional integer. sample size. Passed onto extract_sample GRTSdb. Default 20 export_path optional character string pointing path GRTSdb.sqlite created. Default \".\" seed optional character. Allowing rerun previous use.","code":""},{"path":"/reference/apply_grtsdb.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"apply grtsdb — apply_grtsdb","text":"function apply grtsdb custom perimeter GRTSdb automatically installed missing system.","code":""},{"path":[]},{"path":"/reference/apply_grtsdb.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"apply grtsdb — apply_grtsdb","text":"Sander Devisscher","code":""},{"path":"/reference/apply_grtsdb.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"apply grtsdb — apply_grtsdb","text":"","code":"if (FALSE) { # \\dontrun{ # Preparation perimeter <- sf::st_as_sf(boswachterijen$boswachterijen_2024) %>% dplyr::filter(Regio == \"Taxandria\", Naam == \"vacant 4\") # A new sample sample <- apply_grtsdb(perimeter, cellsize = 1000, n = 20, export_path = \".\") leaflet::leaflet() %>% leaflet::addTiles() %>% leaflet::addCircles(data = sample$samples, color = \"red\") %>% leaflet::addPolylines(data = sample$grid, color = \"blue\") %>% leaflet::addPolylines(data = perimeter, color = \"black\") # Reuse a old sample seed <- sample$seed sample <- apply_grtsdb(perimeter, cellsize = 1000, n = 20, export_path = \".\", seed = seed) leaflet::leaflet() %>% leaflet::addTiles() %>% leaflet::addCircles(data = sample$samples, color = \"red\") %>% leaflet::addPolylines(data = sample$grid, color = \"blue\") %>% leaflet::addPolylines(data = perimeter, color = \"black\") } # }"},{"path":"/reference/boswachterijen.html","id":null,"dir":"Reference","previous_headings":"","what":"Boswachterijen — boswachterijen","title":"Boswachterijen — boswachterijen","text":"Spatiale en andere informatie (o.. telefoonummers) van de boswachterijen van ANB.","code":""},{"path":"/reference/boswachterijen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Boswachterijen — boswachterijen","text":"","code":"boswachterijen"},{"path":[]},{"path":"/reference/boswachterijen.html","id":"boswachterijen","dir":"Reference","previous_headings":"","what":"boswachterijen","title":"Boswachterijen — boswachterijen","text":"En sf data frame 98 rijen 11 kolommen per jaar: Regio Beheerregio Naam Naam van de boswachter telefoon Telefoon nr van de boswachter","code":""},{"path":"/reference/boswachterijen.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Boswachterijen — boswachterijen","text":"https://www..int/teams/global-tuberculosis-programme/data","code":""},{"path":[]},{"path":"/reference/calculate_polygon_centroid.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate the centroid of a polygon — calculate_polygon_centroid","title":"Calculate the centroid of a polygon — calculate_polygon_centroid","text":"function calculates centroid polygon returns latitude, longitude uncertainty centroid.","code":""},{"path":"/reference/calculate_polygon_centroid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate the centroid of a polygon — calculate_polygon_centroid","text":"","code":"calculate_polygon_centroid(sf_df, id)"},{"path":"/reference/calculate_polygon_centroid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate the centroid of a polygon — calculate_polygon_centroid","text":"sf_df sf object polygons id character string name column containing unique identifier","code":""},{"path":"/reference/calculate_polygon_centroid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate the centroid of a polygon — calculate_polygon_centroid","text":"data frame unique identifier, latitude, longitude uncertainty centroid","code":""},{"path":"/reference/calculate_polygon_centroid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate the centroid of a polygon — calculate_polygon_centroid","text":"function always returns latitude & longitude polygon centroid uncertainty centroid. uncertainty calculated maximum distance centroid vertrexes polygon. crs input wgs84 centroidX & centroidY also returned. crs columns equal crs input sf data frame.","code":""},{"path":[]},{"path":"/reference/calculate_polygon_centroid.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculate the centroid of a polygon — calculate_polygon_centroid","text":"Sander Devisscher","code":""},{"path":"/reference/calculate_polygon_centroid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate the centroid of a polygon — calculate_polygon_centroid","text":"","code":"if (FALSE) { # \\dontrun{ # Example of how to use the calculate_polygon_centroid function # Load the necessary data boswachterijen <- boswachterijen$boswachterijen_2024 # add a unique identifier to the sf object boswachterijen <- boswachterijen %>% dplyr::mutate(UUID = as.character(row_number())) # Calculate the centroid of the polygons centroids_data_final <- calculate_polygon_centroid(sf_df = boswachterijen, id = \"UUID\") # Plot the polygons and the centroids library(leaflet) # Sample 1 polygon and 1 centroid to plot using id sample_id <- sample(centroids_data_final$UUID, 1) leaflet() %>% addProviderTiles(\"CartoDB.Positron\") %>% addPolygons(data = boswachterijen %>% dplyr::filter(UUID == sample_id), weight = 1, color = \"black\", fillOpacity = 0.5) %>% addCircles(data = centroids_data_final %>% dplyr::filter(UUID == sample_id), lat = ~centroidLatitude, lng = ~centroidLongitude, radius = 5, color = \"black\") %>% addCircles(data = centroids_data_final %>% dplyr::filter(UUID == sample_id), lat = ~centroidLatitude, lng = ~centroidLongitude, radius = ~centroidUncertainty, color = \"red\", weight = 1) } # }"},{"path":"/reference/check.html","id":null,"dir":"Reference","previous_headings":"","what":"Check — check","title":"Check — check","text":"Helper script determine existence environment panel","code":""},{"path":"/reference/check.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check — check","text":"","code":"check(x)"},{"path":"/reference/check.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check — check","text":"x environment object","code":""},{"path":"/reference/check.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check — check","text":"1 = object exists environment 0 = object exist environment","code":""},{"path":"/reference/check.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check — check","text":"work functions yield 0 default.","code":""},{"path":"/reference/check.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check — check","text":"Sander Devisscher","code":""},{"path":"/reference/cleanup_sqlite.html","id":null,"dir":"Reference","previous_headings":"","what":"cleanup sqlite — cleanup_sqlite","title":"cleanup sqlite — cleanup_sqlite","text":"helper script cleanup use apply_gtrsdb.","code":""},{"path":"/reference/cleanup_sqlite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"cleanup sqlite — cleanup_sqlite","text":"","code":"cleanup_sqlite(db = \"grts.sqlite\")"},{"path":"/reference/cleanup_sqlite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"cleanup sqlite — cleanup_sqlite","text":"db name temporary .sqlite db removed","code":""},{"path":"/reference/col_content_compare.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare column contents of two dataframes — col_content_compare","title":"Compare column contents of two dataframes — col_content_compare","text":"Compares content 2 similar columns two data frames. function prints list values missing first column, missing second column, values columns.","code":""},{"path":"/reference/col_content_compare.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare column contents of two dataframes — col_content_compare","text":"","code":"col_content_compare(df1, col1, df2, col2)"},{"path":"/reference/col_content_compare.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare column contents of two dataframes — col_content_compare","text":"df1 data frame col1 column name df1 df2 data frame col2 column name df2","code":""},{"path":"/reference/col_content_compare.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compare column contents of two dataframes — col_content_compare","text":"list values missing first column, missing second column, values columns.","code":""},{"path":[]},{"path":"/reference/col_content_compare.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compare column contents of two dataframes — col_content_compare","text":"Sander Devisscher","code":""},{"path":"/reference/col_content_compare.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compare column contents of two dataframes — col_content_compare","text":"","code":"if (FALSE) { # \\dontrun{ dataset1 <- data.frame(a = c(1, 2, 3, 4, 5), b = c(\"a\", \"b\", \"c\", \"d\", \"e\")) dataset2 <- data.frame(c = c(1, 2, 3, 4, 5), d = c(\"a\", \"b\", \"f\", \"d\", \"e\")) col_content_compare(df1 = dataset1, \"b\", df2 = dataset2, \"d\") } # }"},{"path":"/reference/colcompare.html","id":null,"dir":"Reference","previous_headings":"","what":"Columnname comparison — colcompare","title":"Columnname comparison — colcompare","text":"simple function list difference column names 2 datasets.","code":""},{"path":"/reference/colcompare.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Columnname comparison — colcompare","text":"","code":"colcompare(x, y)"},{"path":"/reference/colcompare.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Columnname comparison — colcompare","text":"x dataframe 1 y dataframe 2","code":""},{"path":"/reference/colcompare.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Columnname comparison — colcompare","text":"list columns present x y list columns present y x.","code":""},{"path":[]},{"path":"/reference/colcompare.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Columnname comparison — colcompare","text":"Sander Devisscher","code":""},{"path":"/reference/colcompare.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Columnname comparison — colcompare","text":"","code":"if (FALSE) { # \\dontrun{ # create example dataframes super_sleepers <- data.frame(rating=1:4, animal=c('koala', 'hedgehog', 'sloth', 'panda'), country=c('Australia', 'Italy', 'Peru', 'China'), avg_sleep_hours=c(21, 18, 17, 10)) super_actives <- data.frame(rating=1:4, animal=c('kangeroo', 'wolf', 'jaguar', 'tiger'), country=c('Australia', 'Italy', 'Peru', 'China'), avg_active_hours=c(16, 15, 8, 10)) colcompare(super_sleepers, super_actives) } # }"},{"path":"/reference/collect_osm_features.html","id":null,"dir":"Reference","previous_headings":"","what":"collect OpenStreetMaps features — collect_osm_features","title":"collect OpenStreetMaps features — collect_osm_features","text":"Extracts spatial features OpenStreetMaps server: features extracted re-classified broad categories: osm_polygons: urban, agriculture, open, forest, water osm_lines: roads, waterways osm_points: city names","code":""},{"path":"/reference/collect_osm_features.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"collect OpenStreetMaps features — collect_osm_features","text":"","code":"collect_osm_features( proj_bbox, download_features = \"all\", landuse_elements = \"all\", line_elements = \"all\" )"},{"path":"/reference/collect_osm_features.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"collect OpenStreetMaps features — collect_osm_features","text":"proj_bbox bbox. bounding box project/ study area extract osm features. download_features character. \"\" download features. \"polygons\", \"lines\" \"points\" download polygon, line point features respectively. Combinations also possible (e.g. c(\"polygons\", \"points\")). Default \"\". landuse_elements character. \"\" download landuse classes. \"urban\", \"agriculture\", \"open\", \"forest\" \"water\" download landuse classes interest. Combinations also possible (e.g. c(\"urban\", \"forest\", \"water\")) Default \"\". line_elements character. \"\" download line elements. \"road\", \"water\" download roads rivers, streams etc. respectively. Default \"\"","code":""},{"path":"/reference/collect_osm_features.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"collect OpenStreetMaps features — collect_osm_features","text":"named list 3 sf data frames: osm_polygons, osm_lines, osm_points. sf data frame contains corresponding geometry types.","code":""},{"path":"/reference/collect_osm_features.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"collect OpenStreetMaps features — collect_osm_features","text":"function collect custom osm features project dplyr osmdata automatically installed missing system.","code":""},{"path":[]},{"path":"/reference/collect_osm_features.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"collect OpenStreetMaps features — collect_osm_features","text":"Martijn Bollen","code":""},{"path":"/reference/collect_osm_features.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"collect OpenStreetMaps features — collect_osm_features","text":"","code":"if (FALSE) { # \\dontrun{ # extract the bounding box (WGS84) for the Project proj_sf <- st_sfc(st_polygon(list(drg_example$spatial$coordinates[1,,])), crs = 4326) proj_bbox <- st_bbox(proj_sf) class(proj_bbox) # extract selected OSM features osm <- collect_osm_features(proj_bbox) # extract only polygon OSM features osm_polygons <- collect_osm_features(proj_bbox, download_features = \"polygons\") osm_lines <- collect_osm_features(proj_bbox, download_features = \"lines\") osm_points <- collect_osm_features(proj_bbox, download_features = \"points\") osm_forest_water <- collect_osm_features(proj_bbox, download_features = c(\"polygons\", \"points\"), landuse_elements = c(\"forest\", \"water\")) # extract combination of OSM features, subset line elements osm_polygons_roads <- collect_osm_features(proj_bbox, download_features = c(\"polygons\", \"lines\"), line_elements = \"road\") # calculate the area of each landuse class within the bbox landuse <- osm_polygons$osm_polygons %>% st_make_valid() %>% mutate(area = set_units(st_area(.), \"km^2\")) %>% group_by(landuse) %>% summarise(area = sum(area)) # plot ## polygons (p1 <- ggplot(osm_polygons$osm_polygons %>% filter(!is.na(landuse)) %>% arrange(landuse)) + geom_sf(aes(fill = landuse), col = NA) + scale_fill_manual(values = unique(arrange(osm$osm_polygons, landuse)$osm_fill)) + theme_void() + theme(legend.position = \"right\")) ## lines (p2 <- ggplot(osm_lines$osm_lines) + geom_sf(aes(col = line_element)) + scale_color_manual(values = c(\"grey50\", \"#0092da\")) + theme_void() + theme(legend.position = \"right\")) ## points (p3 <- ggplot(osm_points$osm_points) + geom_sf_label(aes(label = name))) ## combine features p1 + geom_sf(data = osm$osm_lines, aes(col = line_element)) + geom_sf_label(data = osm$osm_points, aes(label = name)) + scale_color_manual(values = c(\"grey20\", \"#0092da\")) + coord_sf(xlim = proj_bbox[c(\"xmin\", \"xmax\")], ylim = proj_bbox[c(\"ymin\", \"ymax\")]) } # }"},{"path":"/reference/connect_to_bucket.html","id":null,"dir":"Reference","previous_headings":"","what":"connect to bucket — connect_to_bucket","title":"connect to bucket — connect_to_bucket","text":"Deze functie refresht de sessiontoken nodig om contact te leggen met inbo AWS S3 buckets. De functie maakt een profiel aan met een sessiontoken die één uur geldig blijft. Deze heb je nodig om verbinding te maken met de s3 buckets.","code":""},{"path":"/reference/connect_to_bucket.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"connect to bucket — connect_to_bucket","text":"","code":"connect_to_bucket( bucket_name, bucket_type = \"inbo-uat\", role = \"inbo-developers-fis-role\" )"},{"path":"/reference/connect_to_bucket.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"connect to bucket — connect_to_bucket","text":"bucket_name String met de naam van de bucket. bucket_type String met het type bucket. ofwel \"inbo-uat\" \"inbo-prod\" role String met de rechtengroep waartoe je behoort. Default : \"inbo-developers-fis-role\"","code":""},{"path":"/reference/connect_to_bucket.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"connect to bucket — connect_to_bucket","text":"Dataframe met een lijst van bestanden op de bucket met relevante info.","code":""},{"path":"/reference/connect_to_bucket.html","id":"voorbereiding-","dir":"Reference","previous_headings":"","what":"Voorbereiding:","title":"connect to bucket — connect_to_bucket","text":"De volgende programma's moeten worden geïnstalleerd vooraleer je deze functie kunt gebruiken: -AWS CLI moet worden geïnstalleerd als dat nog niet gebeurd . Hiervoor heb je admin rechten nodig, een ict helpdesk call dus aan de orde. Na de installatie moeten je AWS credentials eenmalig aangemaakt worden. Voer hiervoor aws configure uit windows powershell. De credentials kan je bekomen bij Jens Polspoel. -devops-toolkit moet lokaal worden geïnstalleerd dit doe je door https://github.com/inbo/devops-toolkit te clonen dmv github dekstop. Vervolgens kopiëer je aws-cli-mfa-login.py & common.py naar de Home Directory van Windows. Default dat C:/Users/%voornaam_achternaam%/bin. -Python moet worden geïnstalleerd als dat nog niet gebeurd . Dit kan rechtstreeks R met onderstaande code: install.packages(\"reticulate\") reticulate::install_python() system('pip install boto3')","code":""},{"path":"/reference/connect_to_bucket.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"connect to bucket — connect_to_bucket","text":"Sander Devisscher Jens Polspoel","code":""},{"path":"/reference/connect_to_bucket.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"connect to bucket — connect_to_bucket","text":"","code":"if (FALSE) { # \\dontrun{ # Alleen de bucket_name is uiterst noodzakelijk: # Connect to the UAT bucket of exotenportaal: connect_to_bucket(\"inbo-exotenportaal-uat-eu-west-1-default\") # Connect to the UAT bucket of faunabeheer: connect_to_bucket(\"inbo-faunabeheer-uat-eu-west-1-default\") } # }"},{"path":"/reference/download_dep_media.html","id":null,"dir":"Reference","previous_headings":"","what":"Download deployment media — download_dep_media","title":"Download deployment media — download_dep_media","text":"function allows user download media related Agouti - dataset matches given parameters.","code":""},{"path":"/reference/download_dep_media.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download deployment media — download_dep_media","text":"","code":"download_dep_media( dataset, depID, species = NULL, favorite = FALSE, outputfolder = NULL )"},{"path":"/reference/download_dep_media.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download deployment media — download_dep_media","text":"dataset character string, path folder camptraptor datapackage unzipped. depID character string, ID deployment download media . species character string, latin name species download favorite boolean, want pretty pictures? outputfolder character string, path function download media ","code":""},{"path":"/reference/download_dep_media.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download deployment media — download_dep_media","text":"Downloads specified media files outputfolder","code":""},{"path":"/reference/download_dep_media.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download deployment media — download_dep_media","text":"getting Authorization Error (#403), probably means Agouti project Restrict Images . needs turned . depID = \"\" favorite = TRUE, function download favorited pictures whole dataset.","code":""},{"path":[]},{"path":"/reference/download_dep_media.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download deployment media — download_dep_media","text":"Lynn Pallemaerts Emma Cartuyvels Sander Devisscher Soria Delva","code":""},{"path":"/reference/download_dep_media.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download deployment media — download_dep_media","text":"","code":"if (FALSE) { # \\dontrun{ drg <- fistools::drg_example # Situation 1: download whole deployment download_dep_media(dataset = drg, depID = \"96413aa6-5f1f-4dfb-8fab-8f06decc179f\") # Situation 2: download only wanted species download_dep_media(dataset = drg, depID = \"96413aa6-5f1f-4dfb-8fab-8f06decc179f\", species = \"Dama dama\") # Situation 3: download only favorited species media download_dep_media(dataset = drg, depID = \"96413aa6-5f1f-4dfb-8fab-8f06decc179f\", species = \"Dama dama\", favorite = TRUE) # Situation 4: download only favorited species media download_dep_media(dataset = drg, depID = \"all\", favorite = TRUE) } # }"},{"path":"/reference/download_gdrive_if_missing.html","id":null,"dir":"Reference","previous_headings":"","what":"Download gdrive if missing — download_gdrive_if_missing","title":"Download gdrive if missing — download_gdrive_if_missing","text":"function downloads specified file google drive destination file exist. exist user prompted download .","code":""},{"path":"/reference/download_gdrive_if_missing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download gdrive if missing — download_gdrive_if_missing","text":"","code":"download_gdrive_if_missing(gfileID, destfile, update_always = FALSE, email)"},{"path":"/reference/download_gdrive_if_missing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download gdrive if missing — download_gdrive_if_missing","text":"gfileID character google file token destfile character destination filename extention update_always optional boolean trigger download everytime function run. default FALSE. email optional character specifying users email used access googledrive file.","code":""},{"path":"/reference/download_gdrive_if_missing.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download gdrive if missing — download_gdrive_if_missing","text":"destination file missing downloaded googledrive.","code":""},{"path":"/reference/download_gdrive_if_missing.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download gdrive if missing — download_gdrive_if_missing","text":"best practice provide email encrypted form. can easily achieved adding email item .renviron file even beter using robust encryption methods. PERMISSION_DENIED error occurs, likely file shared email address provided. can fixed sharing file email address. file shared correctly might indicate email address correct permissions access file. can fixed running googledrive::drive_deauth() followed googledrive::drive_auth() making sure 'show, modify delete drive files' option selected. Additionally running options(gargle_oauth_cache = \".secrets\") prior running function can fix issue. error yet persists please create new issue github page.","code":""},{"path":[]},{"path":"/reference/download_gdrive_if_missing.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download gdrive if missing — download_gdrive_if_missing","text":"Sander Devisscher","code":""},{"path":"/reference/download_gdrive_if_missing.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download gdrive if missing — download_gdrive_if_missing","text":"","code":"if (FALSE) { # \\dontrun{ # download newest version of the team charter download_gdrive_if_missing(gfileID = \"1gtqcZojPnbLhEgpul3r9sy2zK3UyyCVG\", destfile = \"../../Teamcharters/Teamcharter_FIS.pdf\", email = Sys.getenv(\"email\"), update_always = TRUE) } # } if (FALSE) { # \\dontrun{ # download newest DRG Agouti export download_gdrive_if_missing(gfileID = \"1FX8DDyREKMH1M3iW9ijWjVjO_tBH8PXi\", destfile = \"../fis-projecten/Grofwild/Drongengoed/Input/Agouti/drongengoed_240502.zip\", email = Sys.getenv(\"email\"), update_always = TRUE) } # }"},{"path":"/reference/download_seq_media.html","id":null,"dir":"Reference","previous_headings":"","what":"Download sequence media — download_seq_media","title":"Download sequence media — download_seq_media","text":"function allows user download media related Agouti - sequence matches given parameters.","code":""},{"path":"/reference/download_seq_media.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download sequence media — download_seq_media","text":"","code":"download_seq_media(dataset, seqID, favorite = FALSE, outputfolder = NULL)"},{"path":"/reference/download_seq_media.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download sequence media — download_seq_media","text":"dataset character string, path folder camptraptor datapackage unzipped. seqID character string, ID sequence download media favorite boolean, want pretty pictures? outputfolder character string, path function download media ","code":""},{"path":"/reference/download_seq_media.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download sequence media — download_seq_media","text":"Downloads specified media files outputfolder","code":""},{"path":"/reference/download_seq_media.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download sequence media — download_seq_media","text":"getting Authorization Error (#403), probably means Agouti project Restrict Images . needs turned .","code":""},{"path":[]},{"path":"/reference/download_seq_media.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download sequence media — download_seq_media","text":"Lynn Pallemaerts Emma Cartuyvels Sander Devisscher Soria Delva","code":""},{"path":"/reference/download_seq_media.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download sequence media — download_seq_media","text":"","code":"if (FALSE) { # \\dontrun{ drg <- fistools::drg_example # Situation 1: download whole sequence download_seq_media(dataset = drg, seqID = \"f4c049d2-d42f-4cd3-a951-fd485ed0279a\") # Situation 2: download only favorited species media within sequence download_seq_media(dataset = drg, seqID = \"f4c049d2-d42f-4cd3-a951-fd485ed0279a\", favorite = TRUE) } # }"},{"path":"/reference/drg_example.html","id":null,"dir":"Reference","previous_headings":"","what":"drg_example — drg_example","title":"drg_example — drg_example","text":"Subset Drongengoed Agouti export testing functions","code":""},{"path":"/reference/drg_example.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"drg_example — drg_example","text":"","code":"drg_example"},{"path":"/reference/drg_example.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"drg_example — drg_example","text":"datapackage deployments Lijst van geselecteerde deployments observations Observaties van de geselecteerde deployments media Lijst van media-urls van de geselecteerde deployments","code":""},{"path":"/reference/drg_example.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"drg_example — drg_example","text":"https://www.agouti.eu","code":""},{"path":[]},{"path":"/reference/install_depricated.html","id":null,"dir":"Reference","previous_headings":"","what":"install depricated package — install_depricated","title":"install depricated package — install_depricated","text":"Helper function installs depricated package missing, tarball.","code":""},{"path":"/reference/install_depricated.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"install depricated package — install_depricated","text":"","code":"install_depricated(package_name, version, force = FALSE)"},{"path":"/reference/install_depricated.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"install depricated package — install_depricated","text":"package_name character string indicating name package installed version character string indicating version package installed force logical indicating whether installation forced","code":""},{"path":"/reference/install_depricated.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"install depricated package — install_depricated","text":"Sometimes package depricated longer available CRAN. function allows install depricated package tarball. recommended use function necessary. first instance try find alternative package. Using depricated packages may cause conflicts unexpected behaviour.","code":""},{"path":[]},{"path":"/reference/install_depricated.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"install depricated package — install_depricated","text":"Sander Devisscher","code":""},{"path":"/reference/install_depricated.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"install depricated package — install_depricated","text":"","code":"if (FALSE) { # \\dontrun{ # install latest version of sp package instead of install_sp() install_depricated(\"sp\", \"2.1-3\") # trying to install a wrong version of maptools install_depricated(\"maptools\", \"2.1-3\", force = TRUE) } # }"},{"path":"/reference/install_sp.html","id":null,"dir":"Reference","previous_headings":"","what":"install sp — install_sp","title":"install sp — install_sp","text":"Helper function installs sp missing, tarball.","code":""},{"path":"/reference/install_sp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"install sp — install_sp","text":"","code":"install_sp(force = FALSE)"},{"path":"/reference/install_sp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"install sp — install_sp","text":"force logical indicating whether installation forced","code":""},{"path":"/reference/install_sp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"install sp — install_sp","text":"\"sp\" package unloaded namespace needed anymore. Every function uses \"sp\" start call function. end call unloadNamespace(\"sp\"). \"sp\" package known cause conflicts packages.","code":""},{"path":[]},{"path":"/reference/install_sp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"install sp — install_sp","text":"Sander Devisscher","code":""},{"path":"/reference/label_converter.html","id":null,"dir":"Reference","previous_headings":"","what":"label converter — label_converter","title":"label converter — label_converter","text":"Script convert labelnummer, soort en/labeltype en jaar afschotlabel","code":""},{"path":"/reference/label_converter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"label converter — label_converter","text":"","code":"label_converter( input, id_column, labelnummer_column, soort_column, labeltype_column = NULL, jaar_column, output_style = \"eloket\" )"},{"path":"/reference/label_converter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"label converter — label_converter","text":"input dataframe containing necessary columns. id_column character string pointing column used link result input. labelnummer_column character string pointing column containing label numbers. soort_column character string pointing column containing species. labeltype_column character string pointing column containing label types. jaar_column character string pointing column containing years. output_style character string specifying output style. Can \"eloket\" \"labo\". Default \"eloket\".","code":""},{"path":"/reference/label_converter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"label converter — label_converter","text":"dataframe containing 2 columns: id & label","code":""},{"path":"/reference/label_converter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"label converter — label_converter","text":"input dataframe least contain id_column & labelnummer_column values can 'hardcoded'.","code":""},{"path":"/reference/label_converter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"label converter — label_converter","text":"","code":"if (FALSE) { # \\dontrun{ # provide a dataframe with the necessary columns df <- data.frame( id = 1:1000, labelnummer = sample(1:1000, 1000, replace = TRUE), soort = sample(c(\"REE\", \"WILD ZWIJN\", \"DAMHERT\"), 1000, replace = TRUE), labeltype = sample(c(\"REEKITS\", \"REEGEIT\", \"REEBOK\", NA), 1000, replace = TRUE), jaar = sample(2018:2020, 1000, replace = TRUE) ) labels <- label_converter(df, \"id\", \"labelnummer\", \"soort\", \"labeltype\", \"jaar\", \"eloket\") # provide a dataframe with labelnummer & labeltype & hardcode soort & jaar df <- data.frame( id = 1:1000, labelnummer = sample(1:1000, 1000, replace = TRUE), labeltype = sample(c(\"REEKITS\", \"REEGEIT\", \"REEBOK\", NA), 1000, replace = TRUE) ) labels <- label_converter(df, \"id\", \"labelnummer\", \"REE\", \"labeltype\", 2020, \"eloket\") # provide a dataframe with labelnummer & soort & hardcode labeltype & jaar df <- data.frame( id = 1:1000, labelnummer = sample(1:1000, 1000, replace = TRUE), soort = sample(c(\"REE\", \"WILD ZWIJN\", \"DAMHERT\"), 1000, replace = TRUE)) labels <- label_converter(df, \"id\", \"labelnummer\", \"soort\", \"REEKITS\", 2020, \"eloket\") # provide a dataframe with mixed labelnummers & labeltype & hardcode soort & jaar ## remark: run the function once prior to testing df <- labels %>% left_join(df %>% select(-labelnummer), by = \"id\") %>% add_row(id = setdiff(1:1000, labels$id)) %>% mutate(labelnummer = ifelse(is.na(labelnummer), sample(1:1000, 1000, replace = TRUE), labelnummer)) %>% mutate(labeltype = ifelse(is.na(labeltype), sample(c(\"REEKITS\", \"REEGEIT\", \"REEBOK\", NA), 1000, replace = TRUE), labeltype)) labels <- label_converter(df, \"id\", \"labelnummer\", \"REE\", \"labeltype\", 2020, \"eloket\") # to troubleshoot df_test <- df[!df$id %in% labels$id,] } # }"},{"path":"/reference/label_selecter.html","id":null,"dir":"Reference","previous_headings":"","what":"label_selecter — label_selecter","title":"label_selecter — label_selecter","text":"Deze functie onderzoekt de labels bestaan de datasets AfschotMelding (), ToegekendeLabels (TL), Toekenningen_Cleaned (TL_Cleaned), Dieren_met_onderkaakgegevens (DMOG), Dieren_met_onderkaakgegevens_Georef (DMOGG).","code":""},{"path":"/reference/label_selecter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"label_selecter — label_selecter","text":"","code":"label_selecter( label, update = FALSE, label_type, jaar, soort, bo_dir = \"~/Github/backoffice-wild-analyse/\", debug = FALSE )"},{"path":"/reference/label_selecter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"label_selecter — label_selecter","text":"label een character (lijst) met labelnummer(s) die dienen onderzocht te worden. Dit kan 3 vormen (volgnummer, met streepjes zonder streepjes) een combinatie van deze vormen aangeleverd worden update een boolean die aangeeft ook de nog niet wegeschreven dwh - bestanden moeten worden gecontroleerd. label_type een een character (lijst) met labeltypes die dienen onderzocht te worden. jaar een numerieke (lijst) van jaren die dienen onderzocht te worden. soort een character van de soort die onderzocht dient te worden. bo_dir een character met de directory waar de backoffice-wild-analyse repository staat. debug een boolean die aangeeft de debug modus moet worden aangezet.","code":""},{"path":"/reference/label_selecter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"label_selecter — label_selecter","text":"Een dataframe met de volgende kolommen: INPUTLABEL: de input label LABELTYPE: de labeltype(s) die onderzocht worden JAAR: het jaar waarin de labels onderzocht worden AM_OLD: een boolean die aangeeft de label(s) AfschotMelding voorkomen voor de update van DWH_Connect AM_OLD_LABEL: de label(s) die AfschotMelding voorkomen voor de update van DWH_Connect TL_OLD: een boolean die aangeeft de label(s) ToegekendeLabels voorkomen voor de update van DWH_Connect TL_OLD_LABEL: de label(s) die ToegekendeLabels voorkomen voor de update van DWH_Connect TL_CLEANED: een boolean die aangeeft de label(s) Toekenningen_Cleaned voorkomen TL_CLEANED_LABEL: de label(s) die Toekenningen_Cleaned voorkomen DMOG: een boolean die aangeeft de label(s) Dieren_met_onderkaakgegevens voorkomen DMOG_LABEL: de label(s) die Dieren_met_onderkaakgegevens voorkomen DMOG_GEO: een boolean die aangeeft de label(s) Dieren_met_onderkaakgegevens_Georef voorkomen DMOG_GEO_LABEL: de label(s) die Dieren_met_onderkaakgegevens_Georef voorkomen Als update = TRUE worden de volgende kolommen toegevoegd: AM_NEW: een boolean die aangeeft de label(s) AfschotMelding voorkomen na de update van DWH_Connect AM_NEW_LABEL: de label(s) die AfschotMelding voorkomen na de update van DWH_Connect TL_NEW: een boolean die aangeeft de label(s) ToegekendeLabels voorkomen na de update van DWH_Connect TL_NEW_LABEL: de label(s) die ToegekendeLabels voorkomen na de update van DWH_Connect","code":""},{"path":"/reference/label_selecter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"label_selecter — label_selecter","text":"De parameter label_type, jaar en soort zijn enkel relevant als één van de labels de vorm 'volgnummer' heeft. Wanneer deze parameter niet gespecifieerd worden zal een default waarde voor het jaar (2013 t.e.m. max(AfschotMelding$Jaartal)) en label_type (c(\"REEGEIT\", \"REEKITS\", \"REEBOK\", \"WILD ZWIJN\", \"DAMHERT\", \"EDELHERT\")) gebruikt worden. Wanneer soort gespecifieerd zal de lijst van labeltypes beperkt worden tot deze die op de soort betrekking hebben. Voor ree bvb wordt dit reekits, reegeit en reebok. De parameters label, label_type, jaar en soort kunnen als lijst aangeleverd worden. De parameters label_type, jaar en soort zijn niet hoofdlettergevoelig. bo_dir de directory waar de backoffice-wild-analyse repository staat. De functie checkt namelijk de labels voorkomen de lokale versie van de backoffice-wild-analyse repository. Hiervoor het belangrijk dat de backoffice-wild-analyse repository lokaal aanwezig en de laatste versie gepulled . update een boolean die aangeeft de nog niet wegeschreven dwh - bestanden moeten worden gecontroleerd. om dit te kunnen lopen een verbinding met de DWH nodig. Dit enkel mogelijk als je met de VPN van het INBO verbonden bent. als je aanwezig bent op een vestiging van de Vlaamse Overheid (VAC).","code":""},{"path":[]},{"path":"/reference/label_selecter.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"label_selecter — label_selecter","text":"Sander Devisscher","code":""},{"path":"/reference/label_selecter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"label_selecter — label_selecter","text":"","code":"if (FALSE) { # \\dontrun{ #enkel label: label <- c(1234, \"ANB2016REEGEIT001234\", \"ANB-2016-REEGEIT001234\") output <- label_selecter(label) #label & labeltype label <- c(1234, \"ANB2016REEGEIT001234\", \"ANB-2016-REEGEIT001234\") labeltype <- c(\"reegeit\", \"REEBOK\") output <- label_selecter(label, label_type = labeltype) #label & jaar & soort label <- c(1234, \"ANB2016REEGEIT001234\", \"ANB-2016-REEGEIT001234\") soort <- \"ree\" jaar <- c(2018, 2019) output <- label_selecter(label, jaar = jaar , soort = soort) } # }"},{"path":"/reference/lib_crs.html","id":null,"dir":"Reference","previous_headings":"","what":"Lib CRS — lib_crs","title":"Lib CRS — lib_crs","text":"Library commonly used coordinate reference system (CRS) codes","code":""},{"path":"/reference/lib_crs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Lib CRS — lib_crs","text":"","code":"lib_crs"},{"path":"/reference/lib_crs.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Lib CRS — lib_crs","text":"named list following elements: CRS_Naam ID CRS Proj4s Javascript Object Notation (JSON) CRS ESPG EPSG code CRS","code":""},{"path":"/reference/lib_crs.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Lib CRS — lib_crs","text":"WGS https://epsg.io/4326 BEL72 https://epsg.io/31300","code":""},{"path":"/reference/qd_pci1.html","id":null,"dir":"Reference","previous_headings":"","what":"Potential conflict index (first variant) — qd_pci1","title":"Potential conflict index (first variant) — qd_pci1","text":"questionnaire data analysis: potential conflict index","code":""},{"path":"/reference/qd_pci1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Potential conflict index (first variant) — qd_pci1","text":"","code":"qd_pci1(x, scale_values = c(-2:2), x_is_table = FALSE)"},{"path":"/reference/qd_pci1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Potential conflict index (first variant) — qd_pci1","text":"x vector scores respondents scale_values vector levels; default: -2:2 x_is_table TRUE, x table distribution scores","code":""},{"path":"/reference/qd_pci1.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Potential conflict index (first variant) — qd_pci1","text":"PCI-score (potential conflict index)","code":""},{"path":[]},{"path":"/reference/qd_pci1.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Potential conflict index (first variant) — qd_pci1","text":"","code":"if (FALSE) { # \\dontrun{ set.seed(201) Xv <- sample(-2:2, size = 100, replace = TRUE) #random responses Yv <- rep(c(-2,2),50) #most extreme difference Zv <- rep(2,100) #minimal difference #qd_pci1 qd_pci1(Xv, scale_values = -2:2, x_is_table = FALSE) # 0.4 qd_pci1(Yv, scale_values = -2:2, x_is_table = FALSE) # 1 qd_pci1(Zv, scale_values = -2:2, x_is_table = FALSE) # 0 } # }"},{"path":"/reference/qd_pci2.html","id":null,"dir":"Reference","previous_headings":"","what":"Potential conflict index (second variant) — qd_pci2","title":"Potential conflict index (second variant) — qd_pci2","text":"Calculates potential conflict index based distance matrix responses.","code":""},{"path":"/reference/qd_pci2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Potential conflict index (second variant) — qd_pci2","text":"","code":"qd_pci2( x, scale_values = c(-2:2), x_is_table = FALSE, m = 1, p = 1, print = FALSE )"},{"path":"/reference/qd_pci2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Potential conflict index (second variant) — qd_pci2","text":"x vector scores respondents scale_values vector levels; default: -2:2 x_is_table TRUE, x table distribution scores m correction; default: m = 1 p power; default: p = 1 print flag; TRUE print results","code":""},{"path":"/reference/qd_pci2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Potential conflict index (second variant) — qd_pci2","text":"PCI-score (potential conflict index)","code":""},{"path":[]},{"path":"/reference/qd_pci2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Potential conflict index (second variant) — qd_pci2","text":"","code":"if (FALSE) { # \\dontrun{ set.seed(201) Xv <- sample(-2:2, size = 100, replace = TRUE) #random responses Yv <- rep(c(-2,2),50) #most extreme difference Zv <- rep(2,100) #minimal difference #qd_pci2 - using D2 (m=1) qd_pci2(Xv, scale_values = -2:2, x_is_table = FALSE, m = 1, p = 1) # 0.37 qd_pci2(Yv, scale_values = -2:2, x_is_table = FALSE, m = 1, p = 1) # 1 qd_pci2(Zv, scale_values = -2:2, x_is_table = FALSE, m = 1, p = 1) # 0 qd_pci2(Xv, scale_values = -2:2, x_is_table = FALSE, m = 2, p = 1) # 0.31 qd_pci2(Yv, scale_values = -2:2, x_is_table = FALSE, m = 2, p = 1) # 1 qd_pci2(Zv, scale_values = -2:2, x_is_table = FALSE, m = 2, p = 1) # 0 } # }"},{"path":"/reference/qd_pci2_D.html","id":null,"dir":"Reference","previous_headings":"","what":"Distance matrix for qd_pci2 — qd_pci2_D","title":"Distance matrix for qd_pci2 — qd_pci2_D","text":"Calculates distance matrix function qd_pci2","code":""},{"path":"/reference/qd_pci2_D.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Distance matrix for qd_pci2 — qd_pci2_D","text":"","code":"qd_pci2_D(x, m = 1, p = 1)"},{"path":"/reference/qd_pci2_D.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Distance matrix for qd_pci2 — qd_pci2_D","text":"x vector scores respondents m m value formula (see details) p power value formula (see details)","code":""},{"path":"/reference/qd_pci2_D.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Distance matrix for qd_pci2 — qd_pci2_D","text":"single value containing pci index","code":""},{"path":"/reference/qd_pci2_D.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Distance matrix for qd_pci2 — qd_pci2_D","text":"$$Dp_{x,y} = (|r_{x} - r_{y}|) - (m-1))^{p}$$ $$sign(r_{x} \\neq r_{y}) \\\\ else d_{x,y} = 0$$ Dp_x,y = (|r_x - r_y| - (m-1))^p","code":""},{"path":[]},{"path":"/reference/qd_pci2_D.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Distance matrix for qd_pci2 — qd_pci2_D","text":"","code":"if (FALSE) { # \\dontrun{ #'set.seed(201) Xv <- sample(-2:2, size = 100, replace = TRUE) #random responses qd_pci2(Xv, scale_values = -2:2, x_is_table = FALSE, m = 1, p = 1) # 0.37 } # }"},{"path":"/reference/rename_ct_files.html","id":null,"dir":"Reference","previous_headings":"","what":"Rename camera trap files for upload in Agouti — rename_ct_files","title":"Rename camera trap files for upload in Agouti — rename_ct_files","text":"Function rename camera trap files (.e. photos) appending folder name (e.g. 1000RECX) file name (e.g. IMG0001) create unique file names across deployment. Needed deployments 9999 pictures, can uploaded Agouti. copy old rename_file_names() old fis-projecten (archived).","code":""},{"path":"/reference/rename_ct_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rename camera trap files for upload in Agouti — rename_ct_files","text":"","code":"rename_ct_files( foldername, extensions = c(\"jpg\", \"png\", \"jpeg\", \"bmp\"), compile = FALSE )"},{"path":"/reference/rename_ct_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rename camera trap files for upload in Agouti — rename_ct_files","text":"foldername DCIM folder treated extensions file extensions rename. Default jpg, jpeg, bmp png compile logical. TRUE, files compiled single folder","code":""},{"path":"/reference/rename_ct_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rename camera trap files for upload in Agouti — rename_ct_files","text":"renamed picture files original folder","code":""},{"path":"/reference/rename_ct_files.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Rename camera trap files for upload in Agouti — rename_ct_files","text":"function rename files subfolders folder specified foldername. foldername provided, user prompted select folder. function rename files extensions specified extensions argument. function also compile files single folder compile set TRUE.","code":""},{"path":"/reference/rename_ct_files.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rename camera trap files for upload in Agouti — rename_ct_files","text":": Lynn Pallemaerts Someone ","code":""},{"path":"/reference/rename_ct_files.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rename camera trap files for upload in Agouti — rename_ct_files","text":"","code":"if (FALSE) { # \\dontrun{ tempzip <- tempfile(fileext = \".zip\") fistools::download_gdrive_if_missing(gfileID = \"1-84hbKouLKGwnLgBSRaQO1BnfogoFZWz\", destfile = tempzip, email = Sys.getenv(\"email\"), update_always = TRUE) foldername <- paste0(tempdir(), \"/test_case_renaming\") unzip(tempzip, exdir = tempdir()) rename_ct_files(foldername) browseURL(foldername) unlink(foldername, recursive = TRUE) # The function also works when no foldername is provided rename_ct_files() # The function can also compile all files in a single folder rename_ct_files(foldername, compile = TRUE) browseURL(foldername) unlink(foldername, recursive = TRUE) } # }"},{"path":"/reference/sunsetter.html","id":null,"dir":"Reference","previous_headings":"","what":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","title":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","text":"sunsetter Calculate sunrise sunset times given range dates location","code":""},{"path":"/reference/sunsetter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","text":"","code":"sunsetter( StartDate = Sys.Date(), EndDate = Sys.Date(), lat = 50.866572, lng = 4.350309 )"},{"path":"/reference/sunsetter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","text":"StartDate Date %y-%m-%d format indicating startdate dataframe. Defaults today EndDate Date %y-%m-%d format indicating enddate dataframe. Defaults today lat Numeric indicating latitude. Defaults Herman Teirlinck building Brussels lng Numeric indicating longitude. Defaults Herman Teirlinck building Brussels","code":""},{"path":"/reference/sunsetter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","text":"dataframe containing dates startdate enddate, corresponding sunrise time sunset time.","code":""},{"path":"/reference/sunsetter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","text":"function uses sunrise-sunset API calculate sunrise sunset times given range dates fixed location. default location Herman Teirlinck building Brussels. StartDate EndDate specified, function return sunrise sunset times today.","code":""},{"path":[]},{"path":"/reference/sunsetter.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","text":"Sander Devisscher","code":""},{"path":"/reference/sunsetter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"sunsetter Calculate the sunrise and sunset times for a given range of dates and location — sunsetter","text":"","code":"if (FALSE) { # \\dontrun{ # sunrise and sunset times for the first 10 days of 2021 in Brussels sunsetter(StartDate = \"2021-01-01\", EndDate = \"2021-01-10\", lat = 50.866572, lng = 4.350309) # sunrise and sunset times for today in Brussels sunsetter() } # }"},{"path":"/reference/sunsetter2.html","id":null,"dir":"Reference","previous_headings":"","what":"sunsetter2 — sunsetter2","title":"sunsetter2 — sunsetter2","text":"Calculate sunrise sunset times given set date location combinations","code":""},{"path":"/reference/sunsetter2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"sunsetter2 — sunsetter2","text":"","code":"sunsetter2(df, dates, lat, lng)"},{"path":"/reference/sunsetter2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"sunsetter2 — sunsetter2","text":"df dataframe containing dates, latitudes longitudes dates vector dates contained dataframe lat vector latitudes contained dataframe lng vector longitudes contained dataframe","code":""},{"path":"/reference/sunsetter2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"sunsetter2 — sunsetter2","text":"dataframe containing dates, latitudes, longitudes, sunrise time sunset time.","code":""},{"path":"/reference/sunsetter2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"sunsetter2 — sunsetter2","text":"function uses sunrise-sunset API calculate sunrise sunset times given set date location combinations.","code":""},{"path":[]},{"path":"/reference/sunsetter2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"sunsetter2 — sunsetter2","text":"Sander Devisscher","code":""},{"path":"/reference/sunsetter2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"sunsetter2 — sunsetter2","text":"","code":"if (FALSE) { # \\dontrun{ # create a dataframe with dates, latitudes and longitudes df <- data.frame(dates = c(\"2021-01-01\", \"2021-01-01\", \"2020-12-25\"), location = c(\"Brussels\", \"Amsterdam\", \"Brussels\"), lat = c(50.866572, 52.367573, 50.866572), lng = c(4.350309, 4.904138, 4.350309), remarks = c(\"New Year's Day\", \"New Year's Day\", \"Christmas Day\")) # calculate the sunrise and sunset times for the dataframe sunsets <- sunsetter2(df) # add the sunrise and sunset times to the dataframe df <- dplyr::bind_cols(df, sunsets %>% dplyr::select(-dates)) df } # }"}] diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 370d31a2..45f9f787 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -21,6 +21,7 @@