HDXDataset: HDX Dataset

Description Details Super class Public fields Methods

Description

HDX Dataset

HDX Dataset

Details

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

Super class

rhdx::HDXObject -> HDXDataset

Public fields

resources

list of Resource object within the dataset

data

placeholder for Dataset field element

Methods

Public methods

Inherited methods

Method new()

Create a new Dataset object

Usage
HDXDataset$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
HDXDataset$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
HDXDataset$get_resources(pattern = NULL, format = NULL)
Arguments
pattern

regex pattern in resource name

format

format of the resources

Returns

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


Method number_of_resources()

Get number of dataset resources

Usage
HDXDataset$number_of_resources()
Returns

The number of Resource objects


Method delete_resource()

Delete a resource by its index

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

the index of the resource to delete


Method delete_resources()

Delete all resources from a dataset

Usage
HDXDataset$delete_resources()

Method browse()

Browse the dataset page on HDX

Usage
HDXDataset$browse()

Method get_configuration()

Get the current configuration in use

Usage
HDXDataset$get_configuration()
Returns

A configuration object, the configuration in use


Method get_dataset_date()

Get the dataset date

Usage
HDXDataset$get_dataset_date()
Returns

a date, the dataset date.


Method get_update_frequency()

Get dataset update frequency

Usage
HDXDataset$get_update_frequency()
Returns

a character, the dataset update frequency Get dataset tags


Method get_tags()

Usage
HDXDataset$get_tags()
Returns

a list of Tag objects, datasets tags


Method get_locations()

Get the datasets location

Usage
HDXDataset$get_locations()
Returns

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


Method get_maintainer()

Get the dataset maintainer

Usage
HDXDataset$get_maintainer()
Returns

An User object, the maintainer of the dataset


Method get_organization()

Get the dataset organization

Usage
HDXDataset$get_organization()
Returns

an Organization object, the organization that shared the data


Method get_showcases()

Get the Showcase associated to the dataset

Usage
HDXDataset$get_showcases()
Returns

a Showcase object containing the dataset


Method is_requestable()

Check if the dataset is requestable

Usage
HDXDataset$is_requestable()
Returns

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


Method get_required_fields()

Get dataset required fields

Usage
HDXDataset$get_required_fields()
Returns

list of required fields for a dataset


Method check_required_fields()

Check dataset required field

Usage
HDXDataset$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
HDXDataset$as_list()
Returns

a list with dataset field


Method print()

Print a Dataset object

Usage
HDXDataset$print()

Method clone()

The objects of this class are cloneable with this method.

Usage
HDXDataset$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


dickoa/rhdx documentation built on Oct. 13, 2021, 8:36 p.m.