data#
Classes
Class for the json object for the location containing data about the population to generate representative contact networks. |
|
Class for population age distribution with a specified number of bins. |
|
Class for the school size distribution by school type. |
|
Class for the school type by age range. |
Functions
Checks a number of constraints that need to be satisfied for the schema. |
|
Run checks that a field representing probabilty distributions has all non negative values. |
|
Checks that each probability distribution available to a location has a sum close to 1. |
|
Check that each array in an array of arrays has the expected length. |
|
Check that the employment rates by age is an array of arrays, where each sub array has length 2. |
|
Check that the enrollment rates by age is an array of arrays, where each sub array has length 2. |
|
Check that the household head age brackets is an array of arrays, where each sub array has length 2. |
|
Check that the conditional household head age distribution by household size is an array with length equal to the number of household head age brackets. |
|
Check that the household size distribution is an array of arrays, where each sub array has length 2. |
|
Checks a number of constraints that need to be satisfied for the schema. |
|
Check the location json data object has a string. |
|
Check that the long term care facility resident size distribution is an array of arrays, where each sub array has length 3. |
|
Check that the long term care facility staff size distribution is an array of arrays, where each sub array has length 3. |
|
Check that the long term care facility resident to staff ratio distribution is an array of arrays, where each sub array has length 3. |
|
Check that the population age distributions are self-consistent in the number of brackets, and each sub array has length 3. |
|
Check that fields representing probability distributions have all non negative values. |
|
|
Check that each population age distribution has all non negative values. |
Check that fields representing probability distributions have sums equal to 1 within some tolerance. |
|
Check that each population age distribution has a sum equal to 1 within some tolerance. |
|
Check that the school size distribution brackets is an array of arrays, where each sub array has length 2. |
|
Check that the school size distribution by school type is an array of arrays, where each sub array has length 3. |
|
Check that the school types by age range is an array of arrays, where each sub array has length 2. |
|
Check that the property_name is a valid probability distribution. |
|
Check that the workplace size count is an array of arrays, where each sub array has length 3. |
|
Convert desired data from a pandas dataframe into a json array. |
|
Get the attribute from the json object containing location data given the associated property name. |
|
Get the relative path for the data folder. |
|
Loads location data object from provided relative filepath where the file path is relative to defaults.settings.datadir. |
|
Load location data from json object with some checks made. |
|
Load location data from json str with some checks made. |
|
Populate location json object with fields from the parent location if available. |
|
Loading a location json object with necessary data fields filled from the parent location using the parent location file path. |
|
Loading a location json object with necessary data fields filled from the parent location json. |
|
Saves json object with location data to provided absolute filepath. |