EDIorg / ecocomDP

A dataset design pattern and R package for ecological community data.
https://ediorg.github.io/ecocomDP/
Other
32 stars 13 forks source link

read_data - using regex to determine if EDI or NEON source could be reconsidered #94

Open mobb opened 3 years ago

mobb commented 3 years ago

today, the read_data function parses the dataset identifier (regex) to decided to decide whether the source is pasta (EDI) or NEON. That seems a little risky, since a) the formats are very similar already (see screenshot - one character different), and b) adapting to a new ID format means hunting down the regex in code. We don't have plans to add another data source, but doing so would be difficult.

Consider using a switch (or function arg) to decide which read method to use.

Screen Shot 2020-09-24 at 12 31 19 PM

clnsmth commented 3 years ago

@mobb We'll cross this bridge when we add support for another data source. The current implementation works fine for now. May I close this issue?