<commit_before><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>MinnPost</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>
<script type='text/javascript' src='//s7.addthis.com/js/250/addthis_widget.js#async=1'></script>
<link rel="shortcut icon" href="http://www.minnpost.com//sites/default/themes/siteskin/favicon.ico" type="image/x-icon" />
<meta name="keywords" content="<NAME>,Minnesota DFL,Minnesota GOP,Minnesota Legislature,Vikings Stadium,Voter ID Amendment" />
<meta name="description" content="  " />
<meta property="og:title" content="The 2012 Legislative session: What did they pass?"/>
<meta property="og:site_name" content="MinnPost"/>
<meta property="og:description" content="Explore bills by category, investigate which bills Gov. Dayton vetoed, and search by your legislators.
"/>
<meta property="og:image" content="http://www.minnpost.com/sites/default/files/images/thumbnails/fullpagearticles/BillExplorerGraphic3.png"/>
<link rel="apple-touch-icon" href="http://www.minnpost.com//sites/default/themes/siteskin/inc/images/apple-touch-icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1"></meta>

  <link type="text/css" rel="stylesheet" media="all" href="http://www.minnpost.com/sites/default/files/css/css_210e6cb2c47f49b64557aa760781ecee.css" />
<link type="text/css" rel="stylesheet" media="screen" href="http://www.minnpost.com/sites/default/files/css/css_af7ebe348633c5f1b2a0e6fb63d61db8.css" />
<link type="text/css" rel="stylesheet" media="print" href="http://www.minnpost.com/sites/default/files/css/css_661c24623d6669afd5ba1b24560bc9c1.css" />
  <!--[if IE]>
      <link rel="stylesheet" href="http://www.minnpost.com/sites/default/themes/derma/inc/css/ie.css?u" type="text/css">
  <![endif]-->
    <script type="text/javascript" src="http://www.minnpost.com/sites/default/files/js/js_ffc7ad656f7ff17fc35230e689eb85dd.js"></script>
