af.model.reports package¶
Subpackages¶
Submodules¶
af.model.reports.TransformationMetrics module¶
-
class
af.model.reports.TransformationMetrics.TransformationMetrics(data_config)[source]¶ Bases:
objectClass that queries an anonymized table and can generate some metrics based on the data
-
get_additional_information()[source]¶ Returns the additional information the anonymization algorithm left behind
Return type: Dictionary containing additional information to be displayed
-
number_of_qi_eq_classes_generated()[source]¶ Returns the amount of equivalence classes created for each quasi-identifier attribute during the anonymization process
Return type: List of frequencies
-
qi_eq_classes_differences()[source]¶ Returns the differences between the amount of equivalence classes existent before and after the anonymization process for each quasi-identifier attribute.
Return type: Dictionary that stores the equivalence classes values
-
Module contents¶
-
af.model.reports.convert_report_to_pdf(html_string, report_name)[source]¶ Given a html output, and a report name, convert it to a pdf
Parameters: - html_string (string) – An HTML output
- report_name (string) – Name of the final report
-
af.model.reports.create_basic_report(transformation_metrics, template_name='my_report.html', report_location_path=None, convert_to_format='html')[source]¶ Create a basic report
Parameters: - transformation_metrics – Instance of the TransformationMetrics class
- template_name (string) – Template to use
- report_location_path (string) – Custom location where we want to export the report
- convert_to_format (string) – Indicates to which format the report should be exported. (HTML by default)
Return type: String location of the created report
-
af.model.reports.get_anonymized_sample(data_config)[source]¶ Return a sample of the anonymization data
Parameters: data_config – Instance of class DataConfig Return type: List sample of anonymized data
-
af.model.reports.get_list_of_deletable_attributes_for_pdf()[source]¶ When exporting to PDF, some things should be deleted, like things that have a certain behaviour based on jquery
Return type: Tuple containing all the strings to look and remove from the html output