get_codelist_of_dimension: Get the metadata of a code list used in a raw_dataset

View source: R/get_codelist_of_dimension.R

get_codelist_of_dimensionR Documentation

Get the metadata of a code list used in a raw_dataset

Description

This function extracts the metadata of the code list used in one dimension of a raw_dataset

Usage

get_codelist_of_dimension(con,dataset_metadata,dimension_name)

Arguments

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

Value

a data.frame of the metadata of the code list used for the dimension set in the parameter dimension_name

See Also

Other discover data: get_dsd_of_dataset, list_dataset_available_dimensions, list_metadata_datasets, list_variable_available_dimensions

Examples



# 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")



ptaconet/rtunaatlas documentation built on June 23, 2024, 9:35 p.m.