From afbd3bec4dfbdfc35bab444b67709624ed7c27cd Mon Sep 17 00:00:00 2001 From: Ryan Clark Date: Mon, 12 Aug 2013 21:01:15 -0700 Subject: [PATCH] Improve local hazard search, progress on #17. Ue placeholder for titles in print, progress #11 --- src/app.coffee | 5 +++++ src/index.jade | 12 +++++++----- src/model-geocode.coffee | 3 ++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/app.coffee b/src/app.coffee index 92cca15..d1c8a9c 100644 --- a/src/app.coffee +++ b/src/app.coffee @@ -34,6 +34,7 @@ dataLayers = [ text: "Mitigation Tips" url: "mitigation/fissures.html" ] + mitigationUrl: "mitigation/fissures.html" lastUpdate: "Summer, 2013" description: '

Layer Description

' legend: new app.models.Legend [ @@ -79,6 +80,7 @@ dataLayers = [ details: '

This layer summarizes available data on active Arizona faults. If faults have been active during the past 2.5 million years (Quaternary period), then we consider that there is some chance they could generate large earthquakes. Generally, the more active the fault zone is, the more likely it is to generate earthquakes, and earthquakes are more likely to occur in regions with many Quaternary faults.

These data were originally compiled in 1998 as part of an effort coordinated by the USGS to compile data and map information on Quaternary faults throughout the world. The database has recently been revised with much more accurate fault mapping, incorporation of new data on fault activity, and inclusion of additional fault zones, primarily in northern Arizona. This database depends heavily on several previous compilations of data on Quaternary faults in Arizona. The first and most comprehensive of these is the state-wide compilation of neotectonic faults by Menges and Pearthree (1983), supplemented by a state-wide compilation of young faults by Euge and others (1992). More detailed regional geologic maps provided most of the data in northern Arizona and southeastern Arizona. The database includes information from all detailed investigations of fault zones in Arizona.

The data structure is set up to provide systematic information on each fault zone. Fault names are based primarily on published maps or reports. In cases where different names have been used for the fault, the alternative names are listed within the database. All of the faults are listed by name and number in the table on the following page. This table indicates where the data summary for each fault can be found, as well as the age of youngest activity and fault slip rate category. The individual fault data sheets include information on map and data sources, fault location, geologic setting of the fault, the geomorphic expression of the fault, recency of fault movement, fault slip rate(s), and fault zone length and orientation. Faults are grouped into slip rate categories of <0.02 mm/yr, < 0.2 mm/yr, and <1 mm/yr. Most faults in Arizona fall into the lowest slip-rate category, with a few faults in the higher categories. Reported lengths are for the whole fault zone, not cumulative length of each individual fault in the zone, and orientations are averages for the fault zone.

Citations:

Euge, K.M., Schell, B.A. and Lam, I.P., 1992, Development of seismic acceleration maps for Arizona: Arizona Department of Transportation Report No. AZ92-344, 327 p., 5 sheets, scale 1:1,000,000.

Menges, C.M. and Pearthree, P.A., 1983, Map of neotectonic (latest Pliocene - Quaternary) deformation in Arizona: Arizona Bureau of Geology and Mineral Technology Open-File Report 83-22, 48 p., map scale 1:500,000, 4 map sheets.

' brief: 'Faults that are known to have been active within the last 2.5 million years (Quaternary period), and thus have some chance that they could generate a large earthquake.' links: [] + mitigationUrl: "" lastUpdate: "Fall, 2012" description: '

Layer Description

' legend: new app.models.Legend [ @@ -130,6 +132,7 @@ dataLayers = [ text: "Arizona Emergency Information Network" url: "http://www.azein.gov/azein/Hazards%20%20Arizona/Earthquake.aspx?PageView=Shared" ] + mitigationUrl: "mitigation/earthquakes.html" lastUpdate: "Aug. 7, 2013" description: '

Layer Description

' filterClause: "&filter=#{(new app.models.Filter([{calculated_magnitude: "[2.0,9.0]"}])).urlEncoded()}" @@ -277,6 +280,7 @@ dataLayers = [ text: "Arizona Emergency Information Network" url: "http://www.azein.gov/azein/Hazards%20%20Arizona/Flooding.aspx?PageView=Shared" ] + mitigationUrl: "mitigation/floods.html" lastUpdate: "May, 2010" legend: new app.models.Legend [ caption: "High" @@ -310,6 +314,7 @@ dataLayers = [ text: "Arizona Emergency Information Network" url: "http://www.azein.gov/azein/Hazards%20%20Arizona/Wildfire.aspx" ] + mitigationUrl: "mitigation/fires.html" lastUpdate: "Fall 2013" active: false legend: new app.models.Legend [ diff --git a/src/index.jade b/src/index.jade index af9fea3..f257174 100644 --- a/src/index.jade +++ b/src/index.jade @@ -91,11 +91,11 @@ html(lang="en") script#print-tool(type="text/html") p This tool allows you to preview and print a static map. Click 'preview' first to add some customization to your map, like a title. Click reset at any time to reload this window. - input(id="title-input",type="text",name="title",value="Type a Title and Press Enter") + input(id="title-input",type="text",name="title",placeholder="Type a Title and Press Enter") script#print-container(type="text/html") #print-container - input(id="title-input",type="text",name="title",value="Type a Title and Press Enter") + input(id="title-input",type="text",name="title",placeholder="Type a Title and Press Enter") #preview-map-container #legend-container h4 Legend @@ -216,12 +216,14 @@ html(lang="en") i.icon-file script#localHazards(type="text/html") - h3 <%= location %> - p.muted Searched for hazards within <%= bufferDistance %> meters + h4 Nearby Natural Hazards + p.muted Searched for hazards near <%= location %> + p View suggestions to prepare and protect yourself from natural hazards in your area: <% for (var key in result) { if (result.hasOwnProperty(key) && result[key].count > 0) { %> p - span Be afraid of span: strong <%= key %> + span : + a(href!="<%= result[key].mitigationUrl %>", target="_blank") Mitigation tips <% } } %> script#defaultPopup(type="text/html") diff --git a/src/model-geocode.coffee b/src/model-geocode.coffee index e0e429a..6f6d12d 100644 --- a/src/model-geocode.coffee +++ b/src/model-geocode.coffee @@ -102,10 +102,10 @@ class app.GeocodeModel extends Backbone.Model filter = new app.models.filters.AndFilter [bboxFilter, attrFilter], version: "1.0.0" dataUrl += "&filter=#{filter.urlEncoded()}" floodCount = thisOne + thisOne.mitigationUrl = layer.get "mitigationUrl" app.data[callbackName] = (data) -> output["Flood Potential"].count = data.features.length - # Now we've looped through everything, respond via callback callback box, point, name, output @@ -126,6 +126,7 @@ class app.GeocodeModel extends Backbone.Model # Append the count to the output obj thisOne.count = count + thisOne.mitigationUrl = layer.get "mitigationUrl" return \ No newline at end of file