<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Earth Hazards Explained]]></title><description><![CDATA[Earth Hazards Explained]]></description><link>https://liveatlas.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Nov 2026 11:06:38 GMT</lastBuildDate><atom:link href="https://liveatlas.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Find Megathrust Earthquakes in the USGS Catalog With JavaScript]]></title><description><![CDATA[Query the USGS earthquake catalog for every magnitude 8 since 1965 and see why nearly all of them are shallow subduction zone ruptures.]]></description><link>https://liveatlas.hashnode.dev/megathrust-earthquakes-usgs-api</link><guid isPermaLink="true">https://liveatlas.hashnode.dev/megathrust-earthquakes-usgs-api</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[api]]></category><category><![CDATA[GeoJSON]]></category><category><![CDATA[Tutorial]]></category><dc:creator><![CDATA[Live Atlas]]></dc:creator><pubDate>Fri, 06 Nov 2026 16:55:13 GMT</pubDate><content:encoded><![CDATA[<p>A megathrust earthquake is a rupture of the fault between two converging plates at a subduction zone, where one plate dives beneath the other. The <a href="https://www.usgs.gov/special-topics/subduction-zone-science/science/earthquakes">USGS subduction zone science page on earthquakes</a> ties giant earthquakes to the stuck portions of that plate interface. The USGS earthquake catalog lets you check this in a few lines of code.</p>
<p><img src="https://raw.githubusercontent.com/liveatlasearth/liveatlas-media/main/mb-19-1-world-map-of-the-largest-earthquakes-in-the-usgs-f.jpg" alt="World map of the largest earthquakes in the USGS file lining the subduction zones" /></p>
<p><em>Nearly all magnitude 8 and larger earthquakes since 1965 struck at subduction zones (USGS catalog).</em></p>
<h2>The Query</h2>
<p>The <a href="https://earthquake.usgs.gov/fdsnws/event/1/">USGS FDSN event web service</a> is free, needs no key and answers in GeoJSON. Three parameters are enough here, a start date, a minimum magnitude and a sort order.</p>
<pre><code class="language-js">const params = new URLSearchParams({
  format: "geojson",
  starttime: "1965-01-01",
  minmagnitude: "8",
  orderby: "magnitude",
});

const res = await fetch(`https://earthquake.usgs.gov/fdsnws/event/1/query?${params}`);
if (!res.ok) throw new Error(`USGS API answered ${res.status}`);
const { features } = await res.json();

const quakes = features.map(({ properties, geometry }) =&gt; {
  const [lon, lat, depthKm] = geometry.coordinates;
  return {
    mag: properties.mag,
    place: properties.place,
    year: new Date(properties.time).getUTCFullYear(),
    lat, lon, depthKm,
  };
});

const shallow = quakes.filter(q =&gt; q.depthKm &lt;= 70);
console.log(`${quakes.length} quakes of M8+ since 1965, ${shallow.length} of them 70 km deep or less`);

for (const q of quakes.slice(0, 5)) {
  console.log(`M${q.mag} ${q.year} ${q.place} (${q.depthKm} km)`);
}
for (const q of quakes.filter(q =&gt; q.depthKm &gt; 70)) {
  console.log(`Deep exception: M${q.mag} ${q.year} ${q.place}, ${q.depthKm} km`);
}
</code></pre>
<p>Save it as <code>megathrust.mjs</code> and run <code>node megathrust.mjs</code> (Node 18 or later), or paste it into a browser console.</p>
<h2>What It Prints</h2>
<p>On November 6, 2026 the catalog returned 49 earthquakes of magnitude 8 or more since 1965, and 44 of them started 70 km deep or less. The top five are all shallow subduction ruptures, Sumatra 2004 and Tohoku 2011 at M9.1, then Kamchatka 2025 and Maule 2010 at M8.8, then the Rat Islands in 1965 at M8.7.</p>
<p>The five exceptions are deep, from 122 km under Peru to 645 km. They break inside the sinking slab, not on the plate contact, which is the other family of subduction zone quakes the USGS describes.</p>
<h2>Why Shallow Matters</h2>
<p>Megathrust ruptures sit close to the seafloor, so they can lift the ocean above them, which is why the largest ones set off tsunamis. The strongest on record, the M9.5 Valdivia earthquake of 1960, predates this query. Its depth was 33 km, as the <a href="https://www.liveatlas.earth/earthquakes/1960-chile-puerto-montt/">Live Atlas record of the Valdivia earthquake</a> shows. To see the shallow versus deep split for recent quakes, this <a href="https://quake-lab.lovable.app/depth">depth explorer</a> plots both, and the <a href="https://quake-lab.lovable.app/deadliest">deadliest earthquakes table</a> lists the human toll of the big ones.</p>
]]></content:encoded></item><item><title><![CDATA[Epicenter vs Hypocenter in the USGS Earthquake Feed, With JavaScript]]></title><description><![CDATA[The USGS earthquake feed stores the epicenter and the hypocenter depth in one array. What each means, and how to read them in JavaScript.]]></description><link>https://liveatlas.hashnode.dev/epicenter-vs-hypocenter-usgs-earthquake-feed</link><guid isPermaLink="true">https://liveatlas.hashnode.dev/epicenter-vs-hypocenter-usgs-earthquake-feed</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[GeoJSON]]></category><category><![CDATA[api]]></category><dc:creator><![CDATA[Live Atlas]]></dc:creator><pubDate>Tue, 03 Nov 2026 21:56:42 GMT</pubDate><content:encoded><![CDATA[<p>Every earthquake has two locations, and most maps only show one. The hypocenter is the point underground where the rupture starts, and the epicenter is the point on the surface straight above it. The USGS earthquake feed hands you both in a single array of three numbers, which makes it a good place to see the difference in code.</p>
<h2>Two Points, One Dot on the Map</h2>
<img src="https://raw.githubusercontent.com/liveatlasearth/liveatlas-media/main/mb-02-1-cross-section-diagram-with-a-fault-plane-the-hypoc.jpg" alt="Cross-section diagram with a fault plane, the hypocenter at depth where the rupture starts, and the epicenter on the surface directly above it" style="display:block;margin:0 auto" />

<p><em>The hypocenter is where the rupture begins underground, and the epicenter is the point straight above it, the one shown on maps. Not to scale.</em></p>
<p>The <a href="https://www.usgs.gov/programs/earthquake-hazards/science-earthquakes">USGS primer on the science of earthquakes</a> calls the surface along which rock slips the fault plane. The slip starts at one point on it, the hypocenter, also called the focus. The epicenter sits directly above, so the distance between the two is simply the depth of the quake.</p>
<p>Locating that point explains why maps show the epicenter. P waves travel faster than S waves, so the delay between them on one seismogram gives the distance to the source but not the direction. That distance draws a circle around the station, and with three stations the circles cross at one place on the surface, the epicenter.</p>
<h2>What the USGS Feed Returns</h2>
<p>The <a href="https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php">USGS GeoJSON summary feeds</a> are free, need no key and are updated every minute. URLs follow one pattern, <code>summary/{magnitude}_{period}.geojson</code>, with magnitudes <code>significant</code>, <code>4.5</code>, <code>2.5</code>, <code>1.0</code> or <code>all</code>, and periods <code>hour</code>, <code>day</code>, <code>week</code> or <code>month</code>.</p>
<p>Each earthquake is a GeoJSON feature whose geometry is a point.</p>
<pre><code class="language-json">"geometry": { "type": "Point", "coordinates": [longitude, latitude, depth] }
</code></pre>
<p>The first two numbers are the epicenter. The third is the depth of the hypocenter in kilometers. Note the order, longitude first, which trips up anyone used to writing latitude first.</p>
<h2>The Code</h2>
<p>Node 18 or later has <code>fetch</code> built in, and the same code runs in a browser.</p>
<pre><code class="language-js">const FEED = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.geojson";

const res = await fetch(FEED);
if (!res.ok) throw new Error(`USGS feed answered ${res.status}`);
const { features } = await res.json();

const quakes = features.map(({ properties, geometry }) =&gt; {
  const [lon, lat, depthKm] = geometry.coordinates;
  return {
    place: properties.place,
    mag: properties.mag,
    time: new Date(properties.time).toISOString(),
    epicenter: { lat, lon },          // the point on the map
    hypocenterDepthKm: depthKm,       // the same point, this far down
    shallow: depthKm &lt; 70,
  };
});

const deepest = [...quakes].sort((a, b) =&gt; b.hypocenterDepthKm - a.hypocenterDepthKm)[0];
const shallowShare = quakes.filter(q =&gt; q.shallow).length / quakes.length;