<script type="text/javascript" src="http://www.minnpost.com/sites/all/libraries/tinymce/jscripts/tiny_mce/tiny_mce.js?u"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, {"basePath":"\/","combineBlocks":[["#block-views-most_viewed_by_taxonomy-block","#block-views-most_commented_articles-block_1"],["#block-views-most_viewed_by_node_type-block","#block-views-most_commented_blogs-block_1"],["#block-views-most_viewed_by_node_type-block","#block-views-most_commented_articles-block_1"]],"chartbeat":{"uid":27923,"domain":"min<EMAIL>"},"googleanalytics":{"trackOutgoing":1,"trackMailto":1,"trackDownload":1,"trackDownloadExtensions":"7z|aac|arc|arj|asf|asx|avi|bin|csv|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip"},"addthis":{"config_default":{"services_toolbox":"facebook_like_counter, tweet, print, email","services_compact":"","services_expanded":"","ui_cobrand":"","ui_header_color":"#000000","ui_header_background":"#FFFFFF","ui_click":true,"ui_delay":"","ui_use_addressbook":0,"pubid":"<KEY>","data_track_clickback":0,"data_ga_tracker":0,"ui_use_css":true,"data_use_cookies":true,"ui_language":"en","data_use_flash":true},"share_default":{"templates":{"twitter":""}}},"wysiwyg":{"configs":{"tinymce":{"global":{"editorBasePath":"\/sites\/all\/libraries\/tinymce\/jscripts\/tiny_mce","execMode":""},"format1":{"button_tile_map":true,"document_base_url":"\/","mode":"none","plugins":"paste,-spellchecker","theme":"advanced","width":"100%","strict_loading_mode":true,"convert_urls":false,"entities":"160,nbsp,173,shy,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm","apply_source_formatting":0,"convert_fonts_to_spans":1,"language":"en","paste_auto_cleanup_on_paste":0,"preformatted":0,"remove_linebreaks":0,"verify_html":false,"theme_advanced_styles":"Float Right=float-right;Float Left=float-left;Button=button;Caption=caption","content_css":"sites\/default\/themes\/siteskin\/inc\/css\/wysiwyg.css","extended_valid_elements":"font[face|size|color|style],span[class|align|style]","file_browser_callback":"imceImageBrowser","inline_styles":true,"theme_advanced_resize_horizontal":false,"theme_advanced_resizing_use_cookie":false,"theme_advanced_path_location":"bottom","theme_advanced_resizing":1,"theme_advanced_toolbar_location":"top","theme_advanced_toolbar_align":"left","theme_advanced_blockformats":"p,h3,h4,h5,h6","theme_advanced_buttons1":"bold,italic,undo,redo,link,unlink,removeformat,formatselect,pastetext,pasteword,spellchecker","theme_advanced_buttons2":"","theme_advanced_buttons3":""},"format2":{"button_tile_map":true,"document_base_url":"\/","mode":"none","plugins":"fullscreen,paste,table,-embedcode,-spellchecker","theme":"advanced","width":"100%","strict_loading_mode":true,"convert_urls":false,"entities":"160,nbsp,173,shy,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm","apply_source_formatting":0,"convert_fonts_to_spans":1,"language":"en","paste_auto_cleanup_on_paste":0,"preformatted":0,"remove_linebreaks":0,"verify_html":false,"theme_advanced_styles":"Float Right=float-right;Float Left=float-left;Caption=caption;Credit=credit;Button=button","content_css":"sites\/default\/themes\/siteskin\/inc\/css\/wysiwyg.css","extended_valid_elements":"font[face|size|color|style],span[class|align|style],img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed],object[align\u003cbottom?left?middle?right?top|archive|border|class|classid|codebase|codetype|data|declare|dir\u003cltr?rtl|height|hspace|id|lang|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|standby|style|tabindex|title|type|usemap|vspace|width],iframe[align\u003cbottom?left?middle?right?top|class|frameborder|height|id|longdesc|marginheight|marginwidth|name|scrolling\u003cauto?no?yes|src|style|title|width]","file_browser_callback":"imceImageBrowser","inline_styles":true,"theme_advanced_resize_horizontal":false,"theme_advanced_resizing_use_cookie":false,"theme_advanced_path_location":"bottom","theme_advanced_resizing":1,"theme_advanced_toolbar_location":"top","theme_advanced_toolbar_align":"left","theme_advanced_blockformats":"p,h3,h4,h5,h6","theme_advanced_buttons1":"bold,italic,underline,justifyleft,justifycenter,justifyright,bullist,numlist,outdent,indent,undo,redo,link,unlink,anchor,image,sup,sub,blockquote,hr,removeformat,charmap,formatselect,styleselect,fullscreen,pastetext,pasteword,tablecontrols,embedcode,spellchecker","theme_advanced_buttons2":"","theme_advanced_buttons3":""}}},"plugins":{"format1":{"native":{"spellchecker":"\/sites\/all\/libraries\/tinymce\/jscripts\/tiny_mce\/plugins\/spellchecker\/editor_plugin.js"}},"format2":{"native":{"embedcode":"\/sites\/default\/modules\/contrib\/wysiwyg_embed_code\/plugins\/embedcode\/editor_plugin.js","spellchecker":"\/sites\/all\/libraries\/tinymce\/jscripts\/tiny_mce\/plugins\/spellchecker\/editor_plugin.js"}}},"disable":"Disable rich-text","enable":"Enable rich-text"},"imce":{"url":"\/imce?app=tinymce%7Curl%40"},"contextBlockEditor":{"path":"\/data\/2012\/05\/2012-legislative-session-what-did-they-pass","params":{},"scriptPlaceholder":"\u003cdiv class='script-placeholder'\u003e\u003cstrong\u003e\u003c\/strong\u003e\u003cdiv class='description'\u003ePlease reload the page to view this block.\u003c\/div\u003e\u003c\/div\u003e"},"activePath":"\/"});
//--><!]]>
</script>
</head>
<body class="not-front logged-in page-node node-type-article one-sidebar sidebar-right admin-nw admin-vertical admin-df  section-data section-data-id-2012 section-data-id-2012-id-05 section-data-id-2012-id-05-how-we-built-legislative-bill-explorer one-sidebar sidebar-right">
<div class="outside-embeddable-container">

  <!-- START: Embeddable -->
  <div class="node-body fieldlayout node-field-body">
    <style type="text/css">
      @import url('https://s3.amazonaws.com/data.minnpost/js/leaflet-master-20120531/leaflet.css');
      @import url('https://s3.amazonaws.com/data.minnpost/js/leaflet-addons-master-20120531/leaflet-addons.css');
    </style>
    
    <style type="text/css">
      #minnpost-invasive-species-application {
        max-width: 960px;
        margin: 0 auto;
      }
      .clear {
        clear: both;
      }
      
      .js-dependent,
      .hide {
        display: none;
      }
      
      .footnote {
        font-size: .75em;
        font-style: italic;
        color: #414141;
        margin-top: 1em;
      }
      
      #map {
        width: 100%;
        height: 500px;
        float: left;
      }
      .leaflet-container a {
        color: #801019;
      }
      .map-popup-container {
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        min-width: 100px;
        max-width: 400px;
        width: 35%;
        background: rgb(255, 255, 255);
        background: rgba(255, 255, 255, 0.9);
      }
      
      .popup-contents-wrapper {
        padding: 10px;
      }
      
      .color-bar {
        width: 100%;
        height: 25px;
        margin-bottom: 1em;
      }
      
      .scientific-name {
        font-style: italic;
      }
      
      .dnr-thumb,
      .wp-thumb {
        margin: 1em 10px 0 0;
        float: left;
      }
      .wp-thumb {
        width: 100px;
      }
      
      .help {
        font-style: italic;
        color: #414141;
        margin-top: 1em;
        padding: 1em;
      }
      
      #minnpost-invasive-species-application table {
        width: 100%;
        margin-top: 1em;
      }
      #minnpost-invasive-species-application table tr {
        border-bottom: 1px solid #BBBBBB;
        font-size: .85em;
      }
      #minnpost-invasive-species-application table tr td {
        padding: 2px 5px;
      }
      
      a.popup-close {
        background: #BBBBBB;
        background: rgba(255, 255, 255, 0.7);
        text-indent:-3000px;
        overflow: hidden;
        display: block;
        display: inline-block;
        vertical-align: text-top;
        background-image: url("https://s3.amazonaws.com/data.minnpost/js/bootstrap-2.0.3/img/glyphicons-halflings.png");
        background-repeat: no-repeat;
        background-position: -310px 2px;
        opacity: 0.9;
        width: 18px;
        height: 18px;
        margin: 0 0 0 5px;
        -moz-border-radius: 4px;
        -webkit-border-radius: 4px;
        border-radius: 4px;
        float: right;
        margin: 13px 16px 0 0;
      }
    </style>
    
    <div id="minnpost-invasive-species-application">
      
      <div id="map"></div>
      <p class="footnote">Data from the <a href="http://deli.dnr.state.mn.us/" target="_blank">Minnesota DNR Data Deli</a>.</p>
      
    </div>
    
    <!-- Templates to be used in client side processing. -->
    <script id="template-popup-contents" type="text/template">
      <div class="popup-contents-wrapper">
        <div class="popup-data">
          <div class="color-bar" style="background-color: #<%= sm.color %>;"></div>
          <h3><%= title %></h3>
          <% if (md.SCI_NAME != '') { %>
            <div class="scientific-name"><%= md.SCI_NAME %></div>
          <% } %>
          
          <table>
            <tbody>
              <tr class="location">
                <td>Location</td>
                <td>
                  <% if (md.COUNTY != '') { %><%= md.COUNTY %> County. <% } %>
                  <% if (md.LOCATION != '') { %><%= md.LOCATION %>. <% } %>
                  <% if (md.LOCALITY != '') { %><%= md.LOCALITY %>. <% } %>
                </td>
              </tr>
              <% if (md.ACRES_INF != '' && md.ACRES_INF != 0) { %>
                <tr class="area-infected">
                  <td>Area infected</td>
                  <td><%= md.ACRES_INF %></td>
                </tr>
              <% } %>
              <% if (md.NUM_PLANTS != '' && md.NUM_PLANTS != 0) { %>
                <tr class="number-observed">
                  <td>Number observed</td>
                  <td><%= md.NUM_PLANTS %></td>
                </tr>
              <% } %>
              <% if (md.PLANT_DIST != '' && md.PLANT_DIST != 0) { %>
                <tr class="description">
                  <td>Description</td>
                  <td><%= md.PLANT_DIST %></td>
                </tr>
              <% } %>
              <% if (md.FIRST_OBS != '' && md.FIRST_OBS != 0) { %>
                <tr class="observed">
                  <td>First observed</td>
                  <td><%= md.PLANT_DIST %></td>
                </tr>
              <% } %>
              <% if (md.DATE != '' && md.DATE != 0) { %>
                <tr class="observed">
                  <td>First observed</td>
                  <td><%= md.DATE %></td>
                </tr>
              <% } %>
              <% if (!_.isUndefined(sm.wp) && sm.wp != '') { %>
                <tr class="more-info-links">
                  <td>More info</td>
                  <td>
                    <a href="<%= sm.wp %>" target="_blank">Wikipedia article</a>
                    <% if (!_.isUndefined(sm.dnr_link) && sm.dnr_link != '') { %>
                      <br /><a href="<%= sm.dnr_link %>" target="_blank">MN DNR information</a>
                    <% } %>
                  </td>
                </tr>
              <% } %>
            </tbody>
          </table>
          
          <% if (!_.isUndefined(sm.wp_thumb) || sm.wp_thumb != '') { %>
            <img class="wp-thumb" src="<%= sm.wp_thumb %>" />
          <% } %>
          
          <% if (!_.isUndefined(sm.dnr_thumb) || sm.dnr_thumb != '') { %>
            <img class="dnr-thumb" src="<%= sm.dnr_thumb %>" />
          <% } %>
        </div>
      <div class="popup-contents-wrapper">
    </script>
    <script id="template-popup-container" type="text/template">
      <div class="map-popup-container">
      </div>
    </script>
    <script id="template-popup-contents-empty" type="text/template">
      <div class="popup-contents-wrapper">
        <div class="help">Mouse over the dots on the map to see species; click one to keep the information open.</div>
      </div>
    </script>
  
    <!-- jQuery if it is not there and jQueryCustom for Backbone --><!-- jQuery -->
    <script type="text/javascript">
      window.jQuery || document.write('<script type="text/javascript" src="https://s3.amazonaws.com/data.minnpost/js/jquery-1.7.2/jquery-1.7.2.min.js"><\/script>')
    </script>
    <!-- Leaflet and wax for mapping -->
    <script type="text/javascript" src="https://s3.amazonaws.com/data.minnpost/js/leaflet-master-20120531/leaflet.js"></script>
    <script type="text/javascript" src="https://s3.amazonaws.com/data.minnpost/js/leaflet-addons-master-20120531/leaflet-addons.min.js"></script>
    <script type="text/javascript" src="https://s3.amazonaws.com/data.minnpost/js/wax-v6.0.4/wax.leaf.min.js"></script>
    <!-- Underscore -->
    <script type="text/javascript" src="https://s3.amazonaws.com/data.minnpost/js/underscore-1.3.3/underscore-min.js"></script>
    
    
    <script type="text/javascript">
      (function($, window, undefined) {
        $(document).ready(function() {
          // Settings and placeholders
          var sm = {};
          var dataDir = './data/';
          var popupOpen = false;
          
          // Check if we are not on localhost
          if (location.host.indexOf('localhost') == -1) {
            dataDir = 'https://s3.amazonaws.com/data.minnpost/projects/minnpost-dnr-invasive/data/';
          }
          
          // Create map
          var center = new L.LatLng(46.483264729155586, -91.2740625);
          var map = new L.Map('map', {
            minZoom: 4,
            maxZoom: 11
          });
          map.setView(center, 6);
          map.addControl(new L.Control.Fullscreen());
          
          // Placeholder for popup content and help text
          $(map._container).append(_.template($('#template-popup-container').html(), {}));
          $('.map-popup-container').html(_.template($('#template-popup-contents-empty').html(), {}));
          
          // Base layers
    	    var osmbaseurl = 'http://{s}.tiles.mapbox.com/v1/zzolo.map-rhqrrivf/{z}/{x}/{y}.png';
      		var osmbaselayer = new L.TileLayer(osmbaseurl, { scheme: 'tms' });
          map.addLayer(osmbaselayer);
          var tiles = 'http://{s}.tiles.minnpost.com/minnpost-basemaps/' +
            'minnpost-minnesota-night-no-labels/{z}/{x}/{y}.png';
          var attribution = 'Some map data &copy; ' +
            '<a target="_blank" href="http://openstreetmap.org">OpenStreetMap</a> ' +
            'contributors, CC-BY-SA, some map imagery from <a target="_blank" ' +
            'href="http://minnpost.com">MinnPost</a> and <a target="_blank" ' +
            'href="http://mapbox.com">Mapbox</a>.';
          var minnpost = new L.TileLayer(tiles, 
            { attribution: attribution, scheme: 'tms' });
          map.addLayer(minnpost);
          
          // Tilejson layer of species
          var metadata = 'http://a.tiles.minnpost.com/minnpost-dnr-invasive/mn-invasive/tilejson.jsonp';
          wax.tilejson(metadata, function(tilejson) {
            // Hack the planet (aka the tilejson)
            tilejson.scheme = 'tms';
            tilejson.tiles = [
              'https://s3.amazonaws.com/a.tiles.minnpost/minnpost-dnr-invasive/mn-invasive/{z}/{x}/{y}.png'
            ];
            tilejson.grids = [
              'https://s3.amazonaws.com/a.tiles.minnpost/minnpost-dnr-invasive/mn-invasive/{z}/{x}/{y}.grid.json'
            ];
    
          // Move attributioin to footnotes
          map.attributionControl.setPrefix('');
          $('.footnote').html($('.footnote').html() + ' ' + map.attributionControl._container.innerHTML);
          map.removeControl(map.attributionControl);
          
            // Add layer and interaction
            map.addLayer(new wax.leaf.connector(tilejson));
            wax.leaf.interaction()
              .map(map)
              .tilejson(tilejson)
              .on({
                on: function(e) {
                  // If popup is open, then no worries.
                  if (popupOpen) {
                    return;
                  }
                
                  // Event handling as defined in wax
                  var addClose = '';
                  if ((e.e.type === 'mousemove' || !e.e.type)) {
                    // Mouseover 
                    map._container.style.cursor = 'pointer';
                  }
                  else {
                    // Popup
                    popupOpen = true;
                    addClose = $('<a>close</a>').addClass('popup-close')
                      .attr('href', '#')
                      .click(function(e) {
                        e.preventDefault();
                        $('.map-popup-container').html(_.template($('#template-popup-contents-empty').html(), {}));
                        popupOpen = false;
                      });
                  }
                  
                  // Handle data
                  var tData = { 'md': e.data, 'sm': {} };
                  var $popup = $('.map-popup-container');
                  
                  // Check metada
                  tData.title = (e.data.COMMON_NAM == '') ? e.data.COM_NAME :
                    e.data.COMMON_NAM;
                  if (!_.isEmpty(sm) && !_.isEmpty(sm[tData.title])) {
                    tData.sm = sm[tData.title];
                    if (!_.isUndefined(sm[tData.title].site_name) && sm[tData.title].site_name != '') {
                      tData.title = sm[tData.title].site_name;
                    }
                  }<commit_msg>Added handling click again without close.<commit_after><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>MinnPost</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>
<script type='text/javascript' src='//s7.addthis.com/js/250/addthis_widget.js#async=1'></script>
<link rel="shortcut icon" href="http://www.minnpost.com//sites/default/themes/siteskin/favicon.ico" type="image/x-icon" />
<meta name="keywords" content="<NAME>,Minnesota DFL,Minnesota GOP,Minnesota Legislature,Vikings Stadium,Voter ID Amendment" />
<meta name="description" content="  " />
<meta property="og:title" content="The 2012 Legislative session: What did they pass?"/>
<meta property="og:site_name" content="MinnPost"/>
<meta property="og:description" content="Explore bills by category, investigate which bills Gov. Dayton vetoed, and search by your legislators.
"/>
<meta property="og:image" content="http://www.minnpost.com/sites/default/files/images/thumbnails/fullpagearticles/BillExplorerGraphic3.png"/>
<link rel="apple-touch-icon" href="http://www.minnpost.com//sites/default/themes/siteskin/inc/images/apple-touch-icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1"></meta>

  <link type="text/css" rel="stylesheet" media="all" href="http://www.minnpost.com/sites/default/files/css/css_210e6cb2c47f49b64557aa760781ecee.css" />
<link type="text/css" rel="stylesheet" media="screen" href="http://www.minnpost.com/sites/default/files/css/css_af7ebe348633c5f1b2a0e6fb63d61db8.css" />
<link type="text/css" rel="stylesheet" media="print" href="http://www.minnpost.com/sites/default/files/css/css_661c24623d6669afd5ba1b24560bc9c1.css" />
  <!--[if IE]>
      <link rel="stylesheet" href="http://www.minnpost.com/sites/default/themes/derma/inc/css/ie.css?u" type="text/css">
  <![endif]-->
    <script type="text/javascript" src="http://www.minnpost.com/sites/default/files/js/js_ffc7ad656f7ff17fc35230e689eb85dd.js"></script>
<script type="text/javascript" src="http://www.minnpost.com/sites/all/libraries/tinymce/jscripts/tiny_mce/tiny_mce.js?u"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, {"basePath":"\/","combineBlocks":[["#block-views-most_viewed_by_taxonomy-block","#block-views-most_commented_articles-block_1"],["#block-views-most_viewed_by_node_type-block","#block-views-most_commented_blogs-block_1"],["#block-views-most_viewed_by_node_type-block","#block-views-most_commented_articles-block_1"]],"chartbeat":{"uid":27923,"domain":"minnpost.com"},"googleanalytics":{"trackOutgoing":1,"trackMailto":1,"trackDownload":1,"trackDownloadExtensions":"7z|aac|arc|arj|asf|asx|avi|bin|csv|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip"},"addthis":{"config_default":{"services_toolbox":"facebook_like_counter, tweet, print, email","services_compact":"","services_expanded":"","ui_cobrand":"","ui_header_color":"#000000","ui_header_background":"#FFFFFF","ui_click":true,"ui_delay":"","ui_use_addressbook":0,"pubid":"xa-4e2cfd1147868c4e","data_track_clickback":0,"data_ga_tracker":0,"ui_use_css":true,"data_use_cookies":true,"ui_language":"en","data_use_flash":true},"share_default":{"templates":{"twitter":""}}},"wysiwyg":{"configs":{"tinymce":{"global":{"editorBasePath":"\/sites\/all\/libraries\/tinymce\/jscripts\/tiny_mce","execMode":""},"format1":{"button_tile_map":true,"document_base_url":"\/","mode":"none","plugins":"paste,-spellchecker","theme":"advanced","width":"100%","strict_loading_mode":true,"convert_urls":false,"entities":"160,nbsp,173,shy,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm","apply_source_formatting":0,"convert_fonts_to_spans":1,"language":"en","paste_auto_cleanup_on_paste":0,"preformatted":0,"remove_linebreaks":0,"verify_html":false,"theme_advanced_styles":"Float Right=float-right;Float Left=float-left;Button=button;Caption=caption","content_css":"sites\/default\/themes\/siteskin\/inc\/css\/wysiwyg.css","extended_valid_elements":"font[face|size|color|style],span[class|align|style]","file_browser_callback":"imceImageBrowser","inline_styles":true,"theme_advanced_resize_horizontal":false,"theme_advanced_resizing_use_cookie":false,"theme_advanced_path_location":"bottom","theme_advanced_resizing":1,"theme_advanced_toolbar_location":"top","theme_advanced_toolbar_align":"left","theme_advanced_blockformats":"p,h3,h4,h5,h6","theme_advanced_buttons1":"bold,italic,undo,redo,link,unlink,removeformat,formatselect,pastetext,pasteword,spellchecker","theme_advanced_buttons2":"","theme_advanced_buttons3":""},"format2":{"button_tile_map":true,"document_base_url":"\/","mode":"none","plugins":"fullscreen,paste,table,-embedcode,-spellchecker","theme":"advanced","width":"100%","strict_loading_mode":true,"convert_urls":false,"entities":"160,nbsp,173,shy,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm","apply_source_formatting":0,"convert_fonts_to_spans":1,"language":"en","paste_auto_cleanup_on_paste":0,"preformatted":0,"remove_linebreaks":0,"verify_html":false,"theme_advanced_styles":"Float Right=float-right;Float Left=float-left;Caption=caption;Credit=credit;Button=button","content_css":"sites\/default\/themes\/siteskin\/inc\/css\/wysiwyg.css","extended_valid_elements":"font[face|size|color|style],span[class|align|style],img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed],object[align\u003cbottom?left?middle?right?top|archive|border|class|classid|codebase|codetype|data|declare|dir\u003cltr?rtl|height|hspace|id|lang|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|standby|style|tabindex|title|type|usemap|vspace|width],iframe[align\u003cbottom?left?middle?right?top|class|frameborder|height|id|longdesc|marginheight|marginwidth|name|scrolling\u003cauto?no?yes|src|style|title|width]","file_browser_callback":"imceImageBrowser","inline_styles":true,"theme_advanced_resize_horizontal":false,"theme_advanced_resizing_use_cookie":false,"theme_advanced_path_location":"bottom","theme_advanced_resizing":1,"theme_advanced_toolbar_location":"top","theme_advanced_toolbar_align":"left","theme_advanced_blockformats":"p,h3,h4,h5,h6","theme_advanced_buttons1":"bold,italic,underline,justifyleft,justifycenter,justifyright,bullist,numlist,outdent,indent,undo,redo,link,unlink,anchor,image,sup,sub,blockquote,hr,removeformat,charmap,formatselect,styleselect,fullscreen,pastetext,pasteword,tablecontrols,embedcode,spellchecker","theme_advanced_buttons2":"","theme_advanced_buttons3":""}}},"plugins":{"format1":{"native":{"spellchecker":"\/sites\/all\/libraries\/tinymce\/jscripts\/tiny_mce\/plugins\/spellchecker\/editor_plugin.js"}},"format2":{"native":{"embedcode":"\/sites\/default\/modules\/contrib\/wysiwyg_embed_code\/plugins\/embedcode\/editor_plugin.js","spellchecker":"\/sites\/all\/libraries\/tinymce\/jscripts\/tiny_mce\/plugins\/spellchecker\/editor_plugin.js"}}},"disable":"Disable rich-text","enable":"Enable rich-text"},"imce":{"url":"\/imce?app=tinymce%7Curl%40"},"contextBlockEditor":{"path":"\/data\/2012\/05\/2012-legislative-session-what-did-they-pass","params":{},"scriptPlaceholder":"\u003cdiv class='script-placeholder'\u003e\u003cstrong\u003e\u003c\/strong\u003e\u003cdiv class='description'\u003ePlease reload the page to view this block.\u003c\/div\u003e\u003c\/div\u003e"},"activePath":"\/"});
//--><!]]>
</script>
</head>
<body class="not-front logged-in page-node node-type-article one-sidebar sidebar-right admin-nw admin-vertical admin-df  section-data section-data-id-2012 section-data-id-2012-id-05 section-data-id-2012-id-05-how-we-built-legislative-bill-explorer one-sidebar sidebar-right">
<div class="outside-embeddable-container">

  <!-- START: Embeddable -->
  <div class="node-body fieldlayout node-field-body">
    <style type="text/css">
      @import url('https://s3.amazonaws.com/data.minnpost/js/leaflet-master-20120531/leaflet.css');
      @import url('https://s3.amazonaws.com/data.minnpost/js/leaflet-addons-master-20120531/leaflet-addons.css');
    </style>
    
    <style type="text/css">
      #minnpost-invasive-species-application {
        max-width: 960px;
        margin: 0 auto;
      }
      .clear {
        clear: both;
      }
      
      .js-dependent,
      .hide {
        display: none;
      }
      
      .footnote {
        font-size: .75em;
        font-style: italic;
        color: #414141;
        margin-top: 1em;
      }
      
      #map {
        width: 100%;
        height: 500px;
        float: left;
      }
      .leaflet-container a {
        color: #801019;
      }
      .map-popup-container {
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        min-width: 100px;
        max-width: 400px;
        width: 35%;
        background: rgb(255, 255, 255);
        background: rgba(255, 255, 255, 0.9);
      }
      
      .popup-contents-wrapper {
        padding: 10px;
      }
      
      .color-bar {
        width: 100%;
        height: 25px;
        margin-bottom: 1em;
      }
      
      .scientific-name {
        font-style: italic;
      }
      
      .dnr-thumb,
      .wp-thumb {
        margin: 1em 10px 0 0;
        float: left;
      }
      .wp-thumb {
        width: 100px;
      }
      
      .help {
        font-style: italic;
        color: #414141;
        margin-top: 1em;
        padding: 1em;
      }
      
      #minnpost-invasive-species-application table {
        width: 100%;
        margin-top: 1em;
      }
      #minnpost-invasive-species-application table tr {
        border-bottom: 1px solid #BBBBBB;
        font-size: .85em;
      }
      #minnpost-invasive-species-application table tr td {
        padding: 2px 5px;
      }
      
      a.popup-close {
        background: #BBBBBB;
        background: rgba(255, 255, 255, 0.7);
        text-indent:-3000px;
        overflow: hidden;
        display: block;
        display: inline-block;
        vertical-align: text-top;
        background-image: url("https://s3.amazonaws.com/data.minnpost/js/bootstrap-2.0.3/img/glyphicons-halflings.png");
        background-repeat: no-repeat;
        background-position: -310px 2px;
        opacity: 0.9;
        width: 18px;
        height: 18px;
        margin: 0 0 0 5px;
        -moz-border-radius: 4px;
        -webkit-border-radius: 4px;
        border-radius: 4px;
        float: right;
        margin: 13px 16px 0 0;
      }
    </style>
    
    <div id="minnpost-invasive-species-application">
      
      <div id="map"></div>
      <p class="footnote">Data from the <a href="http://deli.dnr.state.mn.us/" target="_blank">Minnesota DNR Data Deli</a>.</p>
      
    </div>
    
    <!-- Templates to be used in client side processing. -->
    <script id="template-popup-contents" type="text/template">
      <div class="popup-contents-wrapper">
        <div class="popup-data">
          <div class="color-bar" style="background-color: #<%= sm.color %>;"></div>
          <h3><%= title %></h3>
          <% if (md.SCI_NAME != '') { %>
            <div class="scientific-name"><%= md.SCI_NAME %></div>
          <% } %>
          
          <table>
            <tbody>
              <tr class="location">
                <td>Location</td>
                <td>
                  <% if (md.COUNTY != '') { %><%= md.COUNTY %> County. <% } %>
                  <% if (md.LOCATION != '') { %><%= md.LOCATION %>. <% } %>
                  <% if (md.LOCALITY != '') { %><%= md.LOCALITY %>. <% } %>
                </td>
              </tr>
              <% if (md.ACRES_INF != '' && md.ACRES_INF != 0) { %>
                <tr class="area-infected">
                  <td>Area infected</td>
                  <td><%= md.ACRES_INF %></td>
                </tr>
              <% } %>
              <% if (md.NUM_PLANTS != '' && md.NUM_PLANTS != 0) { %>
                <tr class="number-observed">
                  <td>Number observed</td>
                  <td><%= md.NUM_PLANTS %></td>
                </tr>
              <% } %>
              <% if (md.PLANT_DIST != '' && md.PLANT_DIST != 0) { %>
                <tr class="description">
                  <td>Description</td>
                  <td><%= md.PLANT_DIST %></td>
                </tr>
              <% } %>
              <% if (md.FIRST_OBS != '' && md.FIRST_OBS != 0) { %>
                <tr class="observed">
                  <td>First observed</td>
                  <td><%= md.PLANT_DIST %></td>
                </tr>
              <% } %>
              <% if (md.DATE != '' && md.DATE != 0) { %>
                <tr class="observed">
                  <td>First observed</td>
                  <td><%= md.DATE %></td>
                </tr>
              <% } %>
              <% if (!_.isUndefined(sm.wp) && sm.wp != '') { %>
                <tr class="more-info-links">
                  <td>More info</td>
                  <td>
                    <a href="<%= sm.wp %>" target="_blank">Wikipedia article</a>
                    <% if (!_.isUndefined(sm.dnr_link) && sm.dnr_link != '') { %>
                      <br /><a href="<%= sm.dnr_link %>" target="_blank">MN DNR information</a>
                    <% } %>
                  </td>
                </tr>
              <% } %>
            </tbody>
          </table>
          
          <% if (!_.isUndefined(sm.wp_thumb) || sm.wp_thumb != '') { %>
            <img class="wp-thumb" src="<%= sm.wp_thumb %>" />
          <% } %>
          
          <% if (!_.isUndefined(sm.dnr_thumb) || sm.dnr_thumb != '') { %>
            <img class="dnr-thumb" src="<%= sm.dnr_thumb %>" />
          <% } %>
        </div>
      <div class="popup-contents-wrapper">
    </script>
    <script id="template-popup-container" type="text/template">
      <div class="map-popup-container">
      </div>
    </script>
    <script id="template-popup-contents-empty" type="text/template">
      <div class="popup-contents-wrapper">
        <div class="help">Mouse over the dots on the map to see species; click one to keep the information open.</div>
      </div>
    </script>
  
    <!-- jQuery if it is not there and jQueryCustom for Backbone --><!-- jQuery -->
    <script type="text/javascript">
      window.jQuery || document.write('<script type="text/javascript" src="https://s3.amazonaws.com/data.minnpost/js/jquery-1.7.2/jquery-1.7.2.min.js"><\/script>')
    </script>
    <!-- Leaflet and wax for mapping -->
    <script type="text/javascript" src="https://s3.amazonaws.com/data.minnpost/js/leaflet-master-20120531/leaflet.js"></script>
    <script type="text/javascript" src="https://s3.amazonaws.com/data.minnpost/js/leaflet-addons-master-20120531/leaflet-addons.min.js"></script>
    <script type="text/javascript" src="https://s3.amazonaws.com/data.minnpost/js/wax-v6.0.4/wax.leaf.min.js"></script>
    <!-- Underscore -->
    <script type="text/javascript" src="https://s3.amazonaws.com/data.minnpost/js/underscore-1.3.3/underscore-min.js"></script>
    
    
    <script type="text/javascript">
      (function($, window, undefined) {
        $(document).ready(function() {
          // Settings and placeholders
          var sm = {};
          var dataDir = './data/';
          var popupOpen = false;
          
          // Check if we are not on localhost
          if (location.host.indexOf('localhost') == -1) {
            dataDir = 'https://s3.amazonaws.com/data.minnpost/projects/minnpost-dnr-invasive/data/';
          }
          
          // Create map
          var center = new L.LatLng(46.483264729155586, -91.2740625);
          var map = new L.Map('map', {
            minZoom: 4,
            maxZoom: 11
          });
          map.setView(center, 6);
          map.addControl(new L.Control.Fullscreen());
          
          // Placeholder for popup content and help text
          $(map._container).append(_.template($('#template-popup-container').html(), {}));
          $('.map-popup-container').html(_.template($('#template-popup-contents-empty').html(), {}));
          
          // Base layers
    	    var osmbaseurl = 'http://{s}.tiles.mapbox.com/v1/zzolo.map-rhqrrivf/{z}/{x}/{y}.png';
      		var osmbaselayer = new L.TileLayer(osmbaseurl, { scheme: 'tms' });
          map.addLayer(osmbaselayer);
          var tiles = 'http://{s}.tiles.minnpost.com/minnpost-basemaps/' +
            'minnpost-minnesota-night-no-labels/{z}/{x}/{y}.png';
          var attribution = 'Some map data &copy; ' +
            '<a target="_blank" href="http://openstreetmap.org">OpenStreetMap</a> ' +
            'contributors, CC-BY-SA, some map imagery from <a target="_blank" ' +
            'href="http://minnpost.com">MinnPost</a> and <a target="_blank" ' +
            'href="http://mapbox.com">Mapbox</a>.';
          var minnpost = new L.TileLayer(tiles, 
            { attribution: attribution, scheme: 'tms' });
          map.addLayer(minnpost);
          
          // Tilejson layer of species
          var metadata = 'http://a.tiles.minnpost.com/minnpost-dnr-invasive/mn-invasive/tilejson.jsonp';
          wax.tilejson(metadata, function(tilejson) {
            // Hack the planet (aka the tilejson)
            tilejson.scheme = 'tms';
            tilejson.tiles = [
              'https://s3.amazonaws.com/a.tiles.minnpost/minnpost-dnr-invasive/mn-invasive/{z}/{x}/{y}.png'
            ];
            tilejson.grids = [
              'https://s3.amazonaws.com/a.tiles.minnpost/minnpost-dnr-invasive/mn-invasive/{z}/{x}/{y}.grid.json'
            ];
    
          // Move attributioin to footnotes
          map.attributionControl.setPrefix('');
          $('.footnote').html($('.footnote').html() + ' ' + map.attributionControl._container.innerHTML);
          map.removeControl(map.attributionControl);
          
            // Add layer and interaction
            map.addLayer(new wax.leaf.connector(tilejson));
            wax.leaf.interaction()
              .map(map)
              .tilejson(tilejson)
              .on({
                on: function(e) {
                  // Event handling types borrowed from wax.
                  //
                  // If popup is open and mouseing over, do nothing.
                  // If popup is open and click, open new popup. 
                  //
                  // If popup is not open and mouseing over, show new data.
                  // If popup is not open and click, open new popup
                  var addClose = '';
                  
                  // Mouse over and open
                  if ((e.e.type === 'mousemove' || !e.e.type) && popupOpen) {
                    map._container.style.cursor = 'pointer';
                    return;
                  }
                  // If mouseover, change cursor, but still open data
                  if ((e.e.type === 'mousemove' || !e.e.type)) {
                    map._container.style.cursor = 'pointer';
                  }
                  else {
                    // Popup
                    popupOpen = true;
                    addClose = $('<a>close</a>').addClass('popup-close')
                      .attr('href', '#')
                      .click(function(e) {
                        e.preventDefault();
                        $('.map-popup-container').html(_.template($('#template-popup-contents-empty').html(), {}));
                        popupOpen = false;
                      });
                  }
                  
                  // Handle data
                  var tData = { 'md': e.data, 'sm': {} };
                  var $popup = $('.map-popup-container');
                  
                  // Check metada
                  tData.title = (e.data.COMMON_NAM == '') ? e.data.COM_NAME :
                    e.data.COMMON_NAM;
                  if (!_.isEmpty(sm) && !_.isEmpty(sm[tData.title])) {
                    tData.sm = sm[tData.title];
                    if (!_.isUndefined(sm[tData.title].site_name) && sm[tData.title].site_name != '') {
                      tData.title = sm[tData.title].site_name;
                    }
                  }
{'fraction_non_alphanumeric': 0.1783448922674433, 'fraction_numerical': 0.026309943974134314, 'mean_word_length': 2.640758379009794, 'pattern_counts': {'":': 236, '<': 399, '<?xml version=': 0, '>': 399, 'https://': 22, 'lorem ipsum': 0, 'www.': 22, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '783028', 'n_tokens_mistral': 14272, 'n_tokens_neox': 12991, 'n_words': 1605}