full_mesh_validator
FullMeshValidator(mesh, source_data)
¶
A class that validates a constructed mesh against its actual sourced geo-spatial data. Validation takes place by comparing the aggregated data value of mesh's cellbox against the actual data contained within cellbox's bounds.
This object compares all source data contained within the mesh to the mesh data, where as the MeshValidator object only compares a sample of the source data to the mesh data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mesh
|
json file containing mesh data |
required | |
source_data
|
DataFrame containing source data. Must contain columns 'lat' and 'long' |
required |
slice_data(bounds)
¶
return a slice of the source data within the bounds Args: bounds: Bounds object containing bounds to slice data with
Returns: raw_slice: DataFrame containing slice of data
validate_scalar(sd_name, md_name)
¶
Validate the mesh by comparing the scalar field in the mesh to the source data Args: sd_name: name of source data scalar field md_name: name of mesh scalar field
Returns:
| Name | Type | Description |
|---|---|---|
validation_results |
dictionary containing validation results |
validate_vector(sd_name, md_name)
¶
Validate the mesh by comparing the vector field in the mesh to the source data Args: sd_name: name of source data vector field md_name: name of mesh vector field
Returns:
| Name | Type | Description |
|---|---|---|
validation_results |
dictionary containing validation results |