<commit_before>= form_tag data_redirect_path, :method => :get, :id => 'api_scenario_selector', :style => 'width: 280px; float: left' do
  = label_tag 'Session'
  - opts = [["Current - ##{Current.scenario.id}", 'latest'], *Scenario.recent.map{|as| [as.identifier, as.id]}]
  = select_tag :api_scenario_id, options_for_select(opts, params[:api_scenario_id])

= form_tag '#', :method => :get, :id => 'area_code_selector', :style => 'width: 200px; float: left' do
  = label_tag 'New:'
  - opts = Etsource::Dataset.region_codes
  = select_tag 'area_code', options_for_select(opts), :include_blank => true


  
- content_for :footer do
  :javascript
    $("#api_scenario_selector select").change(function(e){
      e.preventDefault();
      var url = location.pathname;
      var tokens = url.split('/');
      tokens[2] = $("#blueprint_id").val();
      
      var new_url = tokens.join('/');
      location.href = new_url;
    });

    $("#area_code_selector select").change(function(e){
      e.preventDefault();
      var url = "/api/v2/api_scenarios/new.json?settings[area_code]="+$("#area_code_selector select").val();
      
      $.getJSON(url, function(data) {
        location.href = "/data/"+data.api_scenario.id;
      });
    });<commit_msg>data: fixed scenario picker. closes #339<commit_after>= form_tag data_redirect_path, :method => :get, :id => 'api_scenario_selector', :style => 'width: 280px; float: left' do
  = label_tag 'Session'
  - opts = [["Current - ##{Current.scenario.id}", 'latest'], *Scenario.recent.map{|as| [as.identifier, as.id]}]
  = select_tag :api_scenario_id, options_for_select(opts, params[:api_scenario_id])

= form_tag '#', :method => :get, :id => 'area_code_selector', :style => 'width: 200px; float: left' do
  = label_tag 'New:'
  - opts = Etsource::Dataset.region_codes
  = select_tag 'area_code', options_for_select(opts), :include_blank => true

- content_for :footer do
  :javascript
    $("#api_scenario_selector select").change(function(e){
      e.preventDefault();
      var url = location.pathname;
      var tokens = url.split('/');
      tokens[2] = $("#api_scenario_id").val();

      var new_url = tokens.join('/');
      location.href = new_url;
    });

    $("#area_code_selector select").change(function(e){
      e.preventDefault();
      var url = "/api/v2/api_scenarios/new.json?settings[area_code]="+$("#area_code_selector select").val();

      $.getJSON(url, function(data) {
        location.href = "/data/"+data.api_scenario.id;
      });
    });
{'fraction_non_alphanumeric': 0.18207171314741036, 'fraction_numerical': 0.007569721115537849, 'mean_word_length': 3.9332023575638506, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, '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': '4319353', 'n_tokens_mistral': 860, 'n_tokens_neox': 846, 'n_words': 159}