View source: R/extract_dataset.R
extract_dataset | R Documentation |
This function outputs a dataset available in the Tuna atlas database.
extract_dataset(con,metadata_dataset,labels=FALSE)
con |
a wrapper of rpostgresql connection (connection to a database) |
metadata_dataset |
data.frame of type "metadata" (one row extracted from the table metadata.metadata). |
labels |
boolean extract the dataset with codes and labels? TRUE = codes + labels . FALSE = only codes. Default is FALSE |
The meaning of the columns of a raw dataset is provided in the data dictionary of raw datasets. ## to fill in this description when it is finalized
a data.frame of the data available in the database and set as dataset_name
Paul Taconet, paul.taconet@ird.fr
Other access data: getSQLSardaraQueries
# Connect to Tuna atlas database
con<-db_connection_tunaatlas_world()
# Extract a raw dataset
raw_dataset<-extract_dataset(con,list_metadata_datasets(con,dataset_name="global_catch_5deg_1m_1950_01_01_2016_01_01_tunaatlasIRD_level1"))
# Extract a code list
code_list<-extract_dataset(con,list_metadata_datasets(con,dataset_name="species_asfis"))
# Extract a mapping between code lists )
code_list_mapping<-extract_dataset(con,list_metadata_datasets(con,dataset_name="codelist_mapping_species_iotc_speciesgroup_tunaatlas"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.