<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>地震情報 - 完全版</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: var(--bg-color, #ffffff);
color: var(--text-color, #000000);
transition: background-color 0.3s, color 0.3s;
}
.container {
max-width: 1200px;
margin: 20px auto;
padding: 20px;
background: var(--card-bg, #ffffff);
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
}
#map {
height: 400px;
margin-top: 20px;
}
.toggle-dark-mode {
position: fixed;
top: 10px;
right: 10px;
padding: 10px;
background: #007BFF;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
@media (max-width: 768px) {
.container {
padding: 10px;
}
}
</style>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
<button class="toggle-dark-mode" onclick="toggleDarkMode()">ダークモード切り替え</button>
<div class="container">
<h1>地震情報</h1>
<div id="quakeStats">
<canvas id="intensityChart" width="400" height="200"></canvas>
</div>
<div id="map"></div>
<div id="regionData"></div>
</div>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
<script>
const rssUrl = 'https://www.jma.go.jp/bosai/quake/data/list.xml';
let quakeData = [];
const regions = {};
const map = L.map('map').setView([35.6895, 139.6917], 5);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© OpenStreetMap contributors'
}).addTo(map);
async function fetchEarthquakeData() {
try {
const response = await fetch(`https://api.allorigins.win/get?url=${encodeURIComponent(rssUrl)}`);
const data = await response.json();
const parser = new DOMParser();
const xmlDoc = parser.parseFromString(data.contents, "text/xml");
const items = xmlDoc.getElementsByTagName('item');
quakeData = [];
for (let i = 0; i < items.length; i++) {
const title = items[i].getElementsByTagName('title')[0].textContent;
const description = items[i].getElementsByTagName('description')[0].textContent;
const pubDate = items[i].getElementsByTagName('pubDate')[0].textContent;
const match = description.match(/震源地:(.+?)、緯度:(.+?)、経度:(.+?)、震度:(.+?)、/);
if (match) {
const location = match[1];
const lat = parseFloat(match[2]);
const lng = parseFloat(match[3]);
const intensity = parseFloat(match[4]);
quakeData.push({ title, location, lat, lng, intensity, pubDate });
if (!regions[location]) {
regions[location] = [];
}
regions[location].push({ intensity, pubDate });
}
}
displayQuakeData();
updateChart();
} catch (error) {
console.error('地震情報の取得に失敗しました:', error);
}
}
function displayQuakeData() {
map.eachLayer(layer => {
if (layer.options && layer.options.pane === "markerPane") {
map.removeLayer(layer);
}
});
quakeData.forEach(quake => {
L.circle([quake.lat, quake.lng], {
color: 'red',
fillColor: '#f03',
fillOpacity: 0.5,
radius: quake.intensity * 10000
}).addTo(map)
.bindPopup(`<strong>${quake.title}</strong><br>震源地: ${quake.location}<br>震度: ${quake.intensity}`);
});
}
function updateChart() {
const ctx = document.getElementById('intensityChart').getContext('2d');
const labels = quakeData.map(q => q.pubDate);
const intensities = quakeData.map(q => q.intensity);
new Chart(ctx, {
type: 'line',
data: {
labels: labels,
datasets: [{
label: '震度',
data: intensities,
borderColor: 'rgba(255, 99, 132, 1)',
borderWidth: 2,
fill: false
}]
}
});
}
function toggleDarkMode() {
const isDarkMode = document.body.style.getPropertyValue('--bg-color') === '#ffffff';
document.body.style.setProperty('--bg-color', isDarkMode ? '#333333' : '#ffffff');
document.body.style.setProperty('--text-color', isDarkMode ? '#ffffff' : '#000000');
document.body.style.setProperty('--card-bg', isDarkMode ? '#444444' : '#ffffff');
}
fetchEarthquakeData();
setInterval(fetchEarthquakeData, 60000); // 1分ごとに更新
</script>
</body>
</html>
Now appreciating that the post did not try to imitate any other style I might recognise, and a stop at amberoakcollective continued that distinct voice, content with its own register rather than borrowed from elsewhere is content with real authorial presence and this site has clearly developed that presence through what feels like patient editorial work.
Reading this with my morning coffee turned into reading the related posts with my morning coffee, and a stop at moderncartfactory stretched the morning further, content that pulls breakfast into a reading session rather than just accompanying it is content that has earned a higher claim on my attention than the average article does.
If quality blog writing is dying as people sometimes claim then this site is one piece of evidence that it has not died yet, and a look at echopetalbazaar extended that evidence, the broader cultural question about online writing has empirical answers in specific sites and this one is contributing to a more optimistic answer overall.
Reading this prompted me to clean up some old notes related to the topic, and a stop at mysticthreadstore extended that organising urge, content that triggers personal organisation rather than just consuming attention is content with motivating energy and this site has the kind of clarity that prompts active follow up rather than passive consumption.
Now wondering how the writers calibrated the level of detail so well, and a stop at elitetrendcenter continued the same calibration, the right level of detail is one of the harder editorial calls in any piece and this site has clearly developed an instinct for it through what I assume is years of careful practice publicly.
Picked a friend mentally as the audience for this and decided to send the link, and a look at frostbaycollective confirmed the send was the right choice, choosing whom to share content with is a small act of curation that I take more seriously than the public sharing most platforms encourage these days online.
Now setting up a small reminder to revisit the site on a slow day, and a stop at mysticoakmarket confirmed the reminder was a good idea, planning return visits is a small organisational act that signals trust in ongoing quality and this site has earned that planned return through consistent performance across the pieces I have read so far.
Liked how the writer used real examples instead of theoretical ones to make the points stick, and a stop at crystalfernstore added even more concrete examples, this is the kind of practical approach that respects readers who actually want to apply what they learn rather than just nodding along passively without doing anything useful.
Reading this prompted me to subscribe to my first newsletter in months, and a stop at frostdunemarket confirmed the subscribe was the right call, content that earns a newsletter signup is content that has cleared a higher trust bar than a casual visit and this site has clearly earned that level of commitment from me.
A memorable post for me on a topic I had thought I was tired of, and a look at stylishgoodsarena suggested the same site can refresh other tired topics, sites that can revive my interest in subjects I had written off as exhausted are doing rare work and this one is clearly doing that for me today.
Got pulled in by the headline and stayed because the content actually delivered on the promise, and a stop at glowforgeessentials kept that trust intact, when a site lives up to its own framing it earns the right to keep showing up in my browser tabs going forward indefinitely from here on out really.
Quietly enjoying that I have found a new site to follow for the topic, and a look at buyloopshop reinforced the small pleasure of the find, the discovery of new high quality sources is one of the more durable pleasures of careful internet reading and this site has been generating that discovery pleasure at multiple points already today.
Just want to flag that this was useful and not bury the appreciation in caveats, and a look at velvetharborgoods earned the same direct praise, recognising good work without hedging it with criticism is something I try to practice because over qualified compliments tend to read as backhanded and miss the point sometimes.
Genuine pleasure to read, and that is not something I say often after a casual click through, and a quick visit to swifttrendhub kept the same feeling going across the rest of the site, finding writing that actually feels good to spend time with rather than just functional is increasingly rare on the open web.
Reading this with a notebook open turned out to be the right move, and a stop at trustedbuyerszone added more material to the notes, content that justifies active note taking from a passive reader is content with real informational density and this site is producing notes worthy material at a high rate consistently.
Picked up two new ideas that I expect will come up in conversations this week, and a look at silverhorizonstore added another, content that arms me with talking points rather than just filling time is the kind that provides ongoing value beyond the moment of reading and this site is generating that kind of ongoing value.
Honest take is that I will probably forget most of what I read online today but this post is one I will remember, and a stop at freshcartcorner kept that same memorable quality going, certain writing leaves a residue in the mind in a way most content simply does not manage.
A small thank you note from me to the team behind this work, the post earned it, and a stop at premiumpickzone suggested more thanks would be in order over time, recognising the people who do good writing online is something I try to remember to do because the alternative is silence and silence rewards mediocrity unfortunately.
The use of plain language without dumbing down the topic was really well done, and a look at dreamwovenbazaar continued in that same accessible style, this is something many technical writers fail at because they either confuse their readers or condescend to them but here neither problem appears at all which is impressive really.
Reading this slowly to absorb the structure, and the structure is doing real work alongside the words, and a look at copperwindessentials maintained the same architectural quality, when sentence shapes and paragraph rhythms reinforce the meaning rather than just transporting words you know you are reading skilled work today.