Skip to content

Commit ee2ed4b

Browse files
Aric ChokeyAric Chokey
authored andcommitted
Fix inconsistent geocoding
1 parent 9fc901d commit ee2ed4b

3 files changed

Lines changed: 23 additions & 17 deletions

File tree

src/routes/projects/tegna-nexstar-map/+page.svelte

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
attribution: "© OpenStreetMap contributors",
4545
},
4646
).addTo(map);
47+
map.createPane("overlapPane");
48+
map.getPane("overlapPane").style.zIndex = "650";
4749
4850
// Load stations data
4951
tegnaLayer = L.layerGroup();
@@ -87,7 +89,11 @@
8789
.addTo(nexstarLayer);
8890
}
8991
for (const p of data.overlap) {
90-
L.marker([p.lat, p.lng], {icon: overlapIcon})
92+
L.marker([p.lat, p.lng], {
93+
icon: overlapIcon,
94+
pane: "overlapPane",
95+
zIndexOffset: 1000,
96+
})
9197
.bindPopup(
9298
`<strong>${p.cityState}</strong><br/><br/>` +
9399
`TEGNA: ${p.tegnaCallSigns}<br/>` +
@@ -105,7 +111,7 @@
105111
<p class="text-lg mt-4">
106112
Following the March merger of TEGNA and Nexstar, I was curious about the
107113
scope of the merger, where each company has stations and news markets
108-
where the companies overlap. The data in the map represents station ownership pre-merger.
114+
where the companies overlap.
109115
</p>
110116

111117
<section class="mt-10">
@@ -146,7 +152,7 @@
146152

147153
<section>
148154
<h2 class="text-2xl font-bold mt-12 space-y-4">Data sources</h2>
149-
<p>Data comes from <a href="https://www.nexstar.tv/stations/" target="_blank">Nexstar's station map</a> and <a href="https://web.archive.org/web/20260320005639/https://www.tegna.com/brands/" target="_blank">TEGNA's now-defunct map of its brands</a>. Cities are not geocoded according to their exact location, but only to the city they are listed as being located in. Cities were geocoded with data from <a href="https://simplemaps.com/data/us-cities">Simplemaps.com</a>.</p>
155+
<p>The data in the map represents station ownership pre-merger and comes from <a href="https://www.nexstar.tv/stations/" target="_blank">Nexstar's station map</a> and <a href="https://web.archive.org/web/20260320005639/https://www.tegna.com/brands/" target="_blank">TEGNA's now-defunct map of its brands</a>. Cities are not geocoded according to their exact location, but only to the city they are listed as being located in. Cities were geocoded with data from <a href="https://simplemaps.com/data/us-cities">Simplemaps.com</a>.</p>
150156
</section>
151157
</main>
152158

src/routes/projects/tegna-nexstar-map/overlap_markets.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
},
2323
{
2424
"city_state": "Charlotte, NC",
25-
"lat": 35.227209,
25+
"lat": 35.2083,
2626
"long": -80.8303,
2727
"nexstar_call_signs": "WJZY, WMYT",
2828
"tegna_call_signs": "WCNC"
2929
},
3030
{
3131
"city_state": "Cleveland, OH",
32-
"lat": 41.499657,
32+
"lat": 41.4764,
3333
"long": -81.6805,
3434
"nexstar_call_signs": "WJW",
3535
"tegna_call_signs": "WKYC"
@@ -57,7 +57,7 @@
5757
},
5858
{
5959
"city_state": "Des Moines, IA",
60-
"lat": 41.586865,
60+
"lat": 41.5725,
6161
"long": -93.6105,
6262
"nexstar_call_signs": "WHO",
6363
"tegna_call_signs": "KCWI, WOI"
@@ -78,14 +78,14 @@
7878
},
7979
{
8080
"city_state": "Harrisburg, PA",
81-
"lat": 40.266311,
81+
"lat": 40.2752,
8282
"long": -76.8843,
8383
"nexstar_call_signs": "WHTM",
8484
"tegna_call_signs": "WPMT"
8585
},
8686
{
8787
"city_state": "Hartford, CT",
88-
"lat": 41.41281,
88+
"lat": 41.7661,
8989
"long": -72.6834,
9090
"nexstar_call_signs": "WCTX",
9191
"tegna_call_signs": "WCCT, WTIC"
@@ -99,7 +99,7 @@
9999
},
100100
{
101101
"city_state": "Huntsville, AL",
102-
"lat": 34.729847,
102+
"lat": 34.6981,
103103
"long": -86.6412,
104104
"nexstar_call_signs": "WHDF, WHNT",
105105
"tegna_call_signs": "WZDX"
@@ -155,7 +155,7 @@
155155
},
156156
{
157157
"city_state": "Norfolk, VA",
158-
"lat": 36.84937,
158+
"lat": 36.8945,
159159
"long": -76.259,
160160
"nexstar_call_signs": "WAVY, WVBT",
161161
"tegna_call_signs": "WVEC"
@@ -176,14 +176,14 @@
176176
},
177177
{
178178
"city_state": "Portland, OR",
179-
"lat": 45.520247,
179+
"lat": 45.5371,
180180
"long": -122.65,
181181
"nexstar_call_signs": "KOIN, KRCW",
182182
"tegna_call_signs": "KGW"
183183
},
184184
{
185185
"city_state": "Sacramento, CA",
186-
"lat": 38.581061,
186+
"lat": 38.5677,
187187
"long": -121.4685,
188188
"nexstar_call_signs": "KTXL",
189189
"tegna_call_signs": "KXTV"
@@ -225,14 +225,14 @@
225225
},
226226
{
227227
"city_state": "Waco, TX",
228-
"lat": 31.54919,
228+
"lat": 31.5599,
229229
"long": -97.1882,
230230
"nexstar_call_signs": "KWKT",
231231
"tegna_call_signs": "KCEN"
232232
},
233233
{
234234
"city_state": "Washington, DC",
235-
"lat": 38.895037,
235+
"lat": 38.9047,
236236
"long": -77.0163,
237237
"nexstar_call_signs": "WDCW, WDVM",
238238
"tegna_call_signs": "WUSA"

src/routes/projects/tegna-nexstar-map/tegna_stations.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{
1515
"call_signs": "KVUE",
1616
"city_state": "Austin, TX",
17-
"lat": 30.3005,
17+
"lat": 30.271129,
1818
"lng": -97.7522
1919
},
2020
{
@@ -116,7 +116,7 @@
116116
{
117117
"call_signs": "WFMY",
118118
"city_state": "Greensboro, NC",
119-
"lat": 36.0956,
119+
"lat": 36.072635,
120120
"lng": -79.8271
121121
},
122122
{
@@ -134,7 +134,7 @@
134134
{
135135
"call_signs": "KHOU, KTBU",
136136
"city_state": "Houston, TX",
137-
"lat": 29.786,
137+
"lat": 29.758938,
138138
"lng": -95.3885
139139
},
140140
{

0 commit comments

Comments
 (0)