Spaces:
Running
Running
please make me a professional cool visualization of the data which needs to show the consumption in tables and graphics next to each other per year and per month , what is fixed and what is not fixed , showiung thge type of gas TTF Future product they want to procure and how tghis chnages after procurement the percentage covered/ hedged befoer and after : Volume product
5713137 verified Download index.html from OFree/quaker-multitif-applied: direct link, hf CLI and curl.
- Browser
- Download file 19.1 kB
-
https://huggingface.co/spaces/OFree/quaker-multitif-applied/resolve/main/index.html
- Command line
-
hf download hf://spaces/OFree/quaker-multitif-applied/index.html
-
curl -L -o index.html https://huggingface.co/spaces/OFree/quaker-multitif-applied/resolve/main/index.html
19.1 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Gas Consumption Dashboard</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet"> | |
| <script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <style> | |
| .scrollbar-hide::-webkit-scrollbar { | |
| display: none; | |
| } | |
| .scrollbar-hide { | |
| -ms-overflow-style: none; | |
| scrollbar-width: none; | |
| } | |
| .gradient-bg { | |
| background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); | |
| } | |
| .chart-container { | |
| position: relative; | |
| height: 100%; | |
| width: 100%; | |
| } | |
| .data-table { | |
| font-size: 0.85rem; | |
| } | |
| .data-table th, .data-table td { | |
| padding: 0.5rem; | |
| text-align: right; | |
| } | |
| .data-table th:first-child, .data-table td:first-child { | |
| text-align: left; | |
| } | |
| .highlight-cell { | |
| background-color: rgba(56, 178, 172, 0.2); | |
| font-weight: 600; | |
| } | |
| </style> | |
| </head> | |
| <body class="gradient-bg min-h-screen font-sans"> | |
| <div class="container mx-auto px-4 py-8"> | |
| <!-- Header --> | |
| <header class="mb-8"> | |
| <h1 class="text-3xl font-bold text-gray-800">Gas Consumption Analysis Dashboard</h1> | |
| <p class="text-gray-600">TTF Future Product Procurement & Hedging Strategy</p> | |
| </header> | |
| <!-- Year Selection --> | |
| <div class="flex justify-center mb-8"> | |
| <div class="inline-flex rounded-md shadow-sm" role="group"> | |
| <button type="button" onclick="showYear(2025)" class="year-btn px-4 py-2 text-sm font-medium rounded-l-lg border border-gray-300 bg-white text-gray-700 hover:bg-gray-50 focus:z-10 focus:ring-2 focus:ring-teal-500"> | |
| 2025 | |
| </button> | |
| <button type="button" onclick="showYear(2026)" class="year-btn px-4 py-2 text-sm font-medium border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-50 focus:z-10 focus:ring-2 focus:ring-teal-500"> | |
| 2026 | |
| </button> | |
| <button type="button" onclick="showYear(2027)" class="year-btn px-4 py-2 text-sm font-medium rounded-r-lg border border-gray-300 bg-white text-gray-700 hover:bg-gray-50 focus:z-10 focus:ring-2 focus:ring-teal-500"> | |
| 2027 | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Dashboard Content --> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-8"> | |
| <!-- Left Column - Charts --> | |
| <div class="space-y-8"> | |
| <!-- Volume Chart --> | |
| <div class="bg-white rounded-xl shadow-md p-6"> | |
| <h2 class="text-xl font-semibold text-gray-800 mb-4">Monthly Consumption (MWh)</h2> | |
| <div class="chart-container"> | |
| <canvas id="volumeChart"></canvas> | |
| </div> | |
| </div> | |
| <!-- Hedging Chart --> | |
| <div class="bg-white rounded-xl shadow-md p-6"> | |
| <h2 class="text-xl font-semibold text-gray-800 mb-4">Hedging Coverage (%)</h2> | |
| <div class="chart-container"> | |
| <canvas id="hedgeChart"></canvas> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Right Column - Data Tables --> | |
| <div class="space-y-8"> | |
| <!-- Fixed vs Non-Fixed Table --> | |
| <div class="bg-white rounded-xl shadow-md p-6"> | |
| <h2 class="text-xl font-semibold text-gray-800 mb-4">Fixed vs Non-Fixed Consumption</h2> | |
| <div class="overflow-x-auto scrollbar-hide"> | |
| <table class="data-table w-full"> | |
| <thead> | |
| <tr class="border-b border-gray-200"> | |
| <th class="text-left">Month</th> | |
| <th>Fixed (MWh)</th> | |
| <th>Non-Fixed (MWh)</th> | |
| <th>Total (MWh)</th> | |
| <th>% Fixed</th> | |
| </tr> | |
| </thead> | |
| <tbody id="fixedTableBody"> | |
| <!-- Data will be inserted here by JavaScript --> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- Procurement Impact Table --> | |
| <div class="bg-white rounded-xl shadow-md p-6"> | |
| <h2 class="text-xl font-semibold text-gray-800 mb-4">Procurement Impact Analysis</h2> | |
| <div class="overflow-x-auto scrollbar-hide"> | |
| <table class="data-table w-full"> | |
| <thead> | |
| <tr class="border-b border-gray-200"> | |
| <th class="text-left">Quarter</th> | |
| <th>TTF Volume (MWh)</th> | |
| <th>Target Price (€)</th> | |
| <th>Hedged Before (%)</th> | |
| <th>Hedged After (%)</th> | |
| <th>Change (%)</th> | |
| </tr> | |
| </thead> | |
| <tbody id="procurementTableBody"> | |
| <!-- Data will be inserted here by JavaScript --> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Summary Cards --> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mt-8"> | |
| <div class="bg-white rounded-xl shadow-md p-6"> | |
| <div class="flex items-center"> | |
| <div class="p-3 rounded-full bg-teal-100 text-teal-600 mr-4"> | |
| <i data-feather="dollar-sign"></i> | |
| </div> | |
| <div> | |
| <p class="text-sm text-gray-500">Total Volume (MWh)</p> | |
| <h3 class="text-2xl font-bold text-gray-800" id="totalVolume">10,405.04</h3> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-md p-6"> | |
| <div class="flex items-center"> | |
| <div class="p-3 rounded-full bg-blue-100 text-blue-600 mr-4"> | |
| <i data-feather="shield"></i> | |
| </div> | |
| <div> | |
| <p class="text-sm text-gray-500">Average Hedging (%)</p> | |
| <h3 class="text-2xl font-bold text-gray-800" id="avgHedging">64.43</h3> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-md p-6"> | |
| <div class="flex items-center"> | |
| <div class="p-3 rounded-full bg-purple-100 text-purple-600 mr-4"> | |
| <i data-feather="trending-up"></i> | |
| </div> | |
| <div> | |
| <p class="text-sm text-gray-500">TTF Volume (MWh)</p> | |
| <h3 class="text-2xl font-bold text-gray-800" id="ttfVolume">1,692.07</h3> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // Initialize AOS and Feather Icons | |
| AOS.init(); | |
| feather.replace(); | |
| // Data for different years | |
| const data = { | |
| 2025: { | |
| months: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'], | |
| fixed: [446.66486, 403.44238, 446.06889, 432.26388, 446.66486, 432.26388, 529.32883, 529.32883, 512.25087, 794.24238, 767.58982, 793.17745], | |
| nonFixed: [682.16094, 588.20285, 545.98668, 415.50833, 336.75236, 321.66748, 139.66215, 86.09324, 166.9693, 77.89621, 208.69697, 302.15679], | |
| total: [1128.8258, 991.64523, 992.05557, 847.77221, 783.41722, 753.93136, 668.99098, 615.42207, 679.22017, 872.13859, 976.28679, 1095.33424], | |
| hedgePercent: [39.57, 40.68, 44.96, 50.99, 57.01, 57.33, 79.12, 86.01, 75.42, 91.07, 78.62, 72.41], | |
| procurement: [ | |
| { quarter: 'Q1', volume: 16923.07, price: 35.33, before: 40, after: 82.00, change: 42.00 }, | |
| { quarter: 'Q4', volume: 12317.29, price: 34.31, before: 30, after: 92.33, change: 62.33 } | |
| ] | |
| }, | |
| 2026: { | |
| months: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'], | |
| fixed: [446.66486, 403.44238, 446.06889, 432.26388, 446.66486, 432.26388, 442.03388, 446.66486, 432.26388, 447.2706, 432.26388, 446.66486], | |
| nonFixed: [682.16094, 588.20285, 545.98668, 415.50833, 336.75236, 321.66748, 304.78492, 238.71041, 253.9223, 425.99154, 538.64941, 606.85378], | |
| total: [1128.8258, 991.64523, 992.05557, 847.77221, 783.41722, 753.93136, 746.8188, 685.37527, 686.18618, 873.26214, 970.91329, 1053.51864], | |
| hedgePercent: [39.57, 40.68, 44.96, 50.99, 57.01, 57.33, 59.19, 65.17, 63.00, 51.22, 44.52, 42.40], | |
| procurement: [ | |
| { quarter: 'Q1', volume: 16923.07, price: 35.33, before: 40, after: 88.99, change: 48.99 }, | |
| { quarter: 'Q4', volume: 12317.29, price: 34.31, before: 30, after: 81.50, change: 51.50 } | |
| ] | |
| }, | |
| 2027: { | |
| months: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'], | |
| fixed: [359, 359, 359, 166, 166, 166, 0, 0, 0, 0, 0, 0], | |
| nonFixed: [769.8258, 632.64523, 633.05557, 681.77221, 617.41722, 587.93136, 746.8188, 685.37527, 686.18618, 873.26214, 970.91329, 1053.51864], | |
| total: [1128.8258, 991.64523, 992.05557, 847.77221, 783.41722, 753.93136, 746.8188, 685.37527, 686.18618, 873.26214, 970.91329, 1053.51864], | |
| hedgePercent: [31.80, 36.20, 36.19, 19.58, 21.19, 22.02, 0, 0, 0, 0, 0, 0], | |
| procurement: [ | |
| { quarter: 'Q1', volume: 12647.57, price: 35.23, before: 30, after: 36.19, change: 6.19 }, | |
| { quarter: 'Q2', volume: 5210.74, price: 31.39, before: 20, after: 21.19, change: 1.19 } | |
| ] | |
| } | |
| }; | |
| // Chart instances | |
| let volumeChart, hedgeChart; | |
| // Initialize dashboard with 2025 data | |
| document.addEventListener('DOMContentLoaded', function() { | |
| showYear(2025); | |
| // Set active button | |
| document.querySelectorAll('.year-btn')[0].classList.remove('bg-white'); | |
| document.querySelectorAll('.year-btn')[0].classList.add('bg-teal-500', 'text-white'); | |
| }); | |
| // Show data for selected year | |
| function showYear(year) { | |
| const yearData = data[year]; | |
| // Update summary cards | |
| document.getElementById('totalVolume').textContent = yearData.total.reduce((a, b) => a + b, 0).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
| document.getElementById('avgHedging').textContent = (yearData.hedgePercent.reduce((a, b) => a + b, 0) / yearData.hedgePercent.length).toFixed(2); | |
| document.getElementById('ttfVolume').textContent = yearData.procurement.reduce((a, b) => a + b.volume, 0).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
| // Update fixed vs non-fixed table | |
| const fixedTableBody = document.getElementById('fixedTableBody'); | |
| fixedTableBody.innerHTML = ''; | |
| yearData.months.forEach((month, index) => { | |
| const row = document.createElement('tr'); | |
| row.className = index % 2 === 0 ? 'bg-gray-50' : 'bg-white'; | |
| row.innerHTML = ` | |
| <td class="font-medium">${month}</td> | |
| <td>${yearData.fixed[index].toFixed(2)}</td> | |
| <td>${yearData.nonFixed[index].toFixed(2)}</td> | |
| <td class="font-semibold">${yearData.total[index].toFixed(2)}</td> | |
| <td class="${yearData.hedgePercent[index] > 50 ? 'text-teal-600 font-semibold' : 'text-gray-600'}">${yearData.hedgePercent[index].toFixed(2)}%</td> | |
| `; | |
| fixedTableBody.appendChild(row); | |
| }); | |
| // Update procurement table | |
| const procurementTableBody = document.getElementById('procurementTableBody'); | |
| procurementTableBody.innerHTML = ''; | |
| yearData.procurement.forEach((item, index) => { | |
| const row = document.createElement('tr'); | |
| row.className = index % 2 === 0 ? 'bg-gray-50' : 'bg-white'; | |
| row.innerHTML = ` | |
| <td class="font-medium">${item.quarter}</td> | |
| <td>${item.volume.toFixed(2)}</td> | |
| <td>€${item.price.toFixed(2)}</td> | |
| <td>${item.before}%</td> | |
| <td class="${item.after > item.before ? 'text-teal-600' : 'text-gray-600'} font-semibold">${item.after}%</td> | |
| <td class="${item.change > 0 ? 'text-teal-600' : 'text-gray-600'} font-semibold">${item.change > 0 ? '+' : ''}${item.change.toFixed(2)}%</td> | |
| `; | |
| procurementTableBody.appendChild(row); | |
| }); | |
| // Update charts | |
| updateCharts(yearData); | |
| // Update active button | |
| document.querySelectorAll('.year-btn').forEach(btn => { | |
| btn.classList.remove('bg-teal-500', 'text-white'); | |
| btn.classList.add('bg-white'); | |
| }); | |
| document.querySelectorAll('.year-btn')[year - 2025].classList.remove('bg-white'); | |
| document.querySelectorAll('.year-btn')[year - 2025].classList.add('bg-teal-500', 'text-white'); | |
| } | |
| // Update charts with new data | |
| function updateCharts(yearData) { | |
| // Destroy existing charts if they exist | |
| if (volumeChart) volumeChart.destroy(); | |
| if (hedgeChart) hedgeChart.destroy(); | |
| // Volume Chart | |
| const volumeCtx = document.getElementById('volumeChart').getContext('2d'); | |
| volumeChart = new Chart(volumeCtx, { | |
| type: 'bar', | |
| data: { | |
| labels: yearData.months, | |
| datasets: [ | |
| { | |
| label: 'Fixed Volume (MWh)', | |
| data: yearData.fixed, | |
| backgroundColor: 'rgba(56, 178, 172, 0.7)', | |
| borderColor: 'rgba(56, 178, 172, 1)', | |
| borderWidth: 1 | |
| }, | |
| { | |
| label: 'Non-Fixed Volume (MWh)', | |
| data: yearData.nonFixed, | |
| backgroundColor: 'rgba(229, 231, 235, 0.7)', | |
| borderColor: 'rgba(156, 163, 175, 1)', | |
| borderWidth: 1 | |
| } | |
| ] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| scales: { | |
| y: { | |
| beginAtZero: true, | |
| title: { | |
| display: true, | |
| text: 'MWh' | |
| } | |
| } | |
| }, | |
| plugins: { | |
| tooltip: { | |
| callbacks: { | |
| afterBody: function(context) { | |
| const dataIndex = context[0].dataIndex; | |
| return `Total: ${yearData.total[dataIndex].toFixed(2)} MWh`; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Hedging Chart | |
| const hedgeCtx = document.getElementById('hedgeChart').getContext('2d'); | |
| hedgeChart = new Chart(hedgeCtx, { | |
| type: 'line', | |
| data: { | |
| labels: yearData.months, | |
| datasets: [{ | |
| label: 'Hedging Coverage (%)', | |
| data: yearData.hedgePercent, | |
| fill: false, | |
| backgroundColor: 'rgba(99, 102, 241, 0.7)', | |
| borderColor: 'rgba(99, 102, 241, 1)', | |
| borderWidth: 2, | |
| tension: 0.3, | |
| pointBackgroundColor: 'rgba(99, 102, 241, 1)', | |
| pointRadius: 4, | |
| pointHoverRadius: 6 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| scales: { | |
| y: { | |
| beginAtZero: true, | |
| max: 100, | |
| title: { | |
| display: true, | |
| text: 'Percentage (%)' | |
| } | |
| } | |
| }, | |
| plugins: { | |
| annotation: { | |
| annotations: { | |
| line1: { | |
| type: 'line', | |
| yMin: 50, | |
| yMax: 50, | |
| borderColor: 'rgba(239, 68, 68, 0.7)', | |
| borderWidth: 1, | |
| borderDash: [6, 6], | |
| label: { | |
| content: '50% Target', | |
| enabled: true, | |
| position: 'right' | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| } | |
| </script> | |
| </body> | |
| </html> | |