IMCR-Hackathon / Hackathon-Central-2018

Command center for IMCR Hackathon participants to share ideas, coordinate teams, develop projects and access all logistics information
3 stars 0 forks source link

Extract and Use Metadata in Filenames #8

Open jpshanno opened 6 years ago

jpshanno commented 6 years ago

Filenames generally include information about the data collected: site, sensor, measurement type, date collected, etc. A generalized approach (probably just a function or two) that would split the filename into data columns using a template would be very useful. For example if a set of file names read as "site-variable-year" (152-soil_moisture-2017, 152-soil_temperature-2017, 140-soil_moisture_2017, etc), then the function would take an argument supplying the template as column headers: "site-variable-year" with either delimiters or the length of each variable to enable splitting. The extracted data could either be added to the read-in dataset, or used to generate an inventory of data by the provided variables.

adroghini commented 6 years ago

@jpshanno One of the things I told my colleague I would tackle! She's working with HOBO temperature loggers and that is exactly what she's dealing with. I've dealt with this before so should be able to dig up code that we can generalize.