tracts.driver_utils.check_population_labels#

check_population_labels(demographic_model, population, data)#

Validates that the population labels in the data correspond to the model population labels. Raises a ValueError if any label in the data is not found in the model or in the list of unknown labels to be smoothed over.

Parameters:
  • demographic_model (ParametrizedDemography | ParametrizedDemographySexBiased) – The demographic model for which to validate the population labels.

  • population (Population) – The population for which to validate the population labels.

  • data (dict[str, ndarray]) – A dictionary containing the data for which to validate the population labels. The keys of the dictionary are the population labels.