<commit_before>module Atlas
  class Dataset
    include ActiveDocument

    DIRECTORY = 'datasets'

    # General Attributes
    attribute :area,      String
    attribute :id,        Integer
    attribute :parent_id, Integer

    # Set to false in the document to disable the region in ETModel.
    attribute :enabled,   Hash[Symbol => Boolean],
                          default: { etengine: true, etmodel: true }

    attribute :analysis_year, Integer, default: 2011

    # Flags
    attribute :has_agriculture,          Boolean, default: true
    attribute :has_buildings,            Boolean, default: true
    attribute :has_climate,              Boolean, default: false
    attribute :has_coastline,            Boolean, default: true
    attribute :has_cold_network,         Boolean, default: false
    attribute :has_electricity_storage,  Boolean, default: true
    attribute :has_employment,           Boolean, default: true
    attribute :has_fce,                  Boolean, default: true
    attribute :has_industry,             Boolean, default: true
    attribute :has_lignite,              Boolean, default: false
    attribute :has_merit_order,          Boolean, default: false
    attribute :has_metal,                Boolean, default: true
    attribute :has_mountains,            Boolean, default: true
    attribute :has_old_technologies,     Boolean, default: false
    attribute :has_other,                Boolean, default: true
    attribute :has_solar_csp,            Boolean, default: false
    attribute :has_import_export,        Boolean, default: true
    attribute :use_network_calculations, Boolean, default: true

    # Numeric Data
    [ :annual_infrastructure_cost_electricity,
      :annual_infrastructure_cost_gas,
      :areable_land,
      :buildings_insulation_constant_1,
      :buildings_insulation_constant_2,
      :buildings_insulation_cost_constant,
      :buildings_insulation_employment_constant,
      :capacity_buffer_decentral_in_mj_s,
      :capacity_buffer_in_mj_s,
      :co2_emission_1990,
      :co2_emission_2009,
      :co2_percentage_free,
      :co2_price,
      :coast_line,
      :economic_multiplier,
      :employment_fraction_production,
      :employment_local_fraction,
      :export_electricity_primary_demand_factor,
      :import_electricity_primary_demand_factor,
      :insulation_level_buildings_max,
      :insulation_level_buildings_min,
      :insulation_level_new_houses_max,
      :insulation_level_new_houses_min,
      :insulation_level_old_houses_max,
      :insulation_level_old_houses_min,
      :land_available_for_solar,
      :man_hours_per_man_year,
      :new_houses_insulation_constant_1,
      :new_houses_insulation_constant_2,
      :new_houses_insulation_cost_constant,
      :new_houses_insulation_employment_constant,
      :number_of_buildings,
      :number_of_residences,
      :number_of_inhabitants,
      :number_of_existing_households,
      :number_of_new_residences,
      :number_of_old_residences,
      :offshore_suitable_for_wind,
      :old_houses_insulation_constant_1,
      :old_houses_insulation_constant_2,
      :old_houses_insulation_cost_constant,
      :old_houses_insulation_employment_constant,
      :onshore_suitable_for_wind,
      :residences_roof_surface_available_for_pv,
      :buildings_roof_surface_available_for_pv,
      :technical_lifetime_insulation,
      :capacity_credit_wind_constant_p1,
      :capacity_credit_wind_constant_p2,
      :capacity_credit_wind_constant_q1
    ].each do |name|
      attribute name, Float
    end
<commit_msg>Adding new AREA variables to Atlas. Closes https://github.com/quintel/etsource/issues/781<commit_after>module Atlas
  class Dataset
    include ActiveDocument

    DIRECTORY = 'datasets'

    # General Attributes
    attribute :area,      String
    attribute :id,        Integer
    attribute :parent_id, Integer

    # Set to false in the document to disable the region in ETModel.
    attribute :enabled,   Hash[Symbol => Boolean],
                          default: { etengine: true, etmodel: true }

    attribute :analysis_year, Integer, default: 2011

    # Flags
    attribute :has_agriculture,          Boolean, default: true
    attribute :has_buildings,            Boolean, default: true
    attribute :has_climate,              Boolean, default: false
    attribute :has_coastline,            Boolean, default: true
    attribute :has_cold_network,         Boolean, default: false
    attribute :has_electricity_storage,  Boolean, default: true
    attribute :has_employment,           Boolean, default: true
    attribute :has_fce,                  Boolean, default: true
    attribute :has_industry,             Boolean, default: true
    attribute :has_lignite,              Boolean, default: false
    attribute :has_merit_order,          Boolean, default: false
    attribute :has_metal,                Boolean, default: true
    attribute :has_mountains,            Boolean, default: true
    attribute :has_old_technologies,     Boolean, default: false
    attribute :has_other,                Boolean, default: true
    attribute :has_solar_csp,            Boolean, default: false
    attribute :has_import_export,        Boolean, default: true
    attribute :use_network_calculations, Boolean, default: true

    # Numeric Data
    [ :annual_infrastructure_cost_electricity,
      :annual_infrastructure_cost_gas,
      :areable_land,
      :buildings_insulation_constant_1,
      :buildings_insulation_constant_2,
      :buildings_insulation_cost_constant,
      :buildings_insulation_employment_constant,
      :capacity_buffer_decentral_in_mj_s,
      :capacity_buffer_in_mj_s,
      :co2_emission_1990,
      :co2_emission_2009,
      :co2_percentage_free,
      :co2_price,
      :coast_line,
      :economic_multiplier,
      :employment_fraction_production,
      :employment_local_fraction,
      :export_electricity_primary_demand_factor,
      :import_electricity_primary_demand_factor,
      :insulation_level_buildings_max,
      :insulation_level_buildings_min,
      :insulation_level_new_houses_max,
      :insulation_level_new_houses_min,
      :insulation_level_old_houses_max,
      :insulation_level_old_houses_min,
      :land_available_for_solar,
      :man_hours_per_man_year,
      :new_houses_insulation_constant_1,
      :new_houses_insulation_constant_2,
      :new_houses_insulation_cost_constant,
      :new_houses_insulation_employment_constant,
      :number_of_buildings,
      :number_of_residences,
      :number_of_inhabitants,
      :number_of_existing_households,
      :number_of_new_residences,
      :number_of_old_residences,
      :offshore_suitable_for_wind,
      :old_houses_insulation_constant_1,
      :old_houses_insulation_constant_2,
      :old_houses_insulation_cost_constant,
      :old_houses_insulation_employment_constant,
      :onshore_suitable_for_wind,
      :residences_roof_surface_available_for_pv,
      :buildings_roof_surface_available_for_pv,
      :technical_lifetime_insulation,
      :capacity_credit_wind_constant_p1,
      :capacity_credit_wind_constant_p2,
      :capacity_credit_wind_constant_q1,
      :investment_hv_net_low,
      :investment_hv_net_high,
      :investment_hv_net_per_turbine
    ].each do |name|
      attribute name, Float
    end

{'fraction_non_alphanumeric': 0.05919343814080656, 'fraction_numerical': 0.007245386192754614, 'mean_word_length': 3.2021826536473292, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '768697', 'n_tokens_mistral': 2299, 'n_tokens_neox': 2167, 'n_words': 398}