IncidentDataFrameGenerator — EuRepoC 0.1.2 documentation

# IncidentDataFrameGenerator

See EuRepoC code for further details on the substantive meaning of each variable: https://eurepoc.eu/wp-content/uploads/2023/07/EuRepoC_Codebook_1_2.pdf

class eurepoc.incident_dataframes.IncidentDataFrameGenerator(incident_data=None)

  Bases: `object`

  A class used for returning pandas DataFrames for specific variables/aspects of the incident to enable analysis. The different dfs can subsequently be joined through the incident_id column. Refer to the EuRepoC Codebook for more information about the substantive meaning of each variable (i.e. df column).

  Parameters:

    - incident_data (list) – List of incident data dictionaries, retrieved by using the execute_query() method of the

    - class. (DatabaseQuery)

  Note

  The data within the returned dfs are “exploded” over multiple rows for variables that contain multiple possible values. When performing analyses with pandas counting numbers of incidents, remember to use the nunique() method instead of the count() method.

  get_attribution_sources()

    Columns: incident_id, attribution_source_url

  get_attributions()

    Columns: attribution_id, incident_id, settled_attribution, attribution_date, attribution_updated_at, attribution_created_at, attribution_basis, attribution_type, attribution_subtype, attributing_country, attributing_actor, attributing_company, attribution_legal_reference, attribution_legal_reference_subcode, initiator_id, initiator_name, initiator_country, initiator_category, initiator_subcategory

  get_cyber_conflict_issues()

    Columns: incident_id, cyber_conflict_issue

  get_cyber_intensity_variables()

    Columns: incident_id, disruption, hijacking, data_theft, physical_effects_spatial, physical_effects_temporal, target_multiplier, unweighted_intensity, weighted_intensity

  get_il_breach_indicator()

    Columns: incident_id, il_breach_indicator, il_breach_indicator_subcode

  get_impact_indicator_variables()

    Columns: incident_id, impact_indicator_score, impact_indicator_label, functional_impact, intelligence_impact, economic_impact, economic_impact_value, economic_impact_currency, affected_entities, affected_entities_value, affected_eu_countries, affected_eu_countries_value, affected_third_countries, affected_third_countries_value

  get_incident_types()

    Columns: incident_id, incident_type

  get_inclusion_criteria()

    Columns: incident_id, inclusion_criterion, inclusion_criterion_subcode

  get_initiators(settled=True)

    Columns: initiator_id, incident_id, attribution_id, settled_initiator, initiator_name, initiator_country, initiator_category, initiator_subcategory

  get_legal_responses()

    Columns: legal_response_id, incident_id, legal_response_date, legal_response_responding_country, legal_response_responding_actor, legal_response_type, legal_response_subtype

  get_legal_variables()

    Columns: incident_id, state_responsibility_actor, evidence_for_sanctions_indicator, response_indicator

  get_main_data()

    Columns: incident_id, name, description, added_to_db, start_date, end_date, operation_type, status, updated_at, number_attributions, number_political_responses, number_legal_responses, casualties

  get_mitre_impact()

    Columns: incident_id, mitre_impact

  get_mitre_initial_access()

    Columns: incident_id, mitre_initial_access

  get_offline_conflicts()

    Columns: incident_id, offline_conflict_issue, offline_conflict_name, offline_conflict_intensity, offline_conflict_intensity_subcode

  get_operation_types()

    Columns: incident_id, operation_type

  get_political_responses()

    Columns: political_response_id, incident_id, political_response_date, political_response_responding_country, political_response_responding_actor, political_response_type, political_response_subtype

  get_receivers()

    Columns: receiver_id, incident_id, receiver_name, receiver_country, receiver_country_alpha_2_code, receiver_country_alpha_3_code, receiver_category, receiver_subcategory, receiver_regions (this is a list)

  get_source_names()

    Columns: source_url_id, incident_id, source_name

  get_sources_of_disclosure()

    Columns: incident_id, source_disclosure

  get_sources_urls()

    Columns: source_urls_id, incident_id, source_url

  get_technical_variables()

    Columns: incident_id, zero_days, zero_days_subcode, has_disruption, user_interaction