Last active
December 17, 2015 03:18
-
-
Save mbstacy/5541861 to your computer and use it in GitHub Desktop.
Load EPA impaired waters scraped tables in dashboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#content a.metadata | |
{ | |
color:#006699; | |
cursor:help; | |
} | |
#content a.description | |
{ | |
color:#006699; | |
cursor:help; | |
text-align:center; | |
display: block; | |
} | |
#content .left | |
{ float:left; } | |
#content .center | |
{ | |
text-align:center; | |
margin-top:0; | |
} | |
#content table.center | |
{ | |
margin-left: auto; | |
margin-right: auto; | |
text-align: center; | |
} | |
#content tr.top | |
{ | |
vertical-align: top; | |
text-align: center; | |
} | |
#content tr.good | |
{ background: #82C6C0; } | |
#content tr.threatened | |
{ background: #FFFFC1 } | |
#content tr.impaired | |
{ background: #FFC1C1 } | |
#content tr.partial | |
{ background: #FFC7A0 } | |
#content tr.unassessed | |
{ background: #EEEEEE } | |
#content tr.white | |
{ background: #FFFFFF } | |
#content tr.pies | |
{ background: #CCFFFF } | |
#content .toc | |
{ | |
float: left; | |
width: 22%; | |
padding: 0; | |
} | |
#content .watershedmap | |
{ | |
float:left; | |
width:55%; | |
padding:0; | |
text-align:left; | |
} | |
#content .top | |
{ | |
margin-top:0; | |
} | |
#content .callout | |
{ | |
float:right; | |
width:20%; | |
padding:0; | |
} | |
#content .alignleft | |
{ | |
text-align:left; | |
} | |
#content .aligncenter | |
{ | |
text-align:center; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link type="text/css" href="attains_styles.css" rel="stylesheet" /> | |
<!--<link type="text/css" href="epa-content.css" rel="stylesheet" />--> | |
<script type="text/javascript" src="http://static.cybercommons.org/js/jquery-1.7.2.min.js"></script> | |
<script type="text/javascript" src="http://static.cybercommons.org/js/jquery.flot.js"></script> | |
<script type="text/javascript" src="http://static.cybercommons.org/js/jquery.flot.time.js"></script> | |
<script type="text/javascript" src="http://static.cybercommons.org/css/bootstrap/js/bootstrap.min.js"></script> | |
<script> | |
$(document).ready( function() { | |
jQuery.extend({ | |
parseQuerystring: function() { | |
var nvpair = {}; | |
var qs = window.location.search.replace('?', ''); | |
var pairs = qs.split('&'); | |
$.each(pairs, function(i, v) { | |
var pair = v.split('='); | |
nvpair[pair[0]] = pair[1]; | |
}); | |
return nvpair; | |
} | |
}); | |
var qs = $.parseQuerystring(); | |
$.getJSON("http://test.oklahomawatersurvey.org/mongo/db_find/ows/impaired_waters/{'spec':{'huc':'" + qs.huc +"'}}".concat('?callback=?'),function(fdata){ | |
$.each( fdata[0], function( key, value ) { | |
if(key.indexOf('table')!==-1){ | |
$('#content').append(value); | |
} | |
}); | |
}); | |
}); | |
function openWin(fileName, windowName,display) { | |
window.open(fileName,windowName,display); | |
} | |
</script> | |
</head> | |
<body> | |
<div id="content" style="width:1200px;"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment