ia.Geography Class
Contains information about a geography.
Constructor
ia.Geography
-
report
-
data
Parameters:
-
report
ia.ReportDataThe report data the the geography belongs to.
-
data
JSONThe json data describing the object.
Item Index
Methods
- getChildren
- getComparisonFeature
- getComparisonFeatures
- getDataTree
- getFeature
- getFeatureData
- getFeatures
- getFilter
- getFilteredFeatures
- getFilters
- getFilterTree
- getFirstIndicator
- getIndicator
- getIndicatorData
- getProfileData
- getProperties
- getProperty
- getTheme
- getThemes
- loadData
- loadIndicator
- parseData
Methods
getChildren
()
Object
Returns an array of data objects that are children of this object.
Returns:
getComparisonFeature
-
id
Returns the comparison feature that corresponds to the id provided.
Parameters:
-
id
StringThe id.
Returns:
getComparisonFeatures
()
ia.Feature[]
Returns the comparison features contained in the geography.
Returns:
getDataTree
-
showDates
-
reverseDates
-
dataHash
-
parentId
Returns an associative array of the form:
["i1"]{id:"i1"; label:"Home"; type:"branch"; children:["i2"; "i3"; "i4"]}
["i2"]{id:"i2"; label:"ia.Indicator 1"; type:"branch"; parent:"i1"; children:["i5"; "i6"; "i7"]}
["i5"]{id:"i5~2004"; label:"2004"; type:"leaf"; parent:"i2"}
Used by data explorers. Dates are returned as part of the tree.
Parameters:
-
showDates
BooleanShould the dates be displayed.
-
reverseDates
BooleanShould the dates be reversed.
-
dataHash
Associative ArrayAn associative array as described.
-
parentId
StringThe parent id.
getFeature
-
id
Returns the feature that corresponds to the id provided. Will also return a comparison feature.
Parameters:
-
id
StringThe id.
Returns:
getFeatureData
-
featureIds
-
date
Returns the data for a list of feature ids - listed by feature.
Parameters:
-
featureIds
StringA list of feature ids to get data for.
-
date
StringAn optional date.
Returns:
getFeatures
()
ia.Feature[]
Returns the features contained in the geography.
Returns:
getFilter
-
id
Returns the filter that corresponds to the id provided.
Parameters:
-
id
StringThe id.
Returns:
getFilteredFeatures
-
filterId
-
filterValue
Returns the features ids that are contained in the given filter.
Parameters:
-
filterId
StringThe filter id.
-
filterValue
StringThe filter value.
Returns:
getFilters
()
ia.Filter[]
Returns the filters contained in the geography.
Returns:
getFilterTree
()
Object
Returns a hashtable of the form:
["i1"]{id:"i1"; label:"Home"; type:"branch"; children:["i2"; "i3"; "i4"]}
["i2"]{id:"i2"; label:"ia.Indicator 1"; type:"branch"; parent:"i1"; children:["i5"; "i6"; "i7"]}
["i5"]{id:"i5~2004"; label:"2004"; type:"leaf"; parent:"i2"}
Used by filter explorers.
Returns:
getFirstIndicator
-
reverseDates
Returns the first indicator - this can be within a nested theme. Where dates are used the first indicator is the one with the most recent date
Parameters:
-
reverseDates
BooleanShould the dates be reversed.
Returns:
getIndicator
-
id
-
date
-
reverseDates
Returns the indicator that corresponds to the id and date provided.
Parameters:
-
id
StringThe indicator id.
-
date
StringAn optional date.
-
reverseDates
BooleanShould the dates be reversed.
Returns:
getIndicatorData
-
featureIds
-
date
Returns the data for a list of feature ids - listed by indicator.
Parameters:
-
featureIds
StringA list of feature ids to get data for.
-
date
StringAn optional date.
Returns:
getProfileData
-
featureIds
-
date
-
useLatestDate
Returns a hashtable of the indicators/associates for a feature - used for profiles.
The returned data has the following structure:
["t0"]{id:"t0", name:"theme0", type:"parent"}
["i0"]{id:"i0", name:"indicator0", value:2345, value_formatted:2345, associate1:25, associate1_formatted:25, type:"leaf"}
["i1"]{id:"i1", name:"indicator1", value:4347, value_formatted:4347, associate1:45, associate1_formatted:45, type:"leaf"}
["i2"]{id:"i2", name:"indicator1", value:2496, value_formatted:2496, associate1:25, associate1_formatted:25, type:"leaf"}
Parameters:
-
featureIds
StringA list of feature ids to get data for.
-
date
StringAn optional date.
-
useLatestDate
BooleanUse the latest date if the specified date is unavailable?
Returns:
getProperties
()
Associative Array
Returns the custom properties. An associative array of the form: [propName] = propValue.
Returns:
getProperty
-
propName
Returns a value for a custom property.
Parameters:
-
propName
StringThe name of the property.
Returns:
getTheme
-
id
Returns the theme that corresponds to the id provided.
Parameters:
-
id
StringThe id.
Returns:
getThemes
()
ia.Theme[]
Returns the themes contained in the geography.
Returns:
loadData
-
callbackFnc
Loads all data in the geography.
Parameters:
-
callbackFnc
FunctionThe callbackFnc gets called with the loaded object as the parameter.
loadIndicator
-
id
-
date
-
callbackFnc
Loads the indicator that corresponds to the id and date provided. Returns the indicator via the supplied callback function.
Parameters:
-
id
StringThe indicator id.
-
date
StringAn optional date.
-
callbackFnc
FunctionThe callbackFnc gets called with the loaded object as the parameter.
Returns:
parseData
-
data
Parses the geography data.
Parameters:
-
data
JSONThe json data describing the object.
Properties
customColumns
Object} Array of columns.
The custom columns that can be used in the data table.
data
JSON
The raw json data describing the object.
fileName
String
The file name.
hasData
Boolean
Indicates if this object contains data.
Default: true
href
String
The href.
id
String
The id.
index
Number
The geography index - this is the order the geography appears in the data.js. It is used to find a matching base layer which appears in the same position in map.js.
name
String
The name.
parent
Object
The parent object.
precision
Number
The precision. Inherited from parent if undefined.
type
Number
The data type. Inherited from parent if undefined.
Default: "categoric"