From 35340131c6cb86e65b51756a144dcf58bf2a189b Mon Sep 17 00:00:00 2001 From: Wright Date: Thu, 9 May 2024 15:33:32 -0600 Subject: [PATCH] Fix generate_ll_from_utm, add tests Rebuilt pkgdown stuff, feel free to re-do it --- R/geography.R | 64 +- docs/404.html | 4 +- docs/LICENSE-text.html | 4 +- docs/LICENSE.html | 4 +- docs/articles/DRR_Purpose_and_Scope.html | 4 +- docs/articles/Starting-a-DRR.html | 4 +- docs/articles/Using-the-DRR-Template.html | 7 +- .../bsTable-3.3.7/bootstrapTable.js | 801 ------------------ .../bsTable-3.3.7/bootstrapTable.min.css | 14 - docs/articles/index.html | 4 +- docs/authors.html | 10 +- docs/index.html | 6 +- docs/news/index.html | 4 +- docs/pkgdown.yml | 4 +- docs/reference/DC_col_check.html | 4 +- docs/reference/QCkit-package.html | 5 +- docs/reference/check_dc_cols.html | 4 +- docs/reference/check_te.html | 4 +- docs/reference/convert_datetime_format.html | 4 +- docs/reference/convert_long_to_utm.html | 4 +- docs/reference/convert_utm_to_ll.html | 4 +- docs/reference/create_datastore_script.html | 4 +- docs/reference/dot-get_unit_boundary.html | 4 +- docs/reference/fix_utc_offset.html | 4 +- docs/reference/fuzz_location.html | 4 +- docs/reference/generate_ll_from_utm.html | 4 +- docs/reference/get_custom_flags.html | 4 +- docs/reference/get_dc_flags.html | 4 +- docs/reference/get_df_flags.html | 4 +- docs/reference/get_dp_flags.html | 4 +- docs/reference/get_elevation.html | 4 +- docs/reference/get_park_polygon.html | 4 +- docs/reference/get_taxon_rank.html | 4 +- docs/reference/get_utm_zone.html | 4 +- docs/reference/index.html | 4 +- docs/reference/long2UTM.html | 4 +- docs/reference/order_cols.html | 4 +- docs/reference/replace_blanks.html | 4 +- docs/reference/te_check.html | 4 +- docs/reference/utm_to_ll.html | 4 +- docs/reference/validate_coord.html | 4 +- docs/reference/validate_coord_list.html | 4 +- man/QCkit-package.Rd | 1 + tests/testthat/test-geography.R | 91 +- 44 files changed, 195 insertions(+), 944 deletions(-) delete mode 100644 docs/articles/Using-the-DRR-Template_files/bsTable-3.3.7/bootstrapTable.js delete mode 100644 docs/articles/Using-the-DRR-Template_files/bsTable-3.3.7/bootstrapTable.min.css diff --git a/R/geography.R b/R/geography.R index 767670d..f544dd1 100644 --- a/R/geography.R +++ b/R/geography.R @@ -413,47 +413,59 @@ generate_ll_from_utm <- function(df, na_row_count <- nrow(df) - nrow(coord_df) if (na_row_count > 0) { - warning(paste(na_row_count, "rows are missing UTM coordinates, zone, and/or datum information.")) + warning(paste(na_row_count, "rows are missing UTM coordinates, zone, and/or datum information."), call. = FALSE) } ## Set up CRS for lat/long data latlong_CRS <- sp::CRS(glue::glue("+proj=longlat +datum={latlong_datum}")) # CRS for our new lat/long values # Loop through each datum and zone in the data - zones <- unique(dplyr::pull(coord_df, {{ZoneCol}})) # Get vector of zones present in data - datums <- unique(dplyr::pull(coord_df, {{DatumCol}})) # Get vector of datums present in data - new_coords <- tibble::tibble() - for (datum in datums) { - for (zone in zones) { - zone_num <- stringr::str_extract(zone, "\\d+") # sp::CRS wants zone number only, e.g. 11, not 11N - # Figure out if zone is in N or S hemisphere. If unspecified, assume N. If S, add "+south" to proj string. - zone_letter <- tolower(stringr::str_extract(zone, "[A-Za-z]")) + zones_datums <- dplyr::select(coord_df, {{ZoneCol}}, {{DatumCol}}) %>% # Get vector of zones present in data + unique() + + new_coords <- sapply(1:nrow(zones_datums), function(zone_datum_index) { + # Get zone and datum + current_zone <- zones_datums[[zone_datum_index, 1]] + if (is.numeric(current_zone)) { + zone_num <- current_zone + north_south <- "" + } else { + zone_num <- stringr::str_extract(current_zone, "\\d+") # sp::CRS wants zone number only, e.g. 11, not 11N + zone_letter <- tolower(stringr::str_extract(current_zone, "[A-Za-z]")) if (!is.na(zone_letter) && zone_letter == "s") { north_south <- " +south" } else { north_south <- "" } - utm_CRS <- sp::CRS(glue::glue("+proj=utm +zone={zone_num} +datum={datum}{north_south}")) # Set coordinate reference system for incoming UTM data - filtered_df <- coord_df %>% - dplyr::filter(!!rlang::ensym(ZoneCol) == zone, !!rlang::ensym(DatumCol) == datum) - sp_utm <- sp::SpatialPoints(filtered_df %>% - dplyr::select({{EastingCol}}, {{NorthingCol}}) %>% - as.matrix(), - proj4string = utm_CRS) # Convert UTM columns into a SpatialPoints object - sp_geo <- sp::spTransform(sp_utm, latlong_CRS) %>% # Transform UTM to Lat/Long - tibble::as_tibble() - - # Set data$Long and data$Lat to newly converted values, but only for the zone and datum we are currently on in our for loop - filtered_df <- filtered_df %>% dplyr::mutate(decimalLatitude = sp_geo[[2]], - decimalLongitude = sp_geo[[1]], - LatLong_CRS = latlong_CRS@projargs) # Store the coordinate reference system PROJ string in the dataframe - coord_df <- dplyr::left_join(coord_df, filtered_df, by = "_UTMJOINCOL") } - } + + current_datum <- zones_datums[[zone_datum_index, 2]] + + utm_CRS <- sp::CRS(glue::glue("+proj=utm +zone={zone_num} +datum={current_datum}{north_south}")) # Set coordinate reference system for incoming UTM data + filtered_df <- coord_df %>% + dplyr::filter((!!rlang::ensym(ZoneCol) == current_zone & !!rlang::ensym(DatumCol) == current_datum)) + sp_utm <- sp::SpatialPoints(filtered_df %>% + dplyr::select({{EastingCol}}, {{NorthingCol}}) %>% + as.matrix(), + proj4string = utm_CRS) # Convert UTM columns into a SpatialPoints object + sp_geo <- sp::spTransform(sp_utm, latlong_CRS) %>% # Transform UTM to Lat/Long + tibble::as_tibble() + + # Add lat/long columns back into the original dataframe + latlong <- tibble::tibble(`_UTMJOINCOL` = filtered_df$`_UTMJOINCOL`, + decimalLatitude = sp_geo[[2]], + decimalLongitude = sp_geo[[1]], + LatLong_CRS = latlong_CRS@projargs) # Store the coordinate reference system PROJ string in the dataframe + + + return(latlong) + }, simplify = FALSE) }) + new_coords <- dplyr::bind_rows(new_coords) + df <- dplyr::left_join(df, - dplyr::select(coord_df, decimalLatitude, decimalLongitude, LatLong_CRS, `_UTMJOINCOL`), + new_coords, by = "_UTMJOINCOL") %>% dplyr::select(-`_UTMJOINCOL`) diff --git a/docs/404.html b/docs/404.html index c1a016f..adfd8eb 100644 --- a/docs/404.html +++ b/docs/404.html @@ -101,12 +101,12 @@

Page not found (404)

diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index c21ae85..0f578b3 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -99,11 +99,11 @@

License

diff --git a/docs/LICENSE.html b/docs/LICENSE.html index f13626e..1a3d178 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -108,11 +108,11 @@

Statement of Purpose -

Developed by Robert Baker, Judd Patterson, Joe DeVivo, Issac Quevedo, sarah Wright.

+

Developed by Robert Baker, Judd Patterson, Joe DeVivo, Issac Quevedo, Sarah Wright.

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.6.

diff --git a/docs/articles/DRR_Purpose_and_Scope.html b/docs/articles/DRR_Purpose_and_Scope.html index c739554..1cacd1c 100644 --- a/docs/articles/DRR_Purpose_and_Scope.html +++ b/docs/articles/DRR_Purpose_and_Scope.html @@ -426,12 +426,12 @@

References

-

Developed by Robert Baker, Judd Patterson, Joe DeVivo, Issac Quevedo, sarah Wright.

+

Developed by Robert Baker, Judd Patterson, Joe DeVivo, Issac Quevedo, Sarah Wright.

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.6.

diff --git a/docs/articles/Starting-a-DRR.html b/docs/articles/Starting-a-DRR.html index 24233c3..9ca0df2 100644 --- a/docs/articles/Starting-a-DRR.html +++ b/docs/articles/Starting-a-DRR.html @@ -218,12 +218,12 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.6.

diff --git a/docs/articles/Using-the-DRR-Template.html b/docs/articles/Using-the-DRR-Template.html index 2f2c8ae..8954e29 100644 --- a/docs/articles/Using-the-DRR-Template.html +++ b/docs/articles/Using-the-DRR-Template.html @@ -82,8 +82,7 @@ - -
+

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.6.

diff --git a/docs/articles/Using-the-DRR-Template_files/bsTable-3.3.7/bootstrapTable.js b/docs/articles/Using-the-DRR-Template_files/bsTable-3.3.7/bootstrapTable.js deleted file mode 100644 index 0c83d3b..0000000 --- a/docs/articles/Using-the-DRR-Template_files/bsTable-3.3.7/bootstrapTable.js +++ /dev/null @@ -1,801 +0,0 @@ -/* ======================================================================== - * Bootstrap: tooltip.js v3.4.1 - * https://getbootstrap.com/docs/3.4/javascript/#tooltip - * Inspired by the original jQuery.tipsy by Jason Frame - * ======================================================================== - * Copyright 2011-2019 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - -+function ($) { - 'use strict'; - - var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'] - - var uriAttrs = [ - 'background', - 'cite', - 'href', - 'itemtype', - 'longdesc', - 'poster', - 'src', - 'xlink:href' - ] - - var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i - - var DefaultWhitelist = { - // Global attributes allowed on any supplied element below. - '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], - a: ['target', 'href', 'title', 'rel'], - area: [], - b: [], - br: [], - col: [], - code: [], - div: [], - em: [], - hr: [], - h1: [], - h2: [], - h3: [], - h4: [], - h5: [], - h6: [], - i: [], - img: ['src', 'alt', 'title', 'width', 'height'], - li: [], - ol: [], - p: [], - pre: [], - s: [], - small: [], - span: [], - sub: [], - sup: [], - strong: [], - u: [], - ul: [] - } - - /** - * A pattern that recognizes a commonly useful subset of URLs that are safe. - * - * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts - */ - var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi - - /** - * A pattern that matches safe data URLs. Only matches image, video and audio types. - * - * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts - */ - var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i - - function allowedAttribute(attr, allowedAttributeList) { - var attrName = attr.nodeName.toLowerCase() - - if ($.inArray(attrName, allowedAttributeList) !== -1) { - if ($.inArray(attrName, uriAttrs) !== -1) { - return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)) - } - - return true - } - - var regExp = $(allowedAttributeList).filter(function (index, value) { - return value instanceof RegExp - }) - - // Check if a regular expression validates the attribute. - for (var i = 0, l = regExp.length; i < l; i++) { - if (attrName.match(regExp[i])) { - return true - } - } - - return false - } - - function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) { - if (unsafeHtml.length === 0) { - return unsafeHtml - } - - if (sanitizeFn && typeof sanitizeFn === 'function') { - return sanitizeFn(unsafeHtml) - } - - // IE 8 and below don't support createHTMLDocument - if (!document.implementation || !document.implementation.createHTMLDocument) { - return unsafeHtml - } - - var createdDocument = document.implementation.createHTMLDocument('sanitization') - createdDocument.body.innerHTML = unsafeHtml - - var whitelistKeys = $.map(whiteList, function (el, i) { return i }) - var elements = $(createdDocument.body).find('*') - - for (var i = 0, len = elements.length; i < len; i++) { - var el = elements[i] - var elName = el.nodeName.toLowerCase() - - if ($.inArray(elName, whitelistKeys) === -1) { - el.parentNode.removeChild(el) - - continue - } - - var attributeList = $.map(el.attributes, function (el) { return el }) - var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []) - - for (var j = 0, len2 = attributeList.length; j < len2; j++) { - if (!allowedAttribute(attributeList[j], whitelistedAttributes)) { - el.removeAttribute(attributeList[j].nodeName) - } - } - } - - return createdDocument.body.innerHTML - } - - // TOOLTIP PUBLIC CLASS DEFINITION - // =============================== - - var Tooltip = function (element, options) { - this.type = null - this.options = null - this.enabled = null - this.timeout = null - this.hoverState = null - this.$element = null - this.inState = null - - this.init('tooltip', element, options) - } - - Tooltip.VERSION = '3.4.1' - - Tooltip.TRANSITION_DURATION = 150 - - Tooltip.DEFAULTS = { - animation: true, - placement: 'top', - selector: false, - template: '', - trigger: 'hover focus', - title: '', - delay: 0, - html: false, - container: false, - viewport: { - selector: 'body', - padding: 0 - }, - sanitize : true, - sanitizeFn : null, - whiteList : DefaultWhitelist - } - - Tooltip.prototype.init = function (type, element, options) { - this.enabled = true - this.type = type - this.$element = $(element) - this.options = this.getOptions(options) - this.$viewport = this.options.viewport && $(document).find($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport)) - this.inState = { click: false, hover: false, focus: false } - - if (this.$element[0] instanceof document.constructor && !this.options.selector) { - throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') - } - - var triggers = this.options.trigger.split(' ') - - for (var i = triggers.length; i--;) { - var trigger = triggers[i] - - if (trigger == 'click') { - this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) - } else if (trigger != 'manual') { - var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin' - var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout' - - this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) - this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) - } - } - - this.options.selector ? - (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : - this.fixTitle() - } - - Tooltip.prototype.getDefaults = function () { - return Tooltip.DEFAULTS - } - - Tooltip.prototype.getOptions = function (options) { - var dataAttributes = this.$element.data() - - for (var dataAttr in dataAttributes) { - if (dataAttributes.hasOwnProperty(dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) { - delete dataAttributes[dataAttr] - } - } - - options = $.extend({}, this.getDefaults(), dataAttributes, options) - - if (options.delay && typeof options.delay == 'number') { - options.delay = { - show: options.delay, - hide: options.delay - } - } - - if (options.sanitize) { - options.template = sanitizeHtml(options.template, options.whiteList, options.sanitizeFn) - } - - return options - } - - Tooltip.prototype.getDelegateOptions = function () { - var options = {} - var defaults = this.getDefaults() - - this._options && $.each(this._options, function (key, value) { - if (defaults[key] != value) options[key] = value - }) - - return options - } - - Tooltip.prototype.enter = function (obj) { - var self = obj instanceof this.constructor ? - obj : $(obj.currentTarget).data('bs.' + this.type) - - if (!self) { - self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) - $(obj.currentTarget).data('bs.' + this.type, self) - } - - if (obj instanceof $.Event) { - self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true - } - - if (self.tip().hasClass('in') || self.hoverState == 'in') { - self.hoverState = 'in' - return - } - - clearTimeout(self.timeout) - - self.hoverState = 'in' - - if (!self.options.delay || !self.options.delay.show) return self.show() - - self.timeout = setTimeout(function () { - if (self.hoverState == 'in') self.show() - }, self.options.delay.show) - } - - Tooltip.prototype.isInStateTrue = function () { - for (var key in this.inState) { - if (this.inState[key]) return true - } - - return false - } - - Tooltip.prototype.leave = function (obj) { - var self = obj instanceof this.constructor ? - obj : $(obj.currentTarget).data('bs.' + this.type) - - if (!self) { - self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) - $(obj.currentTarget).data('bs.' + this.type, self) - } - - if (obj instanceof $.Event) { - self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false - } - - if (self.isInStateTrue()) return - - clearTimeout(self.timeout) - - self.hoverState = 'out' - - if (!self.options.delay || !self.options.delay.hide) return self.hide() - - self.timeout = setTimeout(function () { - if (self.hoverState == 'out') self.hide() - }, self.options.delay.hide) - } - - Tooltip.prototype.show = function () { - var e = $.Event('show.bs.' + this.type) - - if (this.hasContent() && this.enabled) { - this.$element.trigger(e) - - var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) - if (e.isDefaultPrevented() || !inDom) return - var that = this - - var $tip = this.tip() - - var tipId = this.getUID(this.type) - - this.setContent() - $tip.attr('id', tipId) - this.$element.attr('aria-describedby', tipId) - - if (this.options.animation) $tip.addClass('fade') - - var placement = typeof this.options.placement == 'function' ? - this.options.placement.call(this, $tip[0], this.$element[0]) : - this.options.placement - - var autoToken = /\s?auto?\s?/i - var autoPlace = autoToken.test(placement) - if (autoPlace) placement = placement.replace(autoToken, '') || 'top' - - $tip - .detach() - .css({ top: 0, left: 0, display: 'block' }) - .addClass(placement) - .data('bs.' + this.type, this) - - this.options.container ? $tip.appendTo($(document).find(this.options.container)) : $tip.insertAfter(this.$element) - this.$element.trigger('inserted.bs.' + this.type) - - var pos = this.getPosition() - var actualWidth = $tip[0].offsetWidth - var actualHeight = $tip[0].offsetHeight - - if (autoPlace) { - var orgPlacement = placement - var viewportDim = this.getPosition(this.$viewport) - - placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' : - placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' : - placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' : - placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' : - placement - - $tip - .removeClass(orgPlacement) - .addClass(placement) - } - - var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) - - this.applyPlacement(calculatedOffset, placement) - - var complete = function () { - var prevHoverState = that.hoverState - that.$element.trigger('shown.bs.' + that.type) - that.hoverState = null - - if (prevHoverState == 'out') that.leave(that) - } - - $.support.transition && this.$tip.hasClass('fade') ? - $tip - .one('bsTransitionEnd', complete) - .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : - complete() - } - } - - Tooltip.prototype.applyPlacement = function (offset, placement) { - var $tip = this.tip() - var width = $tip[0].offsetWidth - var height = $tip[0].offsetHeight - - // manually read margins because getBoundingClientRect includes difference - var marginTop = parseInt($tip.css('margin-top'), 10) - var marginLeft = parseInt($tip.css('margin-left'), 10) - - // we must check for NaN for ie 8/9 - if (isNaN(marginTop)) marginTop = 0 - if (isNaN(marginLeft)) marginLeft = 0 - - offset.top += marginTop - offset.left += marginLeft - - // $.fn.offset doesn't round pixel values - // so we use setOffset directly with our own function B-0 - $.offset.setOffset($tip[0], $.extend({ - using: function (props) { - $tip.css({ - top: Math.round(props.top), - left: Math.round(props.left) - }) - } - }, offset), 0) - - $tip.addClass('in') - - // check to see if placing tip in new offset caused the tip to resize itself - var actualWidth = $tip[0].offsetWidth - var actualHeight = $tip[0].offsetHeight - - if (placement == 'top' && actualHeight != height) { - offset.top = offset.top + height - actualHeight - } - - var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight) - - if (delta.left) offset.left += delta.left - else offset.top += delta.top - - var isVertical = /top|bottom/.test(placement) - var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight - var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight' - - $tip.offset(offset) - this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical) - } - - Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) { - this.arrow() - .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%') - .css(isVertical ? 'top' : 'left', '') - } - - Tooltip.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() - - if (this.options.html) { - if (this.options.sanitize) { - title = sanitizeHtml(title, this.options.whiteList, this.options.sanitizeFn) - } - - $tip.find('.tooltip-inner').html(title) - } else { - $tip.find('.tooltip-inner').text(title) - } - - $tip.removeClass('fade in top bottom left right') - } - - Tooltip.prototype.hide = function (callback) { - var that = this - var $tip = $(this.$tip) - var e = $.Event('hide.bs.' + this.type) - - function complete() { - if (that.hoverState != 'in') $tip.detach() - if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary. - that.$element - .removeAttr('aria-describedby') - .trigger('hidden.bs.' + that.type) - } - callback && callback() - } - - this.$element.trigger(e) - - if (e.isDefaultPrevented()) return - - $tip.removeClass('in') - - $.support.transition && $tip.hasClass('fade') ? - $tip - .one('bsTransitionEnd', complete) - .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : - complete() - - this.hoverState = null - - return this - } - - Tooltip.prototype.fixTitle = function () { - var $e = this.$element - if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') - } - } - - Tooltip.prototype.hasContent = function () { - return this.getTitle() - } - - Tooltip.prototype.getPosition = function ($element) { - $element = $element || this.$element - - var el = $element[0] - var isBody = el.tagName == 'BODY' - - var elRect = el.getBoundingClientRect() - if (elRect.width == null) { - // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093 - elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }) - } - var isSvg = window.SVGElement && el instanceof window.SVGElement - // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3. - // See https://github.com/twbs/bootstrap/issues/20280 - var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset()) - var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } - var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null - - return $.extend({}, elRect, scroll, outerDims, elOffset) - } - - Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { - return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : - placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : - placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : - /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } - - } - - Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) { - var delta = { top: 0, left: 0 } - if (!this.$viewport) return delta - - var viewportPadding = this.options.viewport && this.options.viewport.padding || 0 - var viewportDimensions = this.getPosition(this.$viewport) - - if (/right|left/.test(placement)) { - var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll - var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight - if (topEdgeOffset < viewportDimensions.top) { // top overflow - delta.top = viewportDimensions.top - topEdgeOffset - } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow - delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset - } - } else { - var leftEdgeOffset = pos.left - viewportPadding - var rightEdgeOffset = pos.left + viewportPadding + actualWidth - if (leftEdgeOffset < viewportDimensions.left) { // left overflow - delta.left = viewportDimensions.left - leftEdgeOffset - } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow - delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset - } - } - - return delta - } - - Tooltip.prototype.getTitle = function () { - var title - var $e = this.$element - var o = this.options - - title = $e.attr('data-original-title') - || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) - - return title - } - - Tooltip.prototype.getUID = function (prefix) { - do prefix += ~~(Math.random() * 1000000) - while (document.getElementById(prefix)) - return prefix - } - - Tooltip.prototype.tip = function () { - if (!this.$tip) { - this.$tip = $(this.options.template) - if (this.$tip.length != 1) { - throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!') - } - } - return this.$tip - } - - Tooltip.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')) - } - - Tooltip.prototype.enable = function () { - this.enabled = true - } - - Tooltip.prototype.disable = function () { - this.enabled = false - } - - Tooltip.prototype.toggleEnabled = function () { - this.enabled = !this.enabled - } - - Tooltip.prototype.toggle = function (e) { - var self = this - if (e) { - self = $(e.currentTarget).data('bs.' + this.type) - if (!self) { - self = new this.constructor(e.currentTarget, this.getDelegateOptions()) - $(e.currentTarget).data('bs.' + this.type, self) - } - } - - if (e) { - self.inState.click = !self.inState.click - if (self.isInStateTrue()) self.enter(self) - else self.leave(self) - } else { - self.tip().hasClass('in') ? self.leave(self) : self.enter(self) - } - } - - Tooltip.prototype.destroy = function () { - var that = this - clearTimeout(this.timeout) - this.hide(function () { - that.$element.off('.' + that.type).removeData('bs.' + that.type) - if (that.$tip) { - that.$tip.detach() - } - that.$tip = null - that.$arrow = null - that.$viewport = null - that.$element = null - }) - } - - Tooltip.prototype.sanitizeHtml = function (unsafeHtml) { - return sanitizeHtml(unsafeHtml, this.options.whiteList, this.options.sanitizeFn) - } - - // TOOLTIP PLUGIN DEFINITION - // ========================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tooltip') - var options = typeof option == 'object' && option - - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.tooltip - - $.fn.tooltip = Plugin - $.fn.tooltip.Constructor = Tooltip - - - // TOOLTIP NO CONFLICT - // =================== - - $.fn.tooltip.noConflict = function () { - $.fn.tooltip = old - return this - } - -}(jQuery); - -/* ======================================================================== - * Bootstrap: popover.js v3.4.1 - * https://getbootstrap.com/docs/3.4/javascript/#popovers - * ======================================================================== - * Copyright 2011-2019 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // POPOVER PUBLIC CLASS DEFINITION - // =============================== - - var Popover = function (element, options) { - this.init('popover', element, options) - } - - if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') - - Popover.VERSION = '3.4.1' - - Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { - placement: 'right', - trigger: 'click', - content: '', - template: '' - }) - - - // NOTE: POPOVER EXTENDS tooltip.js - // ================================ - - Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) - - Popover.prototype.constructor = Popover - - Popover.prototype.getDefaults = function () { - return Popover.DEFAULTS - } - - Popover.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() - var content = this.getContent() - - if (this.options.html) { - var typeContent = typeof content - - if (this.options.sanitize) { - title = this.sanitizeHtml(title) - - if (typeContent === 'string') { - content = this.sanitizeHtml(content) - } - } - - $tip.find('.popover-title').html(title) - $tip.find('.popover-content').children().detach().end()[ - typeContent === 'string' ? 'html' : 'append' - ](content) - } else { - $tip.find('.popover-title').text(title) - $tip.find('.popover-content').children().detach().end().text(content) - } - - $tip.removeClass('fade top bottom left right in') - - // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do - // this manually by checking the contents. - if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() - } - - Popover.prototype.hasContent = function () { - return this.getTitle() || this.getContent() - } - - Popover.prototype.getContent = function () { - var $e = this.$element - var o = this.options - - return $e.attr('data-content') - || (typeof o.content == 'function' ? - o.content.call($e[0]) : - o.content) - } - - Popover.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.arrow')) - } - - - // POPOVER PLUGIN DEFINITION - // ========================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.popover') - var options = typeof option == 'object' && option - - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.popover', (data = new Popover(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.popover - - $.fn.popover = Plugin - $.fn.popover.Constructor = Popover - - - // POPOVER NO CONFLICT - // =================== - - $.fn.popover.noConflict = function () { - $.fn.popover = old - return this - } - -}(jQuery); diff --git a/docs/articles/Using-the-DRR-Template_files/bsTable-3.3.7/bootstrapTable.min.css b/docs/articles/Using-the-DRR-Template_files/bsTable-3.3.7/bootstrapTable.min.css deleted file mode 100644 index 7d1e81f..0000000 --- a/docs/articles/Using-the-DRR-Template_files/bsTable-3.3.7/bootstrapTable.min.css +++ /dev/null @@ -1,14 +0,0 @@ -/*! - * Bootstrap v3.3.7 (http://getbootstrap.com) - * Copyright 2011-2018 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -/*! - * Generated using the Bootstrap Customizer () - * Config saved to config.json and - *//*! - * Bootstrap v3.3.7 (http://getbootstrap.com) - * Copyright 2011-2016 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */table{border-collapse:collapse;border-spacing:0}td,th{padding:0}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*="col-"]{position:static;float:none;display:table-column}table td[class*="col-"],table th[class*="col-"]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.table-responsive{overflow-x:auto;min-height:0.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:normal;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:12px;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;right:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:normal;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:14px;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,0.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,0.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right !important}.pull-left{float:left !important}.hide{display:none !important}.show{display:block !important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none !important}.affix{position:fixed} diff --git a/docs/articles/index.html b/docs/articles/index.html index 5f2ee7c..e66477a 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -78,11 +78,11 @@

