Documentation
¶
Index ¶
- Constants
- func GetResourcePath(schemaFile string, dataResource *DataResource) string
- func GetResourcePathFromFolder(datasetFolder string, dataResource *DataResource) string
- func HasClusterVar(typ string) bool
- func HasFeatureVar(typ string) bool
- func IsAttributeRole(role string) bool
- func IsBasicSimonType(typ string) bool
- func IsBivariate(typ string) bool
- func IsCategorical(typ string) bool
- func IsDateTime(typ string) bool
- func IsFloatingPoint(typ string) bool
- func IsGeoBounds(typ string) bool
- func IsGeoCoordinate(typ string) bool
- func IsImage(typ string) bool
- func IsIndexRole(role string) bool
- func IsList(typ string) bool
- func IsMultiBandImage(typ string) bool
- func IsNumerical(typ string) bool
- func IsSchemaComplexType(typ string) bool
- func IsText(typ string) bool
- func IsTimeSeries(typ string) bool
- func IsTimestamp(typ string) bool
- func IsVector(typ string) bool
- func MapLLType(typ string) string
- func MapSchemaType(typ string) string
- func MapSimonType(typ string) string
- func MapTA2Type(typ string) string
- func NormalizeDatasetID(id string) string
- func NormalizeVariableName(name string) string
- func StringSliceEqual(a, b []string) bool
- type BaseGrouping
- type Bounds
- type ClassificationData
- type ClusteredGrouping
- type DataResource
- type DatasetOrigin
- type Filter
- func NewBivariateFilter(key string, mode string, minX float64, maxX float64, minY float64, ...) *Filter
- func NewCategoricalFilter(key string, mode string, categories []string) *Filter
- func NewClusterFilter(key string, mode string, categories []string) *Filter
- func NewDatetimeFilter(key string, mode string, min float64, max float64) *Filter
- func NewGeoBoundsFilter(key string, mode string, minX float64, maxX float64, minY float64, ...) *Filter
- func NewNumericalFilter(key string, mode string, min float64, max float64) *Filter
- func NewRowFilter(mode string, d3mIndices []string) *Filter
- func NewTextFilter(key string, mode string, categories []string) *Filter
- func NewVectorFilter(key string, nestedType string, mode string, min float64, max float64) *Filter
- type FilterObject
- type FilterSet
- type GeoBoundsGrouping
- type GeoCoordinateGrouping
- type Grouping
- type Metadata
- type MultiBandImageGrouping
- type SuggestedType
- type TimeseriesGrouping
- type Variable
- func (v *Variable) Clone() *Variable
- func (v *Variable) HasAllRole(roles []string) bool
- func (v *Variable) HasAnyRole(roles []string) bool
- func (v *Variable) HasRole(role string) bool
- func (v *Variable) IsGrouping() bool
- func (v *Variable) IsMediaReference() bool
- func (v *Variable) IsTA2Field() bool
Constants ¶
const ( // DefaultFilterSize represents the default filter search size. DefaultFilterSize = 100 // FilterSizeLimit represents the largest filter size. FilterSizeLimit = 1000 // GeoBoundsFilter represents a geobound filter type. GeoBoundsFilter = "geobounds" // CategoricalFilter represents a categorical filter type. CategoricalFilter = "categorical" // ClusterFilter represents a cluster filter type. ClusterFilter = "cluster" // NumericalFilter represents a numerical filter type. NumericalFilter = "numerical" // BivariateFilter represents a numerical filter type. BivariateFilter = "bivariate" // DatetimeFilter represents a datetime filter type. DatetimeFilter = "datetime" // TextFilter represents a text filter type. TextFilter = "text" // VectorFilter represents a text filter type. VectorFilter = "vector" // RowFilter represents a numerical filter type. RowFilter = "row" // IncludeFilter represents an inclusive filter mode. IncludeFilter = "include" // ExcludeFilter represents an exclusive filter mode. ExcludeFilter = "exclude" )
const ( // ExplainValues is the variable that holds the col name for the explain values ExplainValues = "explain_values" // SchemaSourceClassification was loaded via classification SchemaSourceClassification = "classification" // SchemaSourceMerged was loaded via merged output SchemaSourceMerged = "merged" // SchemaSourceOriginal was loaded via original schema SchemaSourceOriginal = "original" // SchemaSourceRaw was loaded via raw data file SchemaSourceRaw = "raw" // DefaultVarType is the variable type used by default DefaultVarType = "unknown" // ResTypeAudio is an audio data resource type ResTypeAudio = "audio" // ResTypeImage is an image data resource type ResTypeImage = "image" // ResTypeTable is a table data resource type ResTypeTable = "table" // ResTypeText is a text data resource type ResTypeText = "text" // ResTypeTime is a time series data resource type ResTypeTime = "timeseries" // ResTypeRaw is a raw data resource type ResTypeRaw = "raw" // FeatureTypeTrain is the training feature type. FeatureTypeTrain = "train" // FeatureTypeTarget is the target feature type. FeatureTypeTarget = "target" // RoleIndex is the role used for index fields. RoleIndex = "index" // RoleMultiIndex is the role used for index fields which are not unique in the learning data. RoleMultiIndex = "multiIndex" // RoleAttribute is the role used for attribute fields. RoleAttribute = "attribute" // D3MIndexFieldName denotes the name of the index field. D3MIndexFieldName = "d3mIndex" // FeatureVarPrefix is the prefix of a metadata var name. FeatureVarPrefix = "_feature_" // ClusterVarPrefix is the prefix of a metadata var name. ClusterVarPrefix = "_cluster_" // Variables is the field name which stores the variables in elasticsearch. Variables = "variables" // VarNameField is the field name for the variable name. VarNameField = "colName" // VarKeyField is the field name for the variable key. VarKeyField = "key" // VarIndexField is the field name for the variable index. VarIndexField = "colIndex" // VarRoleField is the field name for the variable role. VarRoleField = "role" // VarSelectedRoleField is the field name for the selected variable role. VarSelectedRoleField = "selectedRole" // VarDisplayVariableField is the field name for the display variable. VarDisplayVariableField = "colDisplayName" // VarOriginalVariableField is the field name for the original variable. VarOriginalVariableField = "colOriginalName" // VarTypeField is the field name for the variable type. VarTypeField = "colType" // VarOriginalTypeField is the field name for the orginal variable type. VarOriginalTypeField = "colOriginalType" // VarDescriptionField is the field name for the variable description. VarDescriptionField = "colDescription" // VarImportanceField is the field name for the variable importnace. VarImportanceField = "importance" // VarSuggestedTypesField is the field name for the suggested variable types. VarSuggestedTypesField = "suggestedTypes" // VarDistilRole is the variable role in distil. VarDistilRole = "distilRole" // VarDistilRoleSystemData indicates a var is important for the system but not intended for the user VarDistilRoleSystemData = "system-data" // VarDistilRoleFeaturized indicates a var has been featurized VarDistilRoleFeaturized = "featurized-data" // VarDistilRoleLabel indicates a var has been created through the label work flow VarDistilRoleLabel = "label" // VarDistilRoleIndex indicates a var has an index role in distil. VarDistilRoleIndex = "index" // VarDistilRoleData indicates a var has a data role in distil. VarDistilRoleData = "data" // VarDistilRoleGrouping indicates a var has a grouping role in distil. VarDistilRoleGrouping = "grouping" // VarDistilRoleMetadata is the distil role for metadata variables VarDistilRoleMetadata = "metadata" // VarDistilRoleAugmented is the distil role for variables created for UX, not for model creation. i.e. Outliers detection VarDistilRoleAugmented = "augmented" // VarDistilRolePadding is the distil role for variables that are empty or dummy variables (their only purpose is to add alignment for pipelines) VarDistilRolePadding = "padding" // VarDeleted flags whether the variable is deleted. VarDeleted = "deleted" // VarImmutableField is the name for the flag indicating whether the variable is immutable. VarImmutableField = "immutable" // VarGroupingField is the field name for the variable grouping. VarGroupingField = "grouping" // VarMinField is the field name for the min value. VarMinField = "min" // VarMaxField is the field name for the max value. VarMaxField = "max" // VarValuesField is the field name for the categorical values present in the data. VarValuesField = "values" // TypeTypeField is the type field of a suggested type TypeTypeField = "type" // TypeProbabilityField is the probability field of a suggested type TypeProbabilityField = "probability" // TypeProvenanceField is the provenance field of a suggested type TypeProvenanceField = "provenance" // DatasetPrefix is the prefix used for a normalized dataset id DatasetPrefix = "d_" )
const ( // AddressType is the schema type for address values AddressType = "address" // BivariateType is the schema type for lat long point BivariateType = "bivariate" // IndexType is the schema type for index values IndexType = "index" // IntegerType is the schema type for int values IntegerType = "integer" // RealType is the schema type for real values, and is equivalent to FloatType RealType = "real" // RealVectorType is the schema type for a vector of real values RealVectorType = "realVector" // RealListType is the schema type for a list of real values RealListType = "realList" // BoolType is the schema type for bool values BoolType = "boolean" // DateTimeType is the schema type for date/time values DateTimeType = "dateTime" // OrdinalType is the schema type for ordinal values OrdinalType = "ordinal" // CategoricalType is the schema type for categorical values CategoricalType = "categorical" // NumericalType is the schema type for numerical values NumericalType = "numerical" // StringType is the schema type for string/text values StringType = "string" // CityType is the schema type for city values CityType = "city" // CountryType is the schema type for country values CountryType = "country" // EmailType is the schema type for email values EmailType = "email" // LatitudeType is the schema type for latitude values LatitudeType = "latitude" // LongitudeType is the schema type for longitude values LongitudeType = "longitude" // PhoneType is the schema type for phone values PhoneType = "phone" // PostalCodeType is the schema type for postal code values PostalCodeType = "postal_code" // StateType is the schema type for state values StateType = "state" // URIType is the schema type for URI values URIType = "uri" // ImageType is the schema type for Image values ImageType = "image" // MultiBandImageType is t he schema type for multi-band (satellite) images MultiBandImageType = "multiband_image" // TimeSeriesType is the schema type for timeseries values TimeSeriesType = "timeseries" // GeoCoordinateType is the schema type for geocoordinate values GeoCoordinateType = "geocoordinate" // GeoBoundsType is the schema type for geocoordinate values GeoBoundsType = "geobounds" // TimestampType is the schema type for timestamp values TimestampType = "timestamp" // UnknownType is the schema type for unknown values UnknownType = "unknown" // SimonAddressType is the Simon type representing a street address SimonAddressType = "address" // SimonBooleanType is the Simon type representing a boolean SimonBooleanType = "boolean" // SimonDateTimeType is the Simon representation of a date time value SimonDateTimeType = "datetime" // SimonEmailType is the Simon representation of an email address SimonEmailType = "email" // SimonFloatType is the Simon type representing a float SimonFloatType = "float" // SimonIntegerType is the Simon type representing an integer SimonIntegerType = "int" // SimonPhoneType is the Simon representation of a phone number SimonPhoneType = "phone" // SimonStringType is the Simon type representing a string SimonStringType = "text" // SimonURIType is the Simon type representing a URI SimonURIType = "uri" // SimonCategoricalType is the Simon type representing categorical values SimonCategoricalType = "categorical" // SimonOrdinalType is the Simon type representing ordinalvalues SimonOrdinalType = "ordinal" // SimonStateType is the Simon type representing state values SimonStateType = "state" // SimonCityType is the Simon type representing city values SimonCityType = "city" // SimonPostalCodeType is the Simon type representing postal code values SimonPostalCodeType = "postal_code" // SimonLatitudeType is the Simon type representing geographic latitude values SimonLatitudeType = "latitude" // SimonLongitudeType is the Simon type representing geographic longitude values SimonLongitudeType = "longitude" // SimonCountryType is the Simon type representing country values SimonCountryType = "country" // SimonCountryCodeType is the Simon type representing country code values SimonCountryCodeType = "country_code" // TA2AttributeType is the semantic type representing an attribute TA2AttributeType = "https://metadata.datadrivendiscovery.org/types/Attribute" // TA2UnknownType is the semantic type representing the unknown field type TA2UnknownType = "https://metadata.datadrivendiscovery.org/types/UnknownType" // TA2StringType is the semantic type reprsenting a text/string TA2StringType = "http://schema.org/Text" // TA2IntegerType is the TA2 semantic type for an integer value TA2IntegerType = "http://schema.org/Integer" // TA2RealType is the TA2 semantic type for a real value TA2RealType = "http://schema.org/Float" // TA2BooleanType is the TA2 semantic type for a boolean value TA2BooleanType = "http://schema.org/Boolean" // TA2LocationType is the TA2 semantic type for a location value TA2LocationType = "https://metadata.datadrivendiscovery.org/types/Location" // TA2DateTimeType is the TA2 semantic type for a datetime value TA2DateTimeType = "http://schema.org/DateTime" // TA2TimeType is the TA2 semantic type for a time (role) value TA2TimeType = "https://metadata.datadrivendiscovery.org/types/Time" // TA2CategoricalType is the TA2 semantic type for categorical data TA2CategoricalType = "https://metadata.datadrivendiscovery.org/types/CategoricalData" // TA2OrdinalType is the TA2 semantic type for ordinal (ordered categorical) data TA2OrdinalType = "https://metadata.datadrivendiscovery.org/types/OrdinalData" // TA2ImageType is the TA2 semantic type for image data TA2ImageType = "http://schema.org/ImageObject" // TA2TimeSeriesType is the TA2 semantic type for timeseries data TA2TimeSeriesType = "https://metadata.datadrivendiscovery.org/types/Timeseries" // TA2RealVectorType is the TA2 semantic type for vector data TA2RealVectorType = "https://metadata.datadrivendiscovery.org/types/FloatVector" // TA2BoundingPolygon is the TA2 semantic type for a bounding polygon TA2BoundingPolygon = "https://metadata.datadrivendiscovery.org/types/BoundingPolygon" // TA2TargetType is the semantic type indicating a prediction target TA2TargetType = "https://metadata.datadrivendiscovery.org/types/Target" // TA2GroupingKeyType is the semantic type indicating a grouping key TA2GroupingKeyType = "https://metadata.datadrivendiscovery.org/types/GroupingKey" // TA2SuggestedGroupingType is the semantic type indicating a suggested grouping key TA2SuggestedGroupingType = "https://metadata.datadrivendiscovery.org/types/SuggestedGroupingKey" // BooleanSchemaType is the schema doc type for boolean data BooleanSchemaType = "boolean" // IntegerSchemaType is the schema doc type for integer data IntegerSchemaType = "integer" // RealSchemaType is the schema doc type for real data RealSchemaType = "real" // StringSchemaType is the schema doc type for string/text data StringSchemaType = "string" // TextSchemaTypeDeprecated is the old schema doc type for string/text data TextSchemaTypeDeprecated = "text" // CategoricalSchemaType is the schema doc type for categorical data CategoricalSchemaType = "categorical" // DatetimeSchemaType is the schema doc type for datetime data DatetimeSchemaType = "dateTime" // RealVectorSchemaType is the schema doc type for a vector of real data RealVectorSchemaType = "realVector" // JSONSchemaType is the schema doc type for json data JSONSchemaType = "json" // GeoJSONSchemaType is the schema doc type for geo json data GeoJSONSchemaType = "geojson" // ImageSchemaType is the schema doc type for image data ImageSchemaType = "image" // TimeSeriesSchemaType is the schema doc type for image data TimeSeriesSchemaType = "timeseries" // TimestampSchemaType is the schema doc type for image data TimestampSchemaType = "timestamp" // UnknownSchemaType is the scehma type representing the unknown field type UnknownSchemaType = "unknown" )
Variables ¶
This section is empty.
Functions ¶
func GetResourcePath ¶
func GetResourcePath(schemaFile string, dataResource *DataResource) string
GetResourcePath returns the absolute path of the data resource.
func GetResourcePathFromFolder ¶
func GetResourcePathFromFolder(datasetFolder string, dataResource *DataResource) string
GetResourcePathFromFolder returns the absolute path of the data resource.
func HasClusterVar ¶
HasClusterVar indicates whether or not a schema type has a corresponding cluster var.
func HasFeatureVar ¶
HasFeatureVar indicates whether or not a schema type has a corresponding feature var.
func IsAttributeRole ¶
IsAttributeRole returns true if the d3m role is an attribute role.
func IsBasicSimonType ¶
IsBasicSimonType check whether or not a type is a basic simon type.
func IsBivariate ¶
IsBivariate indicates where or not a schema type is a bivariate for the purposes of analysis
func IsCategorical ¶
IsCategorical indicates whether or not a schema type is categorical for the purposes of analysis.
func IsDateTime ¶
IsDateTime indicates whether or not a schema type is a date time for the purposes of analysis.
func IsFloatingPoint ¶
IsFloatingPoint indicates whether or not a schema type is a floating point value.
func IsGeoBounds ¶
IsGeoBounds indicates whether or not a schema type is a geo coordinate for the purposes of analysis.
func IsGeoCoordinate ¶
IsGeoCoordinate indicates whether or not a schema type is a geo coordinate for the purposes of analysis.
func IsImage ¶
IsImage indicates whether or not a schema type is an image for the purposes of analysis.
func IsIndexRole ¶
IsIndexRole returns true if the d3m role is an index role.
func IsMultiBandImage ¶
IsMultiBandImage indicates whether or not a schema type is a multi-band (satellite) image for the purposes of analysis
func IsNumerical ¶
IsNumerical indicates whether or not a schema type is numeric for the purposes of analysis.
func IsSchemaComplexType ¶
IsSchemaComplexType check whether or not a type is a complex schema type.
func IsTimeSeries ¶
IsTimeSeries indicates whether or not a schema type is a timeseries for the purposes of analysis.
func IsTimestamp ¶
IsTimestamp indicates whether or not a schema type is a timestamp for the purposes of analysis.
func IsVector ¶
IsVector indicates whether or not a schema type is a vector for the purposes of analysis.
func MapSchemaType ¶
MapSchemaType maps an internal Distil type to an LL D3M dataset doc type. Distil type should be recognized at this point and it is programmer error if not.
func MapSimonType ¶
MapSimonType maps a Simon type to an internal data type.
func MapTA2Type ¶
MapTA2Type maps an internal Distil type to a TA2 type. Distil type should be recognized at this point and it is programmer error if not.
func NormalizeDatasetID ¶
NormalizeDatasetID modifies a dataset ID to be compatible with postgres naming requirements.
func NormalizeVariableName ¶
NormalizeVariableName normalizes a variable name.
func StringSliceEqual ¶
StringSliceEqual compares 2 string slices to see if they are equal.
Types ¶
type BaseGrouping ¶
type BaseGrouping interface { GetDataset() string GetType() string GetIDCol() string GetSubIDs() []string GetHidden() []string IsNil() bool }
BaseGrouping provides access to the basic grouping information.
type Bounds ¶
type Bounds struct { MinX float64 `json:"minX"` MaxX float64 `json:"maxX"` MinY float64 `json:"minY"` MaxY float64 `json:"maxY"` }
Bounds defines a bounding box
type ClassificationData ¶
type ClassificationData struct { Labels [][]string `json:"labels"` Probabilities [][]float64 `json:"label_probabilities"` Path string `json:"path"` }
ClassificationData contains semantic type information by column index.
type ClusteredGrouping ¶
type ClusteredGrouping interface {
GetClusterCol() string
}
ClusteredGrouping provides access to grouping cluster information.
type DataResource ¶
type DataResource struct { ResID string `json:"resID"` ResType string `json:"resType"` ResPath string `json:"resPath"` IsCollection bool `json:"isCollection"` Variables []*Variable `json:"columns,omitempty"` ResFormat map[string][]string `json:"resFormat"` }
DataResource represents a set of variables found in a data asset.
func NewDataResource ¶
func NewDataResource(id string, typ string, format map[string][]string) *DataResource
NewDataResource creates a new data resource instance.
func (*DataResource) AddVariable ¶
func (dr *DataResource) AddVariable(name string, originalName string, typ string, description string, role []string, distilRole []string)
AddVariable creates and add a new variable to the data resource.
func (*DataResource) GenerateHeader ¶
func (dr *DataResource) GenerateHeader() []string
GenerateHeader generates csv headers for the data resource.
type DatasetOrigin ¶
type DatasetOrigin struct { SearchResult string `json:"searchResult"` Provenance string `json:"provenance"` SourceDataset string `json:"sourceDataset"` }
DatasetOrigin represents the originating information for a dataset
type Filter ¶
type Filter struct { Key string `json:"key"` Type string `json:"type"` NestedType string `json:"nestedType"` Mode string `json:"mode"` Min *float64 `json:"min"` Max *float64 `json:"max"` Bounds *Bounds `json:"bounds"` Categories []string `json:"categories"` D3mIndices []string `json:"d3mIndices"` IsBaselineFilter bool `json:"isBaselineFilter"` }
Filter defines a variable filter.
func NewBivariateFilter ¶
func NewBivariateFilter(key string, mode string, minX float64, maxX float64, minY float64, maxY float64) *Filter
NewBivariateFilter instantiates a numerical filter.
func NewCategoricalFilter ¶
NewCategoricalFilter instantiates a categorical filter.
func NewClusterFilter ¶
NewClusterFilter instantiates a cluster filter.
func NewDatetimeFilter ¶
NewDatetimeFilter instantiates a datetime filter.
func NewGeoBoundsFilter ¶
func NewGeoBoundsFilter(key string, mode string, minX float64, maxX float64, minY float64, maxY float64) *Filter
NewGeoBoundsFilter instantiates a geobounds filter.
func NewNumericalFilter ¶
NewNumericalFilter instantiates a numerical filter.
func NewRowFilter ¶
NewRowFilter instantiates a row filter.
func NewTextFilter ¶
NewTextFilter instantiates a text filter.
type FilterObject ¶
FilterObject captures a collection of invertable filters.
func (FilterObject) GetBaselineFilter ¶
func (fo FilterObject) GetBaselineFilter() []*Filter
GetBaselineFilter returns only filters that form the baseline.
func (FilterObject) IsValid ¶
func (fo FilterObject) IsValid() bool
IsValid verifies that a filter object is valid.
type FilterSet ¶
type FilterSet struct { FeatureFilters []FilterObject `json:"featureFilters"` Mode string `json:"mode"` }
FilterSet captures a set of filters representing one subset of data.
type GeoBoundsGrouping ¶
type GeoBoundsGrouping struct { Grouping CoordinatesCol string `json:"coordinatesCol"` PolygonCol string `json:"polygonCol"` }
GeoBoundsGrouping is used for geo bounds groups.
func (*GeoBoundsGrouping) GetPolygonCol ¶
func (t *GeoBoundsGrouping) GetPolygonCol() string
GetPolygonCol returns the polygon representation of the geo bounds group.
type GeoCoordinateGrouping ¶
GeoCoordinateGrouping is used for geocoordinate grouping information.
type Grouping ¶
type Grouping struct { Dataset string `json:"dataset"` Type string `json:"type"` IDCol string `json:"idCol"` SubIDs []string `json:"subIds"` Hidden []string `json:"hidden"` }
Grouping represents a variable grouping.
func (*Grouping) GetDataset ¶
GetDataset returns the grouping dataset.
type Metadata ¶
type Metadata struct { ID string ParentDatasetIDs []string Name string StorageName string Description string Summary string SummaryMachine string Raw bool DataResources []*DataResource Schema *gabs.Container Classification *ClassificationData NumRows int64 NumBytes int64 SchemaSource string Redacted bool DatasetFolder string DatasetOrigins []*DatasetOrigin SearchResult string SearchProvenance string SourceDataset string LearningDataset string Type string Digest string Immutable bool Clone bool }
Metadata represents a collection of dataset descriptions.
func NewMetadata ¶
NewMetadata creates a new metadata instance.
func (*Metadata) GenerateHeaders ¶
GenerateHeaders generates csv headers for the data resources.
func (*Metadata) GetMainDataResource ¶
func (m *Metadata) GetMainDataResource() *DataResource
GetMainDataResource returns the data resource that contains the D3M index.
type MultiBandImageGrouping ¶
type MultiBandImageGrouping struct { Grouping BandCol string `json:"bandCol"` ImageCol string `json:"imageCol"` ClusterCol string `json:"clusterCol"` }
MultiBandImageGrouping is used for remote sensing grouping information.
func (*MultiBandImageGrouping) GetClusterCol ¶
func (t *MultiBandImageGrouping) GetClusterCol() string
GetClusterCol returns the cluster column name for a remote sensing group.
type SuggestedType ¶
type SuggestedType struct { Type string `json:"type"` Probability float64 `json:"probability"` Provenance string `json:"provenance"` }
SuggestedType represents a classified variable type.
type TimeseriesGrouping ¶
type TimeseriesGrouping struct { Grouping ClusterCol string `json:"clusterCol"` XCol string `json:"xCol"` YCol string `json:"yCol"` }
TimeseriesGrouping is used for timeseries grouping information.
func (*TimeseriesGrouping) GetClusterCol ¶
func (t *TimeseriesGrouping) GetClusterCol() string
GetClusterCol returns the cluster column name for a remote sensing group.
type Variable ¶
type Variable struct { Key string `json:"key"` HeaderName string `json:"colName"` Type string `json:"colType,omitempty"` Description string `json:"colDescription,omitempty"` OriginalType string `json:"colOriginalType,omitempty"` SelectedRole string `json:"selectedRole,omitempty"` Role []string `json:"role,omitempty"` DistilRole []string `json:"distilRole,omitempty"` OriginalVariable string `json:"colOriginalName"` DisplayName string `json:"colDisplayName,omitempty"` Importance float64 `json:"importance"` Index int `json:"colIndex"` SuggestedTypes []*SuggestedType `json:"suggestedTypes,omitempty"` RefersTo map[string]interface{} `json:"refersTo,omitempty"` Deleted bool `json:"deleted"` Immutable bool `json:"immutable"` Grouping BaseGrouping `json:"grouping"` Min float64 `json:"min"` Max float64 `json:"max"` Values []string `json:"values"` }
Variable represents a single variable description.
func NewVariable ¶
func NewVariable(index int, key, displayName, headerName, originalName, typ, originalType, description string, role []string, distilRole []string, refersTo map[string]interface{}, existingVariables []*Variable, normalizeName bool) *Variable
NewVariable creates a new variable.
func (*Variable) HasAllRole ¶
HasAllRole checks that all supplied roles exist within the variable's DistilRole property equivalent to AND operation
func (*Variable) HasAnyRole ¶
HasAnyRole checks that at least 1 of the supplied roles exist within the variable's DistilRole property equivalent to OR operation
func (*Variable) HasRole ¶
HasRole checks to see if the supplied role exists within the variable's DistilRole property
func (*Variable) IsGrouping ¶
IsGrouping returns true if the variable is a grouping.
func (*Variable) IsMediaReference ¶
IsMediaReference returns true if a variable is a reference to a media resource.
func (*Variable) IsTA2Field ¶
IsTA2Field indicates whether or not a particular variable is recognized by a TA2.