Options
All
  • Public
  • Public/Protected
  • All
Menu

An instance of a RDS Data Product. A basic building block to interact with a RDS API. Includes methods to query data product related information.

example
const covidServer = new RdsServer('https://covid19.richdataservices.com/rds');
const covidCatalog = new RdsCatalog(covidServer, 'int');
const dataProduct = new RdsDataProduct(covidCatalog, 'jhu_country');
dataProduct
 .select()
 .then(
   res => console.log('Data:', res.parsedBody),
   error => console.error('Oh no!', error)
 );

Hierarchy

Index

Constructors

constructor

  • Create a new RdsDataProduct which provides methods to interact with data product related endpoints on the RDS API.

    Parameters

    • catalog: RdsCatalog

      the RDS Catalog on which this data product exists

    • dataProductId: string

      the ID of this specific data product

    • Default value resolve: boolean = false

      whether to automatically start resolving all the data products's own properties, defaults to false

    Returns RdsDataProduct

Properties

Protected Readonly catalog

catalog: RdsCatalog

the RDS Catalog on which this data product exists

Optional citation

citation: undefined | string

Readonly dataProductId

dataProductId: string

the ID of this specific data product

Optional dataSet

dataSet: DataSet

Optional description

description: undefined | string

Optional documentation

documentation: undefined | string

Optional exclusion

exclusion: undefined | string

Optional id

id: undefined | string

Optional isPrivate

isPrivate: undefined | false | true

Optional isPublic

isPublic: undefined | false | true

Optional keywordCount

keywordCount: undefined | number

Optional keywords

keywords: Array<string>

Optional label

label: undefined | string

Optional lastUpdate

lastUpdate: Date

Optional name

name: undefined | string

Optional note

note: undefined | string

Optional provenance

provenance: undefined | string

Optional restriction

restriction: undefined | string

Optional uri

uri: undefined | string

Optional urlCount

urlCount: undefined | number

Optional urls

urls: Array<string>

Optional variableCount

variableCount: undefined | number

Accessors

dataProductUrl

  • get dataProductUrl(): string

queryUrl

  • get queryUrl(): string

Methods

count

  • Get record count. Runs a query to count the records of the specified data product.

    Returns Promise<HttpResponse<number>>

    the number of records within the data product.

isResolved

  • isResolved(): boolean

isResolving

  • isResolving(): boolean

registerResolutionListener

resolve

  • resolve(): Promise<void>
  • Get data product. This shows a single data product in a catalog, there is no additional information in this call, it simply limits the scope of what is returned.

    Returns Promise<void>

    a promise that completes once the data product is resolved

select

  • Run select query. Running a select query on the specified data product returns record level microdata. A variety of querying techniques can be used to subset, compute, order, filter and format the results.

    Type parameters

    Parameters

    Returns Promise<HttpResponse<DS>>

    Record level microdata, the shape will vary depending on the format query paramter.

Protected setResolved

  • setResolved(resolved: boolean): void

Protected setResolving

  • setResolving(resolving: boolean): void

tabulate

  • Run tabulation query. Running tabulations on the specified data product returns aggregate level data about the dimensions and measures specified. A variety of querying techniques can be used to subset, compute, order, filter and format the results.

    Type parameters

    Parameters

    Returns Promise<HttpResponse<DS>>

    Aggregate level data about the dimensions and measures specified. The shape will vary depending on the format query paramter.

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Protected property
  • Protected method
  • Private property
  • Static method

Generated using TypeDoc