flr / fishdata

Example FLR datasets
0 stars 0 forks source link

DESIGN ideas #1

Open iagomosqueira opened 3 years ago

iagomosqueira commented 3 years ago

Some initial thoughts on design:

iagomosqueira commented 3 years ago

Metadata in database: name, description, source, date/year, FAO 3alpha, RFMO/scientific body, code (e.g. ICES code), link/url, website, dimensions, MD5 hash

iagomosqueira commented 3 years ago

Another option is to use, instead of the fishdata/data folder, a local folder as personal database. An environmental variable to be set in .Rprofile would point to it, so a function call, e.g. fishdata('sol274') would extract it from there. fishdata('sol274', source=...) would instead get it from a given dataset source (TAF or fishdata repository). This way the database will be free from package updates or version changes.

iagomosqueira commented 3 years ago

Draft database table

data.table(
  name="ple4",
  desc="AAP stock assessment for NS plaice - ICES WGNSSK 2019"
  source="fishdata",
  year="2018",
  fao3a="PLE",
  body="ICES",
  body_code="ple.27.40",
  link="",
  class=class(ple4),
  md5=tools::md5sum(file.path(system.file('data', package='FLCore'), "ple4.RData"))
)