Dataset: HDX Dataset

Description Details Public fields Methods

Description

HDX Dataset

HDX Dataset

Details

Dataset class containing all logic for accessing, creating, and updating datasets and associated resources.

Public fields

resources

list of Resource object within the dataset

data

placeholder for Dataset field element

Methods

Public methods


Method new()

Create a new Dataset object

Usage
Dataset$new(initial_data = NULL, configuration = NULL)
Arguments
initial_data

list with required field to create a dataset

configuration

a Configuration object

Returns

A Dataset object


Method get_resource()

Get a specific resource of the dataset

Usage
Dataset$get_resource(index)
Arguments
index,

the index of the resource to access

Returns

a Resource object, the selected resource


Method get_resources()

Get all resources of the dataset

Usage
Dataset$get_resources()
Returns

a list of Resource objects, all resources available in the dataset


Method delete_resource()

Delete a resource by its index

Usage
Dataset$delete_resource(index = 1L)
Arguments
index,

the index of the resource to delete


Method delete_resources()

Delete all resources from a dataset

Usage
Dataset$delete_resources()

Method browse()

Browse the dataset page on HDX

Usage
Dataset$browse()

Method get_configuration()

Get the current configuration in use

Usage
Dataset$get_configuration()
Returns

A configuration object, the configuration in use


Method get_dataset_date()

Get the dataset date

Usage
Dataset$get_dataset_date()
Returns

a date, the dataset date.


Method set_dataset_date()

Set the dataset date

Usage
Dataset$set_dataset_date(date, format = "%m/%d/%Y")
Arguments
date

a character, by default with the format month/day/year

format

the format of the date supplied


Method get_update_frequency()

Get dataset update frequency

Usage
Dataset$get_update_frequency()
Returns

a character, the dataset update frequency Get dataset tags


Method get_tags()

Usage
Dataset$get_tags()
Returns

a list of Tag objects, datasets tags


Method get_locations()

Get the datasets location

Usage
Dataset$get_locations()
Returns

a list of Location objects, all locations covered by the dataset


Method get_maintainer()

Get the dataset maintainer

Usage
Dataset$get_maintainer()
Returns

An User object, the maintainer of the dataset


Method get_organization()

Get the dataset organization

Usage
Dataset$get_organization()
Returns

an Organization object, the organization that shared the data


Method get_showcases()

Get the Showcase associated to the dataset

Usage
Dataset$get_showcases()
Returns

a Showcase object containing the dataset


Method set_organization()

Set organization for a dataset

Usage
Dataset$set_organization(organization)
Arguments
organization

Organization


Method is_requestable()

Check if the dataset is requestable

Usage
Dataset$is_requestable()
Returns

a logical value, TRUE if it's a requestable dataset


Method get_required_fields()

Get dataset required fields

Usage
Dataset$get_required_fields()
Returns

list of required fields for a dataset


Method check_required_fields()

Check dataset required field

Usage
Dataset$check_required_fields()
Returns

a logical value, TRUE if the the dataset is not missing a required field and throws an error otherwise


Method as_list()

Get dataset field into list

Usage
Dataset$as_list()
Returns

a list with dataset field


Method print()

Print a Dataset object

Usage
Dataset$print()

Method clone()

The objects of this class are cloneable with this method.

Usage
Dataset$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


dickoa/rhdx documentation built on May 7, 2020, 2 p.m.