Description Usage Arguments Value Author(s) See Also Examples
View source: R/getSQLSardaraQueries.R
Get a list of queries to execute to manage the datasets available in Sardara (extract in csv format, in netcdf, etc.)
1 | getSQLSardaraQueries(con,dataset_metadata)
|
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). |
a list with SQL queries and informations on the dataset. Depending on the type of data (raw_dataset, codelist, mapping), the output elements of the list might vary. The elements of the list are:
query_CSV
: Query to retrieve a data.frame with the codes
query_CSV_with_labels
: Query to retrieve a data.frame with codes and labels (for raw_datasets)
query_NetCDF
:
query_wfs_wms
:
query_wfs_wms_aggregated_layer
:
query_dynamic_list_keywords_species
:
query_dynamic_list_keywords_fishing_gears
:
query_dynamic_list_keywords_Fleets
:
query_dynamic_metadata_count_features
:
query_dynamic_metadata_spatial_Extent
:
query_dynamic_metadata_temporal_Extent
:
query_dynamic_metadata_get_SRID
:
lineage
:
query_dynamic_list_keywords_institutions
:
Paul Taconet, paul.taconet@ird.fr
Other access data: extract_dataset
1 2 3 4 5 6 7 8 9 10 | # Connect to Tuna atlas database
con<-db_connection_tunaatlas_world()
# retrieve metadata row of dataset global_catch_5deg_1m_1950_01_01_2016_01_01_tunaatlasIRD_level1
dataset_metadata<-list_metadata_datasets(con,identifier="global_catch_5deg_1m_1950_01_01_2016_01_01_tunaatlasIRD_level1")
queries<-getSQLSardaraQueries(con,dataset_metadata)
# retrieve data.frame of global_catch_5deg_1m_1950_01_01_2016_01_01_tunaatlasIRD_level1
global_catch_5deg_1m_1950_01_01_2016_01_01_tunaatlasIRD_level1<-dbGetQuery(con,queries$query_CSV)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.