Data Provider for importing data from wide- or long-format CSV files.

For wide-format CSVs, metrics should specify Metric.dataReference.column with the name of the column containing the metric's data.

For long-format CSVs, metrics should specify Metric.dataReference.variable. This value should be present in the CSV's variableColumn.

Example wide-format CSV:

|region |date       |var1 |var2 |
|TX |2022-02-01 |12 |45 |
|CA |2022-02-01 |31 |66 |

Example long-format CSV:

|region |date       |variable |value |
|TX |2022-02-01 |var1 |12 |
|TX |2022-02-01 |var2 |45 |
|CA |2022-02-01 |var1 |31 |
|CA |2022-02-01 |var2 |66 |

Hierarchy

Constructors

Properties

dataRowsByRegionId: undefined | Promise<{
    [regionId: string]: DataRow[];
}>
dateColumn?: string
id: string

A unique provider id to associate with the provider (e.g. "mock"). This ID can be used from a MetricDataReference in a metric to reference the data from this provider.

longFormatCsvOptions?: LongFormatCsvOptions
regionColumn: string
regionDb: RegionDB
url?: string

Methods

Generated using TypeDoc