View source: R/get_codelist_of_dimension.R
get_codelist_of_dimension | R Documentation |
This function extracts the metadata of the code list used in one dimension of a raw_dataset
get_codelist_of_dimension(con,dataset_metadata,dimension_name)
con |
a wrapper of rpostgresql connection (connection to a database) |
dataset_metadata |
data.frame of type "metadata" (one row extracted from the table metadata.metadata). |
dimension_name |
string. One of the dimensions available in the dataset |
a data.frame of the metadata of the code list used for the dimension set in the parameter dimension_name
Other discover data: get_dsd_of_dataset
,
list_dataset_available_dimensions
,
list_metadata_datasets
,
list_variable_available_dimensions
# Connect to Tuna atlas database
con<-db_connection_tunaatlas_world()
# Retrieve code list of dimension "gear" of dataset "indian_ocean_catch_ll_1952_11_01_2016_01_01_tunaatlasIOTC_2017_level0"
dataset_metadata<-list_metadata_datasets(con,dataset_name="global_catch_1950_01_01_2016_01_01_tunaatlasird_level0__2017")
# Get the dimensions available in the dataset
#list_dataset_available_dimensions(con,dataset_metadata)
# Get the code list used in the dataset for the dimension "gear"
get_codelist_of_dimension(con,dataset_metadata,"gear")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.