console.log(`${quakes.length} quakes of M4.5+ this week, ${Math.round(shallowShare * 100)}% shallow`);
if (deepest) console.log(`Deepest: M${deepest.mag} ${deepest.place}, ${deepest.hypocenterDepthKm} km down`);
</code></pre>
<p>Save it as <code>quakes.mjs</code> and run <code>node quakes.mjs</code>. Swap <code>4.5_week</code> for <code>all_day</code> to include the smaller quakes as well.</p>
<h2>Why Depth Matters</h2>
<p>A quake counts as shallow when its focus is less than 70 km down, and shallow events are the most dangerous because the rupture is close to the people above it. Others start as deep as 700 km, inside slabs of plate sinking at subduction zones, which is why a single dot on a flat map can hide very different events. This <a href="https://quake-lab.lovable.app/depth">depth explorer</a> plots shallow against deep quakes, and the <a href="https://quake-lab.lovable.app/">magnitude calculator</a> compares the energy of any two.</p>
]]></content:encoded></item><item><title><![CDATA[Build a Northern Lights Checker With NOAA's Free Space Weather Data]]></title><description><![CDATA[Read NOAA's free Kp index and OVATION aurora forecast in JavaScript, with what causes the northern lights and the gotchas in the data.]]></description><link>https://liveatlas.hashnode.dev/northern-lights-checker-noaa-api</link><guid isPermaLink="true">https://liveatlas.hashnode.dev/northern-lights-checker-noaa-api</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[api]]></category><category><![CDATA[Tutorial]]></category><dc:creator><![CDATA[Live Atlas]]></dc:creator><pubDate>Mon, 02 Nov 2026 12:02:18 GMT</pubDate><content:encoded><![CDATA[<p>The northern lights are one of the few natural events you can check with two HTTP requests. NOAA's Space Weather Prediction Center publishes its aurora data as plain JSON files, with no API key and no sign-up. This post covers what causes the glow, then builds a small JavaScript checker that reads the planetary Kp index and the short-term aurora forecast for any point on the map.</p>
<h2>What the Data Describes</h2>
<img src="https://raw.githubusercontent.com/liveatlasearth/liveatlas-media/main/mb-01-1-diagram-of-the-aurora-s-height-above-the-ground.jpg" alt="Diagram of the aurora's height above the ground" style="display:block;margin:0 auto" />

<p><em>The aurora forms about 80 to 500 km up, where incoming electrons excite oxygen (green and red) and nitrogen (blue and purple). Not to scale.</em></p>
<p>According to <a href="https://www.swpc.noaa.gov/phenomena/aurora">NOAA's page on the aurora</a>, electrons accelerated in the magnetotail, on the night side of the planet, follow Earth's magnetic field down toward the poles and collide with oxygen and nitrogen in the upper atmosphere. Each collision lifts an atom or molecule into a higher energy state, and the light comes out when it drops back, much like a neon tube. The glow forms two rings, the auroral ovals, roughly centered on the magnetic poles. In a band from about 60 to 75 degrees of latitude, displays happen on most nights of the year, and a strong geomagnetic storm pushes the ovals far enough to reach parts of the United States, Europe and Asia.</p>
<p>Two numbers capture that behavior, and both are published as JSON.</p>
<h2>Endpoint 1, the Planetary Kp Index</h2>
<p><code>https://services.swpc.noaa.gov/products/noaa-planetary-k-index.json</code> returns an array of objects, one per three-hour block over the past several days.</p>
<pre><code class="language-json">{"time_tag":"2026-10-26T00:00:00","Kp":0.33,"a_running":2,"station_count":8}
</code></pre>
<p>Kp runs from 0 to 9 and NOAA counts a geomagnetic storm from Kp 5 upward. The <a href="https://kp-index-explained.carrd.co/">Kp explainer</a> walks through what each step means for the sky. The <code>time_tag</code> is in UTC even though it carries no <code>Z</code>, so parse it with that in mind.</p>
<h2>Endpoint 2, the OVATION Aurora Forecast</h2>
<p><code>https://services.swpc.noaa.gov/json/ovation_aurora_latest.json</code> holds the output of the OVATION model behind NOAA's <a href="https://www.spaceweather.gov/products/aurora-30-minute-forecast">30-minute aurora forecast</a>. The file has four keys, <code>Observation Time</code>, <code>Forecast Time</code>, <code>Data Format</code> and <code>coordinates</code>. Each coordinate is a <code>[Longitude, Latitude, Aurora]</code> triple, one per whole degree.</p>
<pre><code class="language-json">[0, -90, 7], [0, -89, 0], [0, -88, 9]
</code></pre>
<p>The aurora value is an intensity, and NOAA derives a rough viewing probability from it by assuming a linear relationship, so a higher number means a likelier display. The lead time is 30 to 90 minutes, the time the solar wind takes to travel from the L1 observation point to Earth.</p>
<p>One trap is the longitude, which runs from 0 to 359 rather than from -180 to 180. A point at 74 degrees west has to be looked up as 286.</p>
<h2>The Checker</h2>
<p>Node 18 or later has <code>fetch</code> built in, and the same code runs in a browser.</p>
<pre><code class="language-js">const KP_URL = "https://services.swpc.noaa.gov/products/noaa-planetary-k-index.json";
const OVATION_URL = "https://services.swpc.noaa.gov/json/ovation_aurora_latest.json";

async function getJson(url) {
  const res = await fetch(url);
  if (!res.ok) throw new Error(`${url} answered ${res.status}`);
  return res.json();
}

async function latestKp() {
  const rows = await getJson(KP_URL);
  const last = rows[rows.length - 1];
  return { time: last.time_tag, kp: last.Kp, storm: last.Kp &gt;= 5 };
}

async function auroraAt(lat, lon) {
  const data = await getJson(OVATION_URL);
  const x = ((Math.round(lon) % 360) + 360) % 360; // -74 becomes 286
  const y = Math.round(lat);
  const cell = data.coordinates.find(([cx, cy]) =&gt; cx === x &amp;&amp; cy === y);
  return { forecastTime: data["Forecast Time"], aurora: cell ? cell[2] : null };
}

const [kp, spot] = await Promise.all([latestKp(), auroraAt(69.65, 18.96)]);
console.log(`Kp ${kp.kp} at ${kp.time} UTC${kp.storm ? ", geomagnetic storm" : ""}`);
console.log(`Aurora value near Tromsø ${spot.aurora} (forecast for ${spot.forecastTime})`);
</code></pre>
<p>Save it as <code>checker.mjs</code> and run <code>node checker.mjs</code>. Swap the coordinates for your own location.</p>
<h2>Before You Ship It</h2>
<p>The OVATION file holds one value for every whole degree of the globe, so it is worth downloading once and reusing for many lookups rather than fetching it per point. Both files say when they were produced, so compare <code>Forecast Time</code> and the last <code>time_tag</code> with the current time before trusting a cached copy. Finally, a high Kp alone does not promise a show at your location, which is why the checker reads the gridded forecast as well.</p>
]]></content:encoded></item><item><title><![CDATA[What Is Earthquake Magnitude? One Number, Many Scales]]></title><description><![CDATA[Earthquake magnitude is one number for a quake's size. Each whole step means 10 times the amplitude and about 32 times the energy.]]></description><link>https://liveatlas.hashnode.dev/what-is-earthquake-magnitude</link><guid isPermaLink="true">https://liveatlas.hashnode.dev/what-is-earthquake-magnitude</guid><category><![CDATA[Earthquake]]></category><category><![CDATA[geology]]></category><category><![CDATA[Science ]]></category><dc:creator><![CDATA[Live Atlas]]></dc:creator><pubDate>Mon, 02 Nov 2026 11:48:56 GMT</pubDate><content:encoded><![CDATA[<p>Seismologists use earthquake magnitude to express the size of a quake at its source, as one figure calculated from the ground motion that seismometers record.</p>
<img src="https://raw.githubusercontent.com/liveatlasearth/liveatlas-media/main/mb-16-1-chart-of-amplitude-and-energy-per-magnitude-step.jpg" alt="Chart of amplitude and energy per magnitude step" style="display:block;margin:0 auto" />

<p><em>Each whole step in magnitude means 10 times the amplitude and about 32 times the energy (USGS). Three steps add up to about 32,768 times the energy.</em></p>
<p>The arithmetic is logarithmic. On its <a href="https://www.usgs.gov/programs/earthquake-hazards/earthquake-magnitude-energy-release-and-shaking-intensity">page about magnitude, energy release and shaking</a>, the USGS counts each whole-number step as a tenfold rise in the amplitude traced on a seismogram, or roughly 32 times more energy. Each earthquake ends up with a single magnitude, yet several methods can produce it. Richter's original scale, ML, held only for California earthquakes within 600 km of one type of seismograph, and the USGS now keeps it mainly for small local quakes. Its list also names a short-period surface wave magnitude (Mblg) and an energy magnitude (Me).</p>
<p>For larger events the agency prefers moment magnitude, written Mw, as the more accurate measure. It starts from the seismic moment, which multiplies the rigidity of the rock by the area of fault that slipped and by the amount of slip. On that basis, a rupture of the whole San Andreas Fault, about 1,400 km long with some 10 m of slip, would come out near Mw 8.47.</p>
<p>Shaking is measured separately. Intensity changes from town to town, mostly with distance from the rupture, and the United States grades it in Roman numerals on the Modified Mercalli scale.</p>
<p>The gap between two numbers grows fast. <a href="https://medium.com/@nathanridge/a-magnitude-9-2-isnt-a-little-bigger-than-a-7-9-it-s-89-times-bigger-9788196d6ec7">A magnitude 9.2 releases about 89 times more energy than a 7.9</a>, and this <a href="https://quake-lab.lovable.app/">earthquake magnitude calculator</a> runs the same comparison for any two quakes.</p>
]]></content:encoded></item></channel></rss>