Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update import tab "Option C: Upload dataset" #135

Open
cristinamullin opened this issue Feb 12, 2024 · 4 comments
Open

Update import tab "Option C: Upload dataset" #135

cristinamullin opened this issue Feb 12, 2024 · 4 comments
Assignees

Comments

@cristinamullin
Copy link
Collaborator

cristinamullin commented Feb 12, 2024

Is your feature request related to a problem? Please describe.

A shiny app user may want to upload their own data using "Option C: Upload dataset" on the import tab. This option is not fully fleshed out and needs to be updated and tested with example datasets.

When a dataset is uploaded, we need to check that all TADA required columns are included in dataset and we need to run autoclean on the dataset on import. On import, at least the following two functions should be run:

  1. TADA_CheckRequiredFields()
  2. TADA_AutoClean()

Note: The package function TADA_CheckRequiredFields may need edits to best meet this use case.

@cristinamullin cristinamullin changed the title Data Import Update import tab "Option C: Upload dataset" Jun 4, 2024
@JamesBisese
Copy link
Collaborator

I found issues when trying to implement the "Download Template" functionality. I can get the system to import a TADA export, but not data that matches the template. The 'TADA.*" fields seem to be required now. I imagine that the requirement got coded in by accident during development of the TADA export/re-import process. I think I know enough to work on this issue now.

@cristinamullin
Copy link
Collaborator Author

Sounds great.

Here is the code from the TADA R Package: https://github.com/USEPA/EPATADA/blob/develop/R/RequiredCols.R.
see lines 342-381 for the EPATADA::TADA_CheckRequiredFields function that can hopefully be leveraged directly for this check.

Some of the TADA columns are required for subsequent TADA functions to run, however a user should still be able to upload a file that includes all the required columns (except the ones with the TADA. prefix). During upload, run EPATADA::TADA_CheckRequiredFields (first - to make sure all required WQP columns are included) and EPATADA::TADA_AutoClean (second - this adds the columns that will be required for the rest of the shiny application tabs to run).

@JamesBisese
Copy link
Collaborator

  1. Run 'Check Required Fields' and return message to user if any column is not found
  2. Run other routines as needed to make data 'complete'
  3. Trap errors during routines to report errors to user
    -- this is hard to estimate because trapping errors is not simple and a UI metaphor needs to be implemented for the first time.
    -- 8 - 16 hours

JamesBisese added a commit to JamesBisese/TADAShiny that referenced this issue Dec 4, 2024
Fixed download template functionality. And provider element
@cristinamullin
Copy link
Collaborator Author

cristinamullin commented Dec 5, 2024

Starting to work on this here: fix-option-C-#135.

See comments and remaining issues related to: #184

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

No branches or pull requests

2 participants