Skip to content

Instantly share code, notes, and snippets.

@curran
Last active February 21, 2017 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curran/7608953e2696168d711f486082278a54 to your computer and use it in GitHub Desktop.
Save curran/7608953e2696168d711f486082278a54 to your computer and use it in GitHub Desktop.
[UNLISTED] helping someone
time latitude longitude depth mag magType nst gap dmin rms net id updated place type horizontalError depthError magError magNst status locationSource magSource
2016-12-22T18:00:57.980Z 19.5588341 -156.4441681 28.72 2.72 md 29 240 0.502 0.26 hv hv61529446 2016-12-22T18:04:29.810Z 47km W of Kailua-Kona, Hawaii earthquake 1.19 3.66 0.08 3 automatic hv hv
2016-12-22T17:26:18.890Z 38.8351669 -122.7711639 1.85 2.22 md 23 73 0.008633 0.07 nc nc72742685 2016-12-22T18:12:04.452Z 4km WNW of Cobb, California earthquake 0.21 0.41 0.15 9 automatic nc nc
2016-12-22T17:26:15.540Z 38.8349991 -122.7733307 1.72 2.28 md 6 141 0.007961 0.01 nc nc72742680 2016-12-22T17:37:04.587Z 4km WNW of Cobb, California earthquake 1.19 0.54 0.01 3 automatic nc nc
2016-12-22T17:23:18.650Z 35.7446667 -118.0391667 2 1 ml 21 64 0.1455 0.17 ci ci37769576 2016-12-22T17:45:23.986Z 23km WNW of Inyokern, CA earthquake 0.24 0.57 0.166 9 reviewed ci ci
2016-12-22T17:19:57.760Z 33.5136667 -116.5505 10.17 0.39 ml 18 100 0.04716 0.16 ci ci37769568 2016-12-22T17:41:03.982Z 12km ESE of Anza, CA earthquake 0.32 0.65 0.144 5 reviewed ci ci
2016-12-22T17:11:09.160Z 46.2143333 -122.1818333 4.03 0.13 md 7 169 0.004057 0.14 uw uw61225422 2016-12-22T17:27:21.350Z 38km S of Morton, Washington earthquake 1.21 1.85 0.052 3 reviewed uw uw
2016-12-22T16:49:54.370Z 19.4085007 -155.2814941 0.56 1.96 ml 13 98 0.003555 0.21 hv hv61529321 2016-12-22T16:55:37.870Z 5km WSW of Volcano, Hawaii earthquake 0.17 0.29 0.27 13 automatic hv hv
2016-12-22T16:49:47.450Z 33.9763333 -116.9823333 12.96 1.23 ml 57 38 0.05482 0.16 ci ci37769552 2016-12-22T17:20:18.061Z 5km N of Beaumont, CA earthquake 0.15 0.39 0.146 33 reviewed ci ci
2016-12-22T16:24:56.907Z 66.0182 -148.2421 8 2.3 ml 0.96 ak ak14777460 2016-12-22T16:40:19.414Z 130km N of Ester, Alaska earthquake 0.3 automatic ak ak
2016-12-22T16:05:09.370Z 55.2556 164.7407 22.19 5.2 mb 70 4.222 0.67 us us10007m07 2016-12-22T16:25:55.040Z 79km W of Nikol'skoye, Russia earthquake 7.9 4.6 0.028 430 reviewed us us
2016-12-22T15:53:43.047Z 59.7782 -152.7043 81 1.8 ml 0.51 ak ak14777447 2016-12-22T16:03:24.822Z 49km W of Anchor Point, Alaska earthquake 0.7 automatic ak ak
2016-12-22T15:44:22.708Z 63.5078 -148.0426 6.4 1.6 ml 0.76 ak ak14777445 2016-12-22T15:52:57.776Z 47km ENE of Cantwell, Alaska earthquake 0.2 automatic ak ak
2016-12-22T15:42:34.890Z 46.1921667 -122.1846667 1.8 0.66 ml 8 241 0.00904 0.09 uw uw61225412 2016-12-22T17:13:00.790Z 37km NNE of Amboy, Washington earthquake 0.54 0.44 0.335 7 reviewed uw uw
2016-12-22T15:39:43.762Z 59.46 -153.1626 99.6 2.5 ml 0.59 ak ak14777441 2016-12-22T15:47:13.719Z 83km WSW of Anchor Point, Alaska earthquake 0.6 automatic ak ak
2016-12-22T15:10:57.310Z 33.1728333 -116.1015 10.71 0.9 ml 18 78 0.1294 0.21 ci ci37769536 2016-12-22T15:40:35.297Z 4km NE of Ocotillo Wells, CA earthquake 0.45 1.22 0.149 12 reviewed ci ci
2016-12-22T15:06:06.550Z 39.9013329 -122.9393311 -0.88 1.98 md 14 98 0.1969 0.27 nc nc72742670 2016-12-22T15:34:02.304Z 29km ENE of Covelo, California earthquake 0.71 4.51 0.11 6 automatic nc nc
2016-12-22T14:49:19.680Z 33.5993333 -116.8463333 13.26 1.55 ml 53 28 0.03061 0.18 ci ci37769528 2016-12-22T15:41:16.210Z 17km WNW of Anza, CA earthquake 0.2 0.43 0.155 28 reviewed ci ci
2016-12-22T14:46:57.240Z 37.2312 -97.8678 5 2.8 mb_lg 53 0.018 0.24 us us10007lzy 2016-12-22T17:11:01.040Z 15km ESE of Harper, Kansas earthquake 1.2 1.8 0.073 49 reviewed us us
2016-12-22T14:46:37.220Z 19.569334 -155.9499969 13.33 1.73 md 17 238 0.05819 0.22 hv hv61529126 2016-12-22T14:50:04.860Z 1km ESE of Kahaluu-Keauhou, Hawaii earthquake 1.11 0.43 0.29 3 automatic hv hv
2016-12-22T14:21:45.280Z 35.6668 -97.4023 5.76 3.2 mb_lg 36 0.086 0.15 us us10007lzv 2016-12-22T17:58:59.501Z 7km ENE of Edmond, Oklahoma earthquake 1.2 4.1 0.051 99 reviewed us us
2016-12-22T14:07:35.876Z 58.6884 -155.0063 135.9 2.7 ml 0.72 ak ak14777430 2016-12-22T14:23:30.712Z 95km E of King Salmon, Alaska earthquake 0.6 automatic ak ak
2016-12-22T14:07:06.170Z 44.7415 -114.1615 5.18 1.18 ml 9 119 0.369 0.16 mb mb80194269 2016-12-22T15:53:00.780Z 26km NNE of Challis, Idaho earthquake 1.06 4.6 0.052 5 reviewed mb mb
2016-12-22T14:03:55.129Z 63.2101 -150.5583 129.9 2.6 ml 0.43 ak ak14777424 2016-12-22T14:19:17.922Z 83km WSW of Cantwell, Alaska earthquake 0.6 automatic ak ak
2016-12-22T14:02:52.400Z 33.642 -116.7146667 13.71 0.62 ml 19 87 0.06343 0.08 ci ci37769512 2016-12-22T14:20:47.490Z 10km NNW of Anza, CA earthquake 0.24 0.42 0.187 15 reviewed ci ci
2016-12-22T13:39:44.183Z 61.3732 -146.7549 23.7 1.9 ml 0.4 ak ak14777421 2016-12-22T13:49:58.319Z 34km NW of Valdez, Alaska earthquake 0.2 automatic ak ak
2016-12-22T13:37:29.390Z 38.8216667 -122.8186646 1.9 0.82 md 8 87 0.006929 0.03 nc nc72742640 2016-12-22T14:16:03.123Z 7km NW of The Geysers, California earthquake 0.37 0.52 0.06 3 automatic nc nc
2016-12-22T13:36:33.500Z 33.5091667 -116.544 9.13 0.76 ml 24 84 0.04941 0.14 ci ci37769504 2016-12-22T14:22:02.640Z 13km ESE of Anza, CA earthquake 0.25 0.43 0.153 18 reviewed ci ci
2016-12-22T13:34:59.005Z 60.7224 -141.1279 4.2 2.4 ml 0.73 ak ak14777418 2016-12-22T13:42:33.194Z 102km NE of Cape Yakataga, Alaska earthquake 0.2 automatic ak ak
2016-12-22T13:26:30.700Z 47.7625 -113.819 5.26 -0.45 md 4 258 0.164 0.03 mb mb80194284 2016-12-22T16:11:25.630Z 26km ENE of Polson, Montana earthquake 1.18 5.59 1 reviewed mb mb
2016-12-22T13:21:00.120Z 61.8525 -150.17 46.2 1.5 ml 0.33 ak ak14777416 2016-12-22T13:28:34.098Z 13km NNW of Willow, Alaska earthquake 0.9 automatic ak ak
2016-12-22T13:18:14.930Z 37.640667 -118.9346695 5.52 1.4 md 15 70 0.02565 0.03 nc nc72742630 2016-12-22T14:05:02.110Z 3km ESE of Mammoth Lakes, California earthquake 0.49 0.77 0.15 15 automatic nc nc
2016-12-22T13:17:18.280Z 34.0651667 -117.2735 15.71 1.11 ml 37 59 0.1108 0.23 ci ci37769488 2016-12-22T14:21:51.523Z 2km NNW of Loma Linda, CA earthquake 0.4 0.87 0.216 31 reviewed ci ci
2016-12-22T13:16:52.040Z 37.6396675 -118.935997 4.99 1.03 md 13 72 0.0265 0.02 nc nc72742625 2016-12-22T13:51:03.083Z 3km ESE of Mammoth Lakes, California earthquake 0.49 1.23 0.18 12 automatic nc nc
2016-12-22T13:09:15.330Z 38.8585014 -122.8574982 0.96 1.45 md 17 77 0.0142 0.03 nc nc72742620 2016-12-22T13:37:02.074Z 12km WNW of Cobb, California earthquake 0.24 0.54 0.07 4 automatic nc nc
2016-12-22T13:07:13.300Z 38.8101654 -122.8011703 -0.82 0.55 md 7 185 0.005082 0.23 nc nc72742610 2016-12-22T13:26:03.057Z 5km NW of The Geysers, California earthquake 0.77 4.7 1 automatic nc nc
2016-12-22T13:00:53.270Z 38.8018341 -122.8401642 6.92 1.04 md 16 180 0.01109 0.16 nc nc72742605 2016-12-22T13:15:04.036Z 7km WNW of The Geysers, California earthquake 1.22 1.57 0.06 4 automatic nc nc
2016-12-22T12:40:00.790Z 47.4056 152.9823 92.59 4.9 mb 167 6.459 1.04 us us10007lzb 2016-12-22T12:54:10.040Z Kuril Islands earthquake 11.1 6.5 0.045 156 reviewed us us
2016-12-22T12:39:26.030Z 33.6823333 -116.7996667 15.52 1.37 ml 46 40 0.06585 0.17 ci ci37769480 2016-12-22T14:22:29.600Z 10km SW of Idyllwild, CA earthquake 0.21 0.39 0.205 27 reviewed ci ci
2016-12-22T12:33:12.442Z 61.4128 -152.275 10.2 1.7 ml 0.3 ak ak14777227 2016-12-22T12:45:16.755Z 96km NNW of Nikiski, Alaska earthquake 0.3 automatic ak ak
<html><head><meta charset="utf-8">
<style>
.county-boundary {
fill: #aaa;
stroke: #fff;
stroke-width: .5px;
}
.county-boundary:hover {
fill:orange;
}
.state:hover {
fill-opacity:0;
}
</style>
</head><body>
<script src="//d3js.org/d3.v3.min.js"></script>
<script src="//d3js.org/d3-polygon.v1.min.js"></script>
<script src="//d3js.org/topojson.v1.min.js"></script>
<script>
var width = 960,
height = 500,
centered;
var margins = { left: 0, top: 0, right: 0, bottom: 0 };
var projection = d3.geo.albersUsa()
.scale(1070)
.translate([width / 2, height / 2]);
var path = d3.geo.path()
.projection(projection);
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height+margins.top);
var g = svg.append("g");
var countiesG = g.append("g")
.attr("id", "counties");
// Make sure circles appear in front of counties.
var circlesG = g.append("g")
.attr("id", "circles");
d3.csv("eq_subset.csv", function(rawData) {
d3.json("us.json", function(error, us) {
var data = rawData
.map(function(d) {
return {
Latitude: +d.latitude,
Longitude: +d.longitude,
Place: d.place
};
})
.filter(function(d){
return projection([d.Longitude,d.Latitude]);
});
function display_points (geometry) {
var data_subset = data.filter(function(d) {
// geometry.coordinates is an array of polygons,
// so we need to check each one separately.
return !geometry.coordinates.every(function (polygon){
return !d3.polygonContains(polygon, [d.Longitude, d.Latitude]);
});
});
var circles = circlesG
.selectAll('circle')
.data(data_subset);
circles
.enter()
.append('circle');
circles
.attr({
cx: function (d) { return projection([d.Longitude,d.Latitude])[0]; },
cy: function (d) { return projection([d.Longitude,d.Latitude])[1]; },
r: 3
})
.attr('fill','black');
circles.exit().remove();
}
countiesG
.selectAll("path")
.data(topojson.feature(us, us.objects.counties).features)
.enter().append("path")
.attr("d", path)
.attr("class", "county-boundary")
.on("mouseover", function(d) {
return display_points(d.geometry);
});
});
});
</script>
</body>
</html>
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment