Skip to content

Conversation

@hillarymarler
Copy link
Collaborator

Corrects bug from #787

All of these examples now work, @wokenny13

`tribe <- TADA_TribalOptions(tribal_area_type = "Off-reservation Trust Lands")

TADA.penobscot <- TADA_DataRetrieval(
tribal_area_type = "Off-reservation Trust Lands",
tribe_name_parcel = "Penobscot Nation",
ask = FALSE
)

find duplicates by single org

TADA.penobscot.clean <- TADA_FindPotentialDuplicatesSingleOrg(TADA.penobscot)

find duplicates across multiple orgs

TADA.penobscot.clean <- TADA_FindPotentialDuplicatesMultipleOrgs(
TADA.penobscot.clean
)

filter duplicates

TADA.penobscot.clean <- TADA.penobscot.clean |>
dplyr::filter(TADA.SingleOrgDup.Flag == "Unique") |>
dplyr::filter(TADA.ResultSelectedMultipleOrgs == "Y")

apply censored methods for nd an od

TADA.penobscot.clean <- TADA_SimpleCensoredMethods(
TADA.penobscot.clean,
nd_method = "multiplier",
nd_multiplier = 0.5,
od_method = "as-is",
od_multiplier = "null"
)

TADA.penobscot.clean <- TADA_FindQCActivities(TADA.penobscot.clean, clean = TRUE)

run key flagging functions and clean

TADA.penobscot.clean <- TADA_RunKeyFlagFunctions(
TADA.penobscot.clean,
clean = TRUE
)

TADA.penobscot.clean <- TADA_FlagAboveThreshold(TADA.penobscot.clean, clean = TRUE, flaggedonly = FALSE)

TADA.penobscot.clean <- TADA_FlagBelowThreshold(TADA.penobscot.clean, clean = TRUE, flaggedonly = FALSE)

TADA.penobscot.clean <- TADA_HarmonizeSynonyms(TADA.penobscot.clean)

mod 2

check all orgs in ATTAINS for crosswalk

TADA.penobscot.AUMLRef <- TADA_CreateAUMLCrosswalk(
TADA.penobscot.clean,
org_id = "all",
fill_ATTAINS_catch = TRUE,
return_nearest = TRUE,
batch_upload = FALSE,
)

TADA_ViewATTAINS(TADA.penobscot.AUMLRef2)

check only MEDEP for crosswalk and geospatial matches

TADA.penobscot.AUMLRef2 <- TADA_CreateAUMLCrosswalk(
TADA.penobscot.clean,
org_id = "MEDEP",
fill_ATTAINS_catch = TRUE,
return_nearest = TRUE,
batch_upload = FALSE,
)

TADA_ViewATTAINS(TADA.penobscot.AUMLRef2)

do not check any org for crosswalk, just use spatial joins to join w/ AU from any org

TADA.penobscot.AUMLRef3 <- TADA_CreateAUMLCrosswalk(
TADA.penobscot.clean,
org_id = "none",
fill_ATTAINS_catch = TRUE,
return_nearest = TRUE,
batch_upload = FALSE,
)

TADA_ViewATTAINS(TADA.penobscot.AUMLRef3)
`

Pull Request Checklist

Preparation

  • Update your branch from the latest develop and resolve any merge conflicts

  • Before creating a pull request trigger the format-update GitHub Action on your branch to format the code

Documentation

  • Add/update inline and/or block comments to clarify complexity, context and intent

  • Add/update function documentation (roxygen), include working examples, build docs locally using devtools::document(), and inspect added/updated help pages for content and format

  • Add/update vignettes for corresponding changes in functionality, list these under articles in _pkgdown.yml, and ensure added/updated vignettes run and build with proper formatting locally

Maintenance & Data Refresh

  • Add new dependencies to DESCRIPTION and document appropriately

  • Run spelling maintenance in requiredMaintenance.R

  • If changes affect other package or the shiny app functions, update those impacted functions accordingly

  • If columns were added/updated, add/update them in RequiredCols.R

  • Run .TADA_UpdateRefFiles() and .TADA_UpdateExampleData() locally via MaintenanceScheduled.R or trigger the Component File Update GitHub Action

  • If new example data files were added, document them in ExampleData.R and include them in MaintenanceScheduled.R for regular refresh

Tests and checks

  • Add/update tests in tests/testthat to cover changes

  • Run devtools::test() to verify new and existing tests pass

  • Run devtools::check() and address any errors, warnings or notes

Pull Request Description

  • Includes a summary of the changes made

  • Includes relevant context/motivation

  • Includes links to related issues or pull requests (keywords like "Closes #issue_number" automatically close related issues when pull request is merged)

Review

  • Review the bot-commented coverage-report generated by test-coverage to confirm all changes are covered by tests

  • Review/accept any bot-suggested format changes

  • Request review from at least one developer team member

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

coverage-report

File Coverage Missing
All files 35%
R/ATTAINSCrosswalks.R 25% 63-859 1069-1084 1088-1092 1097-1102 1107 1113-1133 1139-1142 1147-1168 1179-1194 1247-1250 1425-1481 1488-1740 1925-1937 1941-1944 1949 1977-1980 1992-1995 2003-2007 2023-2027 2043-2049 2057-2072 2077 2083-2096 2116-2119 2275-2284 2289-2299 2459-2732 2924-3441 3596-3615 3619-3622 3631-3644 3651-3671 3679-3683 3696-3700 3731-3841 3893-4050 4055-4058 4065-4208
R/ATTAINSRefTables.R 0% 24-935
R/autoClean.R 89% 152-153 248-254 413-414 424-428
R/autoFilter.R 46% 31-228 354-356 362 393 425-437
R/CensoredDataSuite.R 88% 52-53 142 181-182 253-259 494-495 500-502 505-507 515 562-569 572-573 579-584 601-603
R/CriteriaComparison.R 87% 173-177 182 191-193 240-265
R/CriteriaMethods.R 17% 226-237 241-243 260-262 267-269 274-276 286-299 307-334 504-508 524-528 635-792 809-984 1012-1061 1085-1645 1663-1978
R/CriteriaRefTables.R 0% 22-195
R/DataDiscoveryRetrieval.R 31% 199 210-213 230-233 246-249 255 259 276-751 765-767 775 777 782-789 797 803 805 809 811 817 821 823 833 835 839 845 847 851 853 858 860 864 871-878 886 898-916 927-933 962-980 994-1012 1031 1128-1159 1264-1271 1369-1405 1498-1501 1570-1748
R/DepthProfile.R 0% 102-2020
R/Figures.R 0% 64-1521
R/GeospatialFunctions.R 33% 115-119 194-196 224-226 310 372-373 376-378 444-446 501-503 517 583-585 725 731-734 813 821-1249 1435-1441 1448-2384 2580-2590 2637-2647 2653-2684 2750 2754 2758 2780-2828 2910-2998 3003-3038 3133-3974
R/MaintenanceScheduled.R 0% 42-449
R/Maps.R 8% 26-488 579 681 708-1297
R/RequiredCols.R 20% 386-629
R/ResultFlagsDependent.R 56% 60-62 67 109-118 143-150 253 290-294 316-319 326-329 345-361 422 445-447 453-454 460 508-519 525-532 595-598 610 626-637 662-664 677-683 754-881 951-954 999 1066-1078 1102-1104 1108-1110 1116-1125
R/ResultFlagsIndependent.R 69% 70-72 78 123-157 265-267 272 276 280 290 388-391 403-435 525-527 532-534 543 663-681 696-721 810-812 817-819 828 956-966 981-1168 1213 1235-1254 1267-1272 1375 1379 1437-1452 1457 1461-1468 1532-1533 1628-1644 1716-1721 1842-1856
R/Tables.R 93% 19-30
R/TADAGeospatialRefLayers.R 0% 8-13
R/TADARefTables.R 85% 86-88 105-111
R/Transformations.R 88% 76-77 82-84 221-232 394-395 444-447 515 792 924-925 942 973-984 987-1004 1008-1016
R/UnitConversions.R 82% 147 421 428 435 442-444 451 458-460 469-472 482-484 634-716 738-784 807 855 868-882 1115-1119 1199 1276-1279 1321
R/Utilities.R 54% 12-16 485 603-604 608 613-615 710 839-850 911-912 919 1004-1005 1035-1039 1144-1145 1149-1150 1160-1164 1169-1174 1216-1575 1601-1602 1615-1618 1689-2110 2311-2339 2373 2380-2383 2387 2398 2414-2415 2417-2418 2420-2435 2437 2439 2444-2445 2447-2450 2452 2454 2457 2472 2478 2486 2491 2499-2504 2509-2514
R/WQPWQXRefTables.R 67% 21-95 119 131 137-143 154-158 180 192 198-206 278-282 304 316 322-328 423-427 448 460 466-472 618-622 644 656 662-668 685-689 712 724 730-736 1056-1283

Minimum allowed coverage is 10%

Generated by 🐒 cobertura-action against 99b7388

github-actions bot and others added 3 commits January 22, 2026 19:29
…le-tada-data-frame-from-penobscot-tribal-layer' of https://github.com/USEPA/EPATADA into 787-tada_createauml-running-into-an-error-with-an-example-tada-data-frame-from-penobscot-tribal-layer
@wokenny13
Copy link
Collaborator

What would the expected output be for when users specify fill_USGS_catch = TRUE in this case?

I first ran:
`TADA.penobscot.AUMLRef2 <- TADA_CreateAUMLCrosswalk(
TADA.penobscot.clean,
org_id = "MEDEP",
fill_ATTAINS_catch = TRUE,
return_nearest = TRUE,
batch_upload = FALSE,
)

TADA_ViewATTAINS(TADA.penobscot.AUMLRef2)
`
image

And I was curious to see the output with fill_USGS_catch = TRUE, and this resulted in an empty TADA dataframe. Is this expected?
`
TADA.penobscot.AUMLRef3 <- TADA_CreateAUMLCrosswalk(
TADA.penobscot.clean,
org_id = "MEDEP",
fill_ATTAINS_catch = TRUE,
fill_USGS_catch = TRUE,
return_nearest = TRUE,
batch_upload = FALSE,
)

TADA_ViewATTAINS(TADA.penobscot.AUMLRef3)
`

image

@hillarymarler
Copy link
Collaborator Author

I will take a look at that @wokenny13 - thanks for catching that.

@hillarymarler hillarymarler marked this pull request as draft January 23, 2026 17:59
hillarymarler and others added 6 commits January 26, 2026 07:20
…-with-an-example-tada-data-frame-from-penobscot-tribal-layer
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…le-tada-data-frame-from-penobscot-tribal-layer' of https://github.com/USEPA/EPATADA into 787-tada_createauml-running-into-an-error-with-an-example-tada-data-frame-from-penobscot-tribal-layer
@hillarymarler
Copy link
Collaborator Author

@wokenny13 and @cristinamullin - it would be helpful for me if we add a quick discussion about what the desired outcome of fill_USGS_catch = TRUE is. I believe at some point there was discussion about removing the fetchNHD parts of TADA_CreateAUMLRef and separating those into a separate function. So I know there are changes still needed, I am not sure what they all are.

…-with-an-example-tada-data-frame-from-penobscot-tribal-layer
…-with-an-example-tada-data-frame-from-penobscot-tribal-layer
…le-tada-data-frame-from-penobscot-tribal-layer' of https://github.com/USEPA/EPATADA into 787-tada_createauml-running-into-an-error-with-an-example-tada-data-frame-from-penobscot-tribal-layer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TADA_CreateAUML running into an error with an example TADA data frame from Penobscot Tribal layer

3 participants