popro package

Submodules

popro.cli

Console script for popro.

popro.cli [OPTIONS]

Options

-i, --input <path_file>

Path to a input file.

-y, --year <year>

Year of projection.

-p, --place <place>

Projection place.

-a, --age <age>

Projection age.

-o, --output <output_path>

CSV file path of the projection report to be generated.

-oe, --outerr <output_error>

CSV file path from the error report to be generated.Displays which combinations of the year and locality it was not possible to project and the reason.

-v, --verbose <verbose>

Show the algebraic expression of the calculus

popro.popro module

Popro - Population Projection

class popro.popro.Popro(dict_input: dict, engine: ~popro.engine_template.Engine = <class 'popro.engines.tceduca.Tceduca'>)[source]

Bases: object

Popro, a population projection engine. Args:

dict_input (dict): Dictionary with the names and path of the input files required by Engine. engine (Engine) Default=engines.Tceduca: Engine object.

project(year, place, age, verbose=False)[source]

Projects a single combination of place and age.

Args:

year (int): Year of projection. place (str): Projection place. age (int): Projection age. verbose (bool, optional): Show the algebraic expression of the calculus. Defaults to False.

Returns:

int: Projected population.

project_all(output_report_projection_path='', output_report_error_path='')[source]

Projects all possible combinations of place and age.

Args:
output_report_projection_path (str, optional): Defaults to “”.

CSV file path of the projection report to be generated.

output_report_error_path (str, optional): Defaults to “”.

CSV file path from the error report to be generated. Displays which combinations of the year and locality it was not possible to project and the reason.

Returns:
list: The projection report in list of dict.

Ready to be used as input in a pandas dataframe object.

popro.popro.save_report(list_dict, path_report)[source]

Module contents

Top-level package for popro.