⚾ Circuits par stade — Baseball Savant (Statcast) · MLB · 2016–2025
Stade HR Dist. Indice xwOBA Ind. xwOBA % G % C % D
Stadr
🎮Jeux
ℹ️À propos
var _HR_TITLES = { fr: '⚾ Circuits par stade — Baseball Savant (Statcast) · MLB · 2016–2025', en: '⚾ Home Runs by Ballpark — Baseball Savant (Statcast) · MLB · 2016–2025', es: '⚾ Jonrones por estadio — Baseball Savant (Statcast) · MLB · 2016–2025' }; var _HR_SUBTITLES = { fr: 'Source : Baseball Savant / Statcast · Matchs à domicile uniquement · Dernière mise à jour : mai 2026', en: 'Source: Baseball Savant / Statcast · Home games only · Last updated: May 2026', es: 'Fuente: Baseball Savant / Statcast · Solo partidos en casa · Última actualización: mayo 2026' }; function updatePageTitle(lg) { var el = document.getElementById('pageTitle'); if (el) el.textContent = _HR_TITLES[lg] || _HR_TITLES['fr']; var sub = document.getElementById('pageSubtitle'); if (sub) sub.textContent = _HR_SUBTITLES[lg] || _HR_SUBTITLES['fr']; } /* Language selector */ function langGlobeToggle(e) { e.stopPropagation(); document.getElementById('langGlobeWrap').classList.toggle('open'); } function langSelect(lg) { localStorage.setItem('lang', lg); document.getElementById('langCurrent').textContent = lg.toUpperCase(); document.querySelectorAll('#langGlobeMenu .lang-btn').forEach(function(b) { b.classList.toggle('active', b.getAttribute('data-lang') === lg); }); document.getElementById('langGlobeWrap').classList.remove('open'); updatePageTitle(lg); document.documentElement.lang = lg; var _md={fr:"Données Statcast sur les circuits pour les 30 stades MLB : indice HR, distance moyenne, vitesse de frappe et répartition par zone, 2016–2025.",en:"Statcast home run data for all 30 MLB stadiums: home run index, average distance, exit velocity and zone breakdown from 2016 to 2025.",es:"Datos Statcast de jonrones en los 30 estadios MLB: índice HR, distancia promedio, velocidad de bateo y distribución por zona, 2016–2025."}; var _me=document.querySelector('meta[name="description"]');if(_me&&_md[lg])_me.setAttribute('content',_md[lg]); } document.addEventListener('click', function() { var w = document.getElementById('langGlobeWrap'); if (w) w.classList.remove('open'); }); (function() { var lg = localStorage.getItem('lang') || 'fr'; document.getElementById('langCurrent').textContent = lg.toUpperCase(); document.querySelectorAll('#langGlobeMenu .lang-btn').forEach(function(b) { b.classList.toggle('active', b.getAttribute('data-lang') === lg); }); updatePageTitle(lg); })(); /* Auth section */ var _sb = null; (function() { var SUPABASE_URL = 'https://bimedfhsdjxdbwnwozzp.supabase.co'; var SUPABASE_ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJpbWVkZmhzZGp4ZGJ3bndvenpwIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzM5NjUxODIsImV4cCI6MjA4OTU0MTE4Mn0.p6ccBlvVaXbw_quuuO1PsJIMkOzd6_PoqhxHSSHFq0E'; if (typeof window.supabase === 'undefined' || !window.supabase.createClient) return; _sb = window.supabase.createClient(SUPABASE_URL, SUPABASE_ANON_KEY); _sb.auth.getSession().then(function(res) { var session = res.data && res.data.session; if (!session) return; var userId = session.user.id; _sb.from('profiles').select('display_name,username,avatar_url').eq('id', userId).single() .then(function(r) { var profile = r.data || {}; var name = profile.display_name || profile.username || session.user.email.split('@')[0]; var avatarUrl = profile.avatar_url; var avatarInner = avatarUrl ? 'avatar' : ''; document.getElementById('authSection').innerHTML = '
' + '
' + avatarInner + '
' + '
' + '
👤 Mon profil
' + '
⚙️ Paramètres
' + '
🚪 Déconnexion
' + '
'; }); }); })(); function toggleUserDropdown(menuElement) { var dropdown = menuElement.querySelector('.user-dropdown'); if (!dropdown) return; dropdown.classList.toggle('open'); setTimeout(function() { document.addEventListener('click', function closeDD(e) { if (!e.target.closest('.user-menu')) { dropdown.classList.remove('open'); document.removeEventListener('click', closeDD); } }); }, 10); } function handleLogout() { if (_sb) _sb.auth.signOut().then(function() { window.location.href = 'login.html'; }); } fetch('js/data/stadiums_hr_data.json') .then(function(r) { return r.json(); }) .then(function(arr) { var HR = {}; arr.forEach(function(d) { HR[d.venue] = d; }); var mlbStades = (typeof STADES !== 'undefined' ? STADES : []).filter(function(s) { return s.league === 'MLB'; }); mlbStades.forEach(function(s) { var d = HR[s.name]; if (d) _rows.push({ stade: s, data: d }); }); buildTable(); }) .catch(function() { document.getElementById('hrBody').innerHTML = 'Données non disponibles'; });