Learn R Programming

FAOSTAT (version 2.4.0)

search_dataset: Search FAOSTAT dataset_codes, datasets, elements, indicators, and items

Description

Get full list of datasets from the FAOSTAT database with the Code, dataset name and updates.

Usage

search_dataset(dataset_code, dataset_label, latest = TRUE, reset_cache = FALSE)

FAOsearch(dataset_code, dataset_label, latest = TRUE, reset_cache = FALSE)

Value

A data.frame with the columns: code, label, date_update, note_update, release_current, state_current, year_current, release_next, state_next, year_next

Arguments

dataset_code

character. Code of desired datasets, listed as `code` in output.

dataset_label

character. Name of the datasets, listed as `label` in the output data frame. Can take regular expressions.

latest

logical. Sort list by latest updates

reset_cache

logical. By default, data is saved after a first run and reused. Setting this to true causes the function to pull data from FAO again

Examples

Run this code
if (FALSE) {
# Find information about all datasets
fao_metadata <- search_dataset()
# Find information about forestry datasets
search_dataset(dataset_code="FO")
# Find information about datasets whose titles contain the word "Flows"
search_dataset(dataset_label="Flows")
}

Run the code above in your browser using DataLab