Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

Commit

Permalink
Improve local hazard search, progress on #17. Ue placeholder for titl…
Browse files Browse the repository at this point in the history
…es in print, progress #11
  • Loading branch information
rclark committed Aug 13, 2013
1 parent 95647fa commit afbd3be
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions src/app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ dataLayers = [
text: "Mitigation Tips"
url: "mitigation/fissures.html"
]
mitigationUrl: "mitigation/fissures.html"
lastUpdate: "Summer, 2013"
description: '<h4>Layer Description</h4>'
legend: new app.models.Legend [
Expand Down Expand Up @@ -79,6 +80,7 @@ dataLayers = [
details: '<p>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.</p><p>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.</p><p>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.</p><p>Citations:</p><p>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. </p><p>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.</p>'
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: '<h4>Layer Description</h4>'
legend: new app.models.Legend [
Expand Down Expand Up @@ -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: '<h4>Layer Description</h4>'
filterClause: "&filter=#{(new app.models.Filter([{calculated_magnitude: "[2.0,9.0]"}])).urlEncoded()}"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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 [
Expand Down
12 changes: 7 additions & 5 deletions src/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion src/model-geocode.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

0 comments on commit afbd3be

Please sign in to comment.