ILLSpatial
Defines the public contract for the LLSpatial class, exposing methods for checking spatial variable existence, updating spatial analysis tables from filtered linelist data, sorting tables by formula or attack rate, and retrieving ranked geographic or health facility values for use in analyses and graphs.
Properties
Exists #
Whether a variable has spatial tables
Signature:
Public Property Get Exists(ByVal varName As String) As Boolean: End Property
Searches the "listofgeovars" ListObject on the spatial sheet for a partial match of the supplied variable name. Returns True when the variable appears in the spatial variables list, indicating that spatial analysis tables exist for it.
Parameters:
varName: String. Variable name or partial name to look up.
Returns: Boolean. True when the variable exists in the spatial variables list.
Update
Update #
Update all spatial tables from filtered linelist data
Signature:
Public Sub Update(): End Sub
Iterates all HList worksheets, locates their filtered companion sheet, finds columns controlled by geo1 and hf, extracts unique values from the filtered data, and populates the corresponding spatial ListObjects. After updating all tables, recalculates the spatial sheet so formula columns reflect the new data.
Ranking
TopGeoValue #
Ranked value from a sorted spatial geo table
Signature:
Public Property Get TopGeoValue(ByVal adminName As String, _
ByVal orderValue As Long, _
ByVal varName As String, _
Optional ByVal tabId As String = vbNullString, _
Optional ByVal concatValue As Byte = 1) As String
Returns the value at the requested rank position from a sorted spatial admin table. The concatValue parameter selects between the name column (1) and the concatenated column (other values). Returns an empty string when the rank exceeds the available rows or the table does not exist.
Parameters:
adminName: String. Admin level name ("adm1", "adm2", "adm3", or "adm4").orderValue: Long. Rank position in the sorted table (1-based).varName: String. Base variable name without admin prefix.tabId: Optional String. Table identifier suffix. Defaults to vbNullString.concatValue: Optional Byte. 1 for the name column, other values for the concat column. Defaults to 1.
Returns: String. The value at the requested rank, or empty string if not found.
TopHFValue #
Ranked value from a sorted spatial HF table
Signature:
Public Property Get TopHFValue(ByVal orderValue As Long, _
ByVal inputVarName As String, _
Optional ByVal tabId As String = vbNullString) As String
Returns the value at the requested rank position from a sorted spatial health facility table. Returns an empty string when the rank exceeds the available rows or the table does not exist.
Parameters:
orderValue: Long. Rank position in the sorted table (1-based).inputVarName: String. Base variable name.tabId: Optional String. Table identifier suffix. Defaults to vbNullString.
Returns: String. The value at the requested rank, or empty string if not found.
Sort
Sort #
Sort spatial tables by formula value or attack rate
Signature:
Public Sub Sort(ByVal tabId As String, Optional ByVal onAR As Boolean = False): End Sub
Locates the spatial variable matching tabId in the "listofgeovars" list, then sorts the corresponding admin1 through admin4 ListObjects by either the formula column or the attack_rate column in descending order. Skips tables that do not exist or have no data.
Parameters:
tabId: String. Table identifier used to locate the variable name.onAR: Optional Boolean. True to sort by attack_rate column, False for formula column. Defaults to False.