epymorph.adrio.us_tiger
ADRIOs that access the US Census TIGER geography files.
GeometricCentroid
Bases: _USTIGERMixin
, ADRIO[StructDType, float64]
The centroid of the geographic polygons.
result_format
property
result_format: ResultFormat
Information about the expected format of the ADRIO's resulting data.
validate_result
Validates that the result of evaluating the ADRIO adheres to the expected result format.
Parameters:
-
context
(Context
) –The context in which the result has been evaluated.
-
result
(NDArray[ResultT]
) –The result produced by the ADRIO.
Raises:
-
ADRIOProcessingError
–If the result is invalid, indicating the processing logic has a bug.
inspect
inspect() -> InspectResult[StructDType, float64]
Produce an inspection of the ADRIO's data for the current context.
When implementing an ADRIO, override this method to provide data fetching and processing logic. Use self methods and properties to access the simulation context or defer processing to another function.
NOTE: if you are implementing this method, make sure to call validate_context
first and _validate_result
last.
Returns:
-
InspectResult[ResultT, ValueT]
–The data inspection results for the ADRIO's current context.
InternalPoint
Bases: _USTIGERMixin
, ADRIO[StructDType, float64]
The internal point provided by TIGER data. These points are selected by Census workers so as to be guaranteed to be within the geographic polygons, while geometric centroids have no such guarantee.
result_format
property
result_format: ResultFormat
Information about the expected format of the ADRIO's resulting data.
validate_result
Validates that the result of evaluating the ADRIO adheres to the expected result format.
Parameters:
-
context
(Context
) –The context in which the result has been evaluated.
-
result
(NDArray[ResultT]
) –The result produced by the ADRIO.
Raises:
-
ADRIOProcessingError
–If the result is invalid, indicating the processing logic has a bug.
inspect
inspect() -> InspectResult[StructDType, float64]
Produce an inspection of the ADRIO's data for the current context.
When implementing an ADRIO, override this method to provide data fetching and processing logic. Use self methods and properties to access the simulation context or defer processing to another function.
NOTE: if you are implementing this method, make sure to call validate_context
first and _validate_result
last.
Returns:
-
InspectResult[ResultT, ValueT]
–The data inspection results for the ADRIO's current context.
Name
Bases: _USTIGERMixin
, ADRIO[str_, str_]
For states and counties, the proper name of the location; otherwise its GEOID.
result_format
property
result_format: ResultFormat
Information about the expected format of the ADRIO's resulting data.
inspect
inspect() -> InspectResult[str_, str_]
Produce an inspection of the ADRIO's data for the current context.
When implementing an ADRIO, override this method to provide data fetching and processing logic. Use self methods and properties to access the simulation context or defer processing to another function.
NOTE: if you are implementing this method, make sure to call validate_context
first and _validate_result
last.
Returns:
-
InspectResult[ResultT, ValueT]
–The data inspection results for the ADRIO's current context.
PostalCode
Bases: _USTIGERMixin
, ADRIO[str_, str_]
For states only, the postal code abbreviation for the state ("AZ" for Arizona, and so on).
result_format
property
result_format: ResultFormat
Information about the expected format of the ADRIO's resulting data.
validate_context
validate_context(context: Context) -> None
Validates the context before ADRIO evaluation.
Parameters:
-
context
(Context
) –The context to validate.
Raises:
-
ADRIOContextError
–If this ADRIO cannot be evaluated in the given context.
inspect
inspect() -> InspectResult[str_, str_]
Produce an inspection of the ADRIO's data for the current context.
When implementing an ADRIO, override this method to provide data fetching and processing logic. Use self methods and properties to access the simulation context or defer processing to another function.
NOTE: if you are implementing this method, make sure to call validate_context
first and _validate_result
last.
Returns:
-
InspectResult[ResultT, ValueT]
–The data inspection results for the ADRIO's current context.
LandAreaM2
Bases: _USTIGERMixin
, ADRIO[float64, float64]
The land area of the geo node in meters-squared. This is the 'ALAND' attribute from the TIGER data files.
result_format
property
result_format: ResultFormat
Information about the expected format of the ADRIO's resulting data.
inspect
inspect() -> InspectResult[float64, float64]
Produce an inspection of the ADRIO's data for the current context.
When implementing an ADRIO, override this method to provide data fetching and processing logic. Use self methods and properties to access the simulation context or defer processing to another function.
NOTE: if you are implementing this method, make sure to call validate_context
first and _validate_result
last.
Returns:
-
InspectResult[ResultT, ValueT]
–The data inspection results for the ADRIO's current context.