All vignettes

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.6.

diff --git a/docs/authors.html b/docs/authors.html index 9555c8a..13b343b 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -81,7 +81,7 @@

Authors

  • -

    sarah Wright. Author. +

    Sarah Wright. Author.

  • @@ -101,13 +101,13 @@

    Citation

  • -

    Baker R, Patterson J, DeVivo J, Quevedo I, Wright s (2024). +

    Baker R, Patterson J, DeVivo J, Quevedo I, Wright S (2024). QCkit: NPS Inventory and Monitoring Quality Control Toolkit. R package version 0.1.7, https://github.com/nationalparkservice/QCkit/.

    @Manual{,
       title = {QCkit: NPS Inventory and Monitoring Quality Control Toolkit},
    -  author = {Robert Baker and Judd Patterson and Joe DeVivo and Issac Quevedo and sarah Wright},
    +  author = {Robert Baker and Judd Patterson and Joe DeVivo and Issac Quevedo and Sarah Wright},
       year = {2024},
       note = {R package version 0.1.7},
       url = {https://github.com/nationalparkservice/QCkit/},
    @@ -120,11 +120,11 @@ 

    Citation

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.6.

    diff --git a/docs/index.html b/docs/index.html index 2142da1..9baf01f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -142,7 +142,7 @@

    Developers

  • Judd Patterson
    Author
  • Joe DeVivo
    Author
  • Issac Quevedo
    Author
  • -
  • sarah Wright
    Author
  • +
  • Sarah Wright
    Author
  • More about authors...
  • @@ -162,12 +162,12 @@

    Dev status

    diff --git a/docs/news/index.html b/docs/news/index.html index e4dba62..f4c73ca 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -154,11 +154,11 @@

    Examples

    diff --git a/docs/reference/QCkit-package.html b/docs/reference/QCkit-package.html index 8664df9..b09b9c9 100644 --- a/docs/reference/QCkit-package.html +++ b/docs/reference/QCkit-package.html @@ -81,6 +81,7 @@

    Author

    Authors:

    Other contributors:

    @@ -93,11 +94,11 @@

    Author

    diff --git a/docs/reference/check_dc_cols.html b/docs/reference/check_dc_cols.html index 5881eeb..b67bb19 100644 --- a/docs/reference/check_dc_cols.html +++ b/docs/reference/check_dc_cols.html @@ -105,11 +105,11 @@

    Examples

    diff --git a/docs/reference/check_te.html b/docs/reference/check_te.html index fe3f310..011adc0 100644 --- a/docs/reference/check_te.html +++ b/docs/reference/check_te.html @@ -129,11 +129,11 @@

    Examples

    diff --git a/docs/reference/convert_datetime_format.html b/docs/reference/convert_datetime_format.html index 0c0e63c..b55e464 100644 --- a/docs/reference/convert_datetime_format.html +++ b/docs/reference/convert_datetime_format.html @@ -110,11 +110,11 @@

    Examples

    diff --git a/docs/reference/convert_long_to_utm.html b/docs/reference/convert_long_to_utm.html index 551878a..052e59a 100644 --- a/docs/reference/convert_long_to_utm.html +++ b/docs/reference/convert_long_to_utm.html @@ -107,11 +107,11 @@

    Details

    diff --git a/docs/reference/convert_utm_to_ll.html b/docs/reference/convert_utm_to_ll.html index 59ab269..8effac2 100644 --- a/docs/reference/convert_utm_to_ll.html +++ b/docs/reference/convert_utm_to_ll.html @@ -163,11 +163,11 @@

    Examples

    diff --git a/docs/reference/create_datastore_script.html b/docs/reference/create_datastore_script.html index 5f81252..eda2535 100644 --- a/docs/reference/create_datastore_script.html +++ b/docs/reference/create_datastore_script.html @@ -126,11 +126,11 @@

    Examples

    diff --git a/docs/reference/dot-get_unit_boundary.html b/docs/reference/dot-get_unit_boundary.html index 7cdfb7b..18dc057 100644 --- a/docs/reference/dot-get_unit_boundary.html +++ b/docs/reference/dot-get_unit_boundary.html @@ -100,11 +100,11 @@

    Examples

    diff --git a/docs/reference/fix_utc_offset.html b/docs/reference/fix_utc_offset.html index a833c2a..6ad2518 100644 --- a/docs/reference/fix_utc_offset.html +++ b/docs/reference/fix_utc_offset.html @@ -104,11 +104,11 @@

    Examples

    diff --git a/docs/reference/fuzz_location.html b/docs/reference/fuzz_location.html index e5845ab..60ef03a 100644 --- a/docs/reference/fuzz_location.html +++ b/docs/reference/fuzz_location.html @@ -130,11 +130,11 @@

    Examples

    diff --git a/docs/reference/generate_ll_from_utm.html b/docs/reference/generate_ll_from_utm.html index a86b876..87eeea6 100644 --- a/docs/reference/generate_ll_from_utm.html +++ b/docs/reference/generate_ll_from_utm.html @@ -182,11 +182,11 @@

    Examples

    diff --git a/docs/reference/get_custom_flags.html b/docs/reference/get_custom_flags.html index 24856b1..363fb20 100644 --- a/docs/reference/get_custom_flags.html +++ b/docs/reference/get_custom_flags.html @@ -165,11 +165,11 @@

    Examples

    diff --git a/docs/reference/get_dc_flags.html b/docs/reference/get_dc_flags.html index 25cbdce..4dfc8ee 100644 --- a/docs/reference/get_dc_flags.html +++ b/docs/reference/get_dc_flags.html @@ -132,11 +132,11 @@

    Examples

    diff --git a/docs/reference/get_df_flags.html b/docs/reference/get_df_flags.html index 278299b..d247209 100644 --- a/docs/reference/get_df_flags.html +++ b/docs/reference/get_df_flags.html @@ -129,11 +129,11 @@

    Examples

    diff --git a/docs/reference/get_dp_flags.html b/docs/reference/get_dp_flags.html index bcd5adb..53969cf 100644 --- a/docs/reference/get_dp_flags.html +++ b/docs/reference/get_dp_flags.html @@ -129,11 +129,11 @@

    Examples

    diff --git a/docs/reference/get_elevation.html b/docs/reference/get_elevation.html index 6dde129..339b1e8 100644 --- a/docs/reference/get_elevation.html +++ b/docs/reference/get_elevation.html @@ -136,11 +136,11 @@

    Examples

    diff --git a/docs/reference/get_park_polygon.html b/docs/reference/get_park_polygon.html index 1030ba8..05d4c4b 100644 --- a/docs/reference/get_park_polygon.html +++ b/docs/reference/get_park_polygon.html @@ -98,11 +98,11 @@

    Examples

    diff --git a/docs/reference/get_taxon_rank.html b/docs/reference/get_taxon_rank.html index 6ad698f..5e05265 100644 --- a/docs/reference/get_taxon_rank.html +++ b/docs/reference/get_taxon_rank.html @@ -112,11 +112,11 @@

    Examples

    diff --git a/docs/reference/get_utm_zone.html b/docs/reference/get_utm_zone.html index b23a4e2..246f82f 100644 --- a/docs/reference/get_utm_zone.html +++ b/docs/reference/get_utm_zone.html @@ -103,11 +103,11 @@

    Details

    diff --git a/docs/reference/index.html b/docs/reference/index.html index 6d4cb21..8738478 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -151,11 +151,11 @@

    All functions
    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.6.

    diff --git a/docs/reference/long2UTM.html b/docs/reference/long2UTM.html index 66574e6..1edc211 100644 --- a/docs/reference/long2UTM.html +++ b/docs/reference/long2UTM.html @@ -109,11 +109,11 @@

    Details

    diff --git a/docs/reference/order_cols.html b/docs/reference/order_cols.html index 874fd95..03bacbd 100644 --- a/docs/reference/order_cols.html +++ b/docs/reference/order_cols.html @@ -109,11 +109,11 @@

    Examples

    diff --git a/docs/reference/replace_blanks.html b/docs/reference/replace_blanks.html index d3b0e17..5af0a4a 100644 --- a/docs/reference/replace_blanks.html +++ b/docs/reference/replace_blanks.html @@ -113,11 +113,11 @@

    Examples

    diff --git a/docs/reference/te_check.html b/docs/reference/te_check.html index 7f489ad..e385ff4 100644 --- a/docs/reference/te_check.html +++ b/docs/reference/te_check.html @@ -133,11 +133,11 @@

    Examples

    diff --git a/docs/reference/utm_to_ll.html b/docs/reference/utm_to_ll.html index 7a5f9e6..62745e8 100644 --- a/docs/reference/utm_to_ll.html +++ b/docs/reference/utm_to_ll.html @@ -135,11 +135,11 @@

    Examples

    diff --git a/docs/reference/validate_coord.html b/docs/reference/validate_coord.html index bf50a7a..19ef92a 100644 --- a/docs/reference/validate_coord.html +++ b/docs/reference/validate_coord.html @@ -106,11 +106,11 @@

    Examples

    diff --git a/docs/reference/validate_coord_list.html b/docs/reference/validate_coord_list.html index 65ad45a..7b446fe 100644 --- a/docs/reference/validate_coord_list.html +++ b/docs/reference/validate_coord_list.html @@ -122,11 +122,11 @@

    Examples

    diff --git a/man/QCkit-package.Rd b/man/QCkit-package.Rd index 67d4e4b..ea10ae1 100644 --- a/man/QCkit-package.Rd +++ b/man/QCkit-package.Rd @@ -24,6 +24,7 @@ Authors: \item Judd Patterson \email{judd_patterson@nps.gov} (\href{https://orcid.org/0000-0002-0951-7917}{ORCID}) \item Joe DeVivo \item Issac Quevedo (\href{https://orcid.org/0000-0003-0129-981X}{ORCID}) + \item Sarah Wright (\href{https://orcid.org/0009-0004-5060-2189}{ORCID}) } Other contributors: diff --git a/tests/testthat/test-geography.R b/tests/testthat/test-geography.R index e2aff34..33f4eeb 100644 --- a/tests/testthat/test-geography.R +++ b/tests/testthat/test-geography.R @@ -121,12 +121,12 @@ test_that("fuzz_location returns well known text for souther hemisphere latitude #### generate_ll_from_utm test_that("generate_ll_from_utm adds the correct columns", { - mydataframe <- tibble::tibble(EastingCol = c(-105.70421, - -105.70431, - -105.7451), - NorthingCol = c(40.70421, - 40.70431, - 40.70451), + mydataframe <- tibble::tibble(EastingCol = c(723548, + 716532, + 763477), + NorthingCol = c(4970408, + 4930301, + 4960912), zone = 13, datum = "NAD83") x <- generate_ll_from_utm(df = mydataframe, @@ -137,14 +137,67 @@ test_that("generate_ll_from_utm adds the correct columns", { expect_equal(names(x), c("EastingCol", "NorthingCol", "zone", "datum", "decimalLatitude", "decimalLongitude", "LatLong_CRS")) }) +#### generate_ll_from_utm +test_that("generate_ll_from_utm works with quoted and unquoted inputs", { + mydataframe <- tibble::tibble(EastingCol = c(723548, + 716532, + 763477), + NorthingCol = c(4970408, + 4930301, + 4960912), + zone = 13, + datum = "NAD83") + x <- generate_ll_from_utm(df = mydataframe, + EastingCol = "EastingCol", + NorthingCol = "NorthingCol", + ZoneCol = "zone", + DatumCol = "datum") + y <- generate_ll_from_utm(df = mydataframe, + EastingCol = EastingCol, + NorthingCol = NorthingCol, + ZoneCol = zone, + DatumCol = datum) + expect_equal(x, y) + expect_equal(nrow(x), 3) +}) + +#### generate_ll_from_utm +test_that("generate_ll_from_utm works with multiple zones and datums", { + mydataframe <- tibble::tibble(EastingCol = c(723548, + 716532, + 763477, + 249603, + 262812), + NorthingCol = c(4970408, + 4930301, + 4960912, + 5041623, + 5083211), + zone = c(12, 12, 12, 13, 13), + datum = c("NAD83", "NAD83", "NAD83", "NAD83", "NAD27")) + x <- generate_ll_from_utm(df = mydataframe, + EastingCol = "EastingCol", + NorthingCol = "NorthingCol", + ZoneCol = "zone", + DatumCol = "datum") + y <- generate_ll_from_utm(df = mydataframe, + EastingCol = EastingCol, + NorthingCol = NorthingCol, + ZoneCol = zone, + DatumCol = datum) + expect_equal(x, y) + expect_equal(names(x), c("EastingCol", "NorthingCol", "zone", "datum", "decimalLatitude", "decimalLongitude", "LatLong_CRS")) + expect_equal(nrow(x), 5) +}) + #### generate_ll_from_utm test_that("generate_ll_from_utm outputs the same number of rows as the input dataframe", { - mydataframe <- tibble::tibble(EastingCol = c(-105.70421, - -105.70431, - -105.7451), - NorthingCol = c(40.70421, - 40.70431, - 40.70451), + mydataframe <- tibble::tibble(EastingCol = c(723548, + 716532, + 763477), + NorthingCol = c(4970408, + 4930301, + 4960912), zone = 13, datum = "NAD83") mydataframe_na <- mydataframe @@ -167,14 +220,14 @@ test_that("generate_ll_from_utm outputs the same number of rows as the input dat #### generate_ll_from_utm test_that("generate_ll_from_utm conversion matches that of convert_utm_to_ll", { - mydataframe <- tibble::tibble(EastingCol = c(-105.70421, - -105.70431, - -105.7451), - NorthingCol = c(40.70421, - 40.70431, - 40.70451), + mydataframe <- tibble::tibble(EastingCol = c(723548, + 716532, + 763477), + NorthingCol = c(4970408, + 4930301, + 4960912), zone = 13, - datum = "WGS84") + datum = "NAD83") x <- generate_ll_from_utm(df = mydataframe, EastingCol = EastingCol,