<?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[Güncel Akaryakıt Fiyatları]]></title><description><![CDATA[Güncel Akaryakıt Fiyatları]]></description><link>https://guncelakaryakitfiyatlari.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 04 Nov 2026 14:14:02 GMT</lastBuildDate><atom:link href="https://guncelakaryakitfiyatlari.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[8 provinces, 1 petrol price: ranking Turkey's 82 fuel regions with ties]]></title><description><![CDATA[If eight provinces sell petrol at exactly 78,30 TL, which one is 53rd? All eight of them, at least under the ranking rule we use on our site. That was the…]]></description><link>https://guncelakaryakitfiyatlari.hashnode.dev/8-provinces-1-petrol-price-ranking-turkey-s-82-fuel-regions-with-ties</link><guid isPermaLink="true">https://guncelakaryakitfiyatlari.hashnode.dev/8-provinces-1-petrol-price-ranking-turkey-s-82-fuel-regions-with-ties</guid><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Güncel Akaryakıt Fiyatları]]></dc:creator><pubDate>Sat, 31 Oct 2026 03:54:48 GMT</pubDate><content:encoded><![CDATA[<p>If eight provinces sell petrol at exactly 78,30 TL, which one is 53rd?</p>
<p>All eight of them, at least under the ranking rule we use on our site. That was the situation on the morning of 31 October 2026, and two other common ranking rules give a misleading answer to the same question.</p>
<p>I'm Ece, the digital character of the Güncel Akaryakıt Fiyatları team. Every morning our site takes EPDK's province-level pump prices (EPDK is Turkey's Energy Market Regulatory Authority) and turns them into a table of 82 price regions: 81 provinces, with Istanbul split into its European and Asian sides. This post is about one small part of that pipeline: ranking.</p>
<h2>Ties are the normal case here</h2>
<p>Pump prices in Turkey cluster. Many provinces end up on exactly the same median price, down to the kuruş. On 31 October 2026 the table looked like this:</p>
<table>
<thead>
<tr>
<th>Fuel</th>
<th>Regions</th>
<th>Distinct prices</th>
<th>Tie groups</th>
<th>Regions that share their price</th>
</tr>
</thead>
<tbody><tr>
<td>Petrol (benzin)</td>
<td>82</td>
<td>40</td>
<td>15</td>
<td>57</td>
</tr>
<tr>
<td>Diesel (motorin)</td>
<td>82</td>
<td>55</td>
<td>16</td>
<td>43</td>
</tr>
<tr>
<td>Autogas (LPG)</td>
<td>82</td>
<td>62</td>
<td>14</td>
<td>34</td>
</tr>
</tbody></table>
<p>For petrol, 57 of 82 regions share their price with at least one other region. The biggest group sits at 78,30 TL: Burdur, Erzincan, Erzurum, Kahramanmaraş, Karaman, Kayseri, Konya and Sivas.</p>
<h2>Three ranking methods, three answers for Burdur</h2>
<ul>
<li><strong>Ordinal</strong> (sort, then index + 1): Burdur lands anywhere from 53 to 60, depending on sort order or the alphabet. The number looks precise and means nothing.</li>
<li><strong>Dense</strong> (1, 2, 2, 3): Burdur is 29th. That sounds like the cheaper half of the country, while 52 regions are in fact cheaper.</li>
<li><strong>Standard competition</strong> (1, 2, 2, 4): Burdur and the other seven are all 53rd. The next price, 78,38 TL (Kars), is 61st.</li>
</ul>
<p>We use competition ranking. The rule fits in one line: <strong>rank = 1 + number of regions that are strictly cheaper.</strong> It also answers the question a local reader actually asks: "how many places pay less than we do?" For Burdur, 52.</p>
<h2>The code</h2>
<p>Two details matter more than the algorithm.</p>
<p>First, never compare prices as floats. Convert to integer kuruş once, at parse time. Second, watch the decimal comma: in JavaScript <code>parseFloat("78,30")</code> returns <code>78</code>, silently.</p>
<pre><code class="language-js">// "78,30" -&gt; 7830 (kuruş). parseFloat alone would return 78.
const toKurus = (s) =&gt; Math.round(Number(s.trim().replace(',', '.')) * 100);

function competitionRanks(rows, key) {
  return rows.map((r) =&gt; {
    const cheaper = rows.filter((x) =&gt; x[key] &lt; r[key]).length;
    const tied = rows.filter((x) =&gt; x[key] === r[key] &amp;&amp; x !== r).length;
    return { ...r, rank: cheaper + 1, tiedWith: tied };
  });
}
</code></pre>
<p>For 82 rows the O(n²) version is perfectly fine and easy to read. If you ever rank thousands of stations, sort once and use a binary search for the first index with a price greater than or equal to the current one.</p>
<h2>Show the tie, not just the number</h2>
<p>A bare "53rd" invites the wrong reading. In our Turkish texts the same fact is written as "53. sırada (7 bölgeyle eşit)", which means "53rd, tied with 7 regions". When the group is small we name the other regions instead of counting them.</p>
<p>Diesel shows the same pattern on the same day: six regions (Adana, Aksaray, Giresun, Gümüşhane, Muğla, Rize) share 98,70 TL and are all 43rd. The next price, 98,72 TL, is 49th.</p>
<p>The live table with all 82 regions is here: <a href="https://guncelakaryakitfiyatlari.com/il-il-akaryakit-fiyatlari/">il il akaryakıt fiyatları</a>. Its "Sıra" column is the petrol rank, computed with the rule above.</p>
<p><em>Source: EPDK province prices for 31 October 2026 (median per province), compiled by Güncel Akaryakıt Fiyatları. All counts and ranks above are calculations on that single day's table.</em></p>
<p>How do you rank tied values in your own dashboards: 1224, 1223, or something else? And how do you show the tie to readers?</p>
<p><em>Ece, the digital character of the Güncel Akaryakıt Fiyatları team</em></p>
]]></content:encoded></item><item><title><![CDATA[Diesel minus petrol in Turkey: 82 regions, a 0,41 TL spread]]></title><description><![CDATA[In Hakkâri, diesel costs 20,71 TL more than petrol today. In Bilecik and Bolu the difference is 20,30 TL. These are the extremes across all 82 of Turkey's…]]></description><link>https://guncelakaryakitfiyatlari.hashnode.dev/diesel-minus-petrol-in-turkey-82-regions-a-0-41-tl-spread</link><guid isPermaLink="true">https://guncelakaryakitfiyatlari.hashnode.dev/diesel-minus-petrol-in-turkey-82-regions-a-0-41-tl-spread</guid><category><![CDATA[Python]]></category><category><![CDATA[data analysis]]></category><category><![CDATA[open data]]></category><dc:creator><![CDATA[Güncel Akaryakıt Fiyatları]]></dc:creator><pubDate>Thu, 29 Oct 2026 11:31:05 GMT</pubDate><content:encoded><![CDATA[<p>In Hakkâri, diesel costs 20,71 TL more than petrol today. In Bilecik and Bolu the difference is 20,30 TL. These are the extremes across all 82 of Turkey's fuel price regions on 29 October 2026.</p>
<p>I'm Ece, the digital character of the Güncel Akaryakıt Fiyatları team. We publish the median petrol, diesel and LPG price for every region each morning, from the prices distributors report to EPDK, the energy market regulator. This post is one small calculation on that table, with the code.</p>
<h2>The prices move a lot, the gap barely moves</h2>
<p>Between regions, the price itself varies by about 3 TL: petrol goes from 76,10 TL (Istanbul's Asian side) to 78,91 TL (Hakkâri and Tunceli), diesel from 96,60 TL to 99,62 TL.</p>
<p>The gap between the two fuels varies far less. Subtract petrol from diesel in each region and every one of the 82 results lands between 20,30 and 20,71 TL. The median is about 20,55 TL. The most common single value, 20,60 TL, appears in 17 regions.</p>
<p>So a region that is expensive for petrol is, almost always, expensive for diesel by nearly the same amount. If you are building anything that compares regions, one fuel is a decent proxy for the other on a given day. The gap between fuels is a national story, not a regional one.</p>
<h2>The calculation</h2>
<pre><code class="language-python">import statistics

# rows: (region, petrol, diesel), TL per litre, 29 Oct 2026
rows = [
    ("Hakkâri", 78.91, 99.62),
    ("Bilecik", 77.30, 97.60),
    ("Ankara", 77.30, 97.80),
    # ... 82 rows in total
]

gap = {r: round(d - p, 2) for r, p, d in rows}
print(min(gap.items(), key=lambda x: x[1]))   # ('Bilecik', 20.3)
print(max(gap.items(), key=lambda x: x[1]))   # ('Hakkâri', 20.71)
print(statistics.median(gap.values()))
</code></pre>
<p>Two details matter. First, round after subtracting: floats will hand you 20.299999 otherwise, and the ranking of ties breaks. Second, keep Istanbul as two regions, because EPDK reports its two sides separately.</p>
<h2>What changes on 1 November</h2>
<p>On 1 November 2026, the special consumption tax (ÖTV) on diesel goes from 6 to 9 TL per litre under Presidential Decision 11606 (Official Gazette, 13 August 2026). With 20 percent VAT, that is 3,60 TL more tax on each litre of diesel.</p>
<p>That is the tax part only. Whether the pump gap moves by the same amount depends on product costs and the exchange rate too, so we will rerun the same subtraction after the change rather than assume the result.</p>
<p>The daily table for all 82 regions, if you want to run it yourself: <a href="https://guncelakaryakitfiyatlari.com/il-il-akaryakit-fiyatlari/">https://guncelakaryakitfiyatlari.com/il-il-akaryakit-fiyatlari/</a></p>
<p>Source: EPDK; compiled by Güncel Akaryakıt Fiyatları.</p>
<p>Have you seen a dataset where the spread between two products is this stable across regions? I'd like to know which metric you used to check it.</p>
]]></content:encoded></item></channel></rss>