nwfsc-cb / rCAX

rCAX R package: an R client to access the REST API for the StreamNet Coordinated Assessments tables
https://nwfsc-cb.github.io/rCAX/
Other
5 stars 1 forks source link

get column descriptions for the tables #6

Closed eeholmes closed 1 year ago

eeholmes commented 1 year ago

In the 3 tab for the Excel files that are downloaded, there is a file with definitions of all the columns. I could not find that table in the API tables but I am guessing it might be somewhere in the database. I searched everywhere and couldn't find it. While we could just create it from the Excel file, it'd be best if I can download it from the API so it stays synced.

@mari-williams Can you ask the CAX folks where it might be?

Image

eeholmes commented 1 year ago

If we can't download, then I'll do a temporary fix by getting the definitions from the Excel files and save into data.

eeholmes commented 1 year ago

@mari-williams I created the definition table using the definitions from the downloaded Excel files. So I think we are ok unless the definitions change, and then our definitions will be out of sync.

mari-williams commented 1 year ago

@eeholmes I will ask, this is great feedback!

eeholmes commented 1 year ago

@mari-williams There are 2 colnames that I cannot figure out: "trtmethod" and "hli_id" .

trtmethod is "Yes", "No", or "" in the tables. Does not appear in the definitions tabs on any of the HLI Excel files.

hli_id does not seem to be associated with a hli. like NOSA does not have one number. Does not match any other ids (like popid or nmfs_popid). Numbers like 5 19 21 59 83 172 201 227 237 357

Do you know what these are?

mari-williams commented 1 year ago

We have moved away from trtmethod. It was originally intended to mark the collection and analysis methods that were developed and used by the TRT in status assessment. Data entry folks took to using it as 'NOAA will look at my data if I say yes' and as we got farther from the end of the TRT and data gaps filled and new methodology became available (and valid alt datastreams came online) it became confusing and was dissolved as we move towards a 'dataset' column along with the 'best value' column per contributor. I'm looking and finding nothing about hli_id. asking.

eeholmes commented 1 year ago

Ok, I'll remove trtmethod from the output then

mari-williams commented 1 year ago

yes, make the nightmare be gone!!!

mari-williams commented 1 year ago

hli_id is probably the programmers internal tracking of pages or such. i'm going to clarify with him, but right now the understanding is that it's not data or anything representing data

eeholmes commented 1 year ago

Thanks, Mike and Greg!

On Wed, Dec 7, 2022 at 1:08 PM Mike Banach [mike_banach@psmfc.org](mailto:mike_banach@psmfc.org) wrote: Hi Mari.

Eli should now be able to directly access field definitions via the StreamNet API.

The GUID for the table is BD0C3244-B688-4C3E-BE18-21AF0E9E5FCB. Table name is zwq_FieldDefinitions. The table has a few fields that are not useful but she should be able to easily find and use what she's after.

Mike

eeholmes commented 1 year ago

Closing this as I have a working solution. I'll code up getting the data from the zwq_FieldDefinitions table for a later update to the package.