Panama After Dark: Mountain Highlands, Pacific Islands & Dry-Season Coastal Skies

Stargazing in Panama changes sharply between the Chiriquí and Veraguas highlands, the drier Pacific side of Azuero, and offshore islands where artificial light falls away but marine humidity rises. January–February provides the shared observing window for this nine-location portfolio, aligning the Pacific dry season with roughly 9.8 hours of astronomical darkness per night at these latitudes. The locations range from the 3,474 m summit of Volcán Barú to low coastal and island horizons, so altitude, access and atmospheric moisture matter as much as distance from city light.

Panama Stargazing Score
68/100
Selected-location portfolio score
Highest-Rated Location
Volcán Barú Summit · 79/100
High-altitude horizon and strong light escape
Preferred Observing Window
January–February
Recurring Pacific dry-season window
Locations Assessed
9
Highlands, coast, islands and astronomy facility
Strongest Sky Type
Highland + dry Pacific escape
Altitude inland; open horizons toward the Pacific
Main Atmospheric Risk
Tropical cloud + marine moisture
With localized dry-season smoke risk inland

Panama Night-Sky Planning Map

The marker order follows the location score ranking, from the highest-rated mountain option to the more moisture-limited Santa Fe highland edge.

These pins are planning centers for the named landscapes, not parking coordinates. Protected areas such as Barú, Sarigua, Campana and Coiba have their own entry, gate, camping or boat procedures, so current MiAmbiente and operator rules should be checked before a night plan.

Panama Stargazing Suitability Score

68
/100

Panama’s result comes from nine distinct observing environments spanning Chiriquí and Veraguas highlands, the drier Azuero-Pacific sector, Coclé, and two Pacific island settings. Every location uses the same seven weighted factors, and each country factor is the median of the nine location values. The result is an editorial planning index rather than an official sky classification or live forecast; it does not promise clear weather or lawful night access.

Overall Score68/100
Highest-Rated LocationVolcán Barú Summit · 79/100
Preferred Observing WindowJanuary–February
Locations Assessed9
Factor Coverage7/7
Method Version2.2
Comparability QualityC
Score ScopeSelected Location Portfolio

Artificial-Light Escape

30% 70/100

Clear-Sky Reliability

20% 85/100

Atmospheric Transparency Potential

15% 55/100

Astronomical Darkness Duration

10% 100/100

Elevation and Horizon Quality

10% 70/100
10% 50/100

Dark-Sky Protection and Astronomy Support

5% 0/100

Weighted Total: 70×0.30 + 85×0.20 + 55×0.15 + 100×0.10 + 70×0.10 + 50×0.10 + 0×0.05 = 68.25 → 68/100

Read the Stargazing Suitability Score methodology

Nine Stargazing Locations Across Panama

Search by place name or narrow the portfolio by terrain and access type. Scores use the same seven-factor method as the country result.

9 locations shown

Volcán Barú Summit

Chiriquí · 3,474 m

79/100
Highest-Rated Location
MountainRemotePhotography
Light Escape85
Clear Sky70
Access70
  • Panama’s highest point reaches 3,474 m, giving the portfolio its strongest altitude and horizon advantage.
  • On clear mornings, official tourism information notes that views can extend toward both the Pacific and Caribbean.
  • MiAmbiente publishes controlled early-morning access procedures for the park rather than unrestricted overnight entry.
  • Cloud, wind and fast-changing summit weather remain the main observing constraints despite the elevation.

Main trade-off: Treat the summit as a controlled mountain-access plan, not a roadside night stop. Confirm the current route, reservation and ranger requirements before departure.

La Yeguada Volcanic Uplands

Veraguas · 1,297 m volcanic high point

77/100
MountainRemotePhotography
Light Escape85
Clear Sky85
Access50
  • The forest reserve lies on the Pacific slope of the Cordillera Central, about 60 km from Santiago.
  • Smithsonian’s Global Volcanism Program gives the La Yeguada volcanic complex a high point of 1,297 m.
  • MiAmbiente documents camping and recreation within the reserve, but protected-area procedures still need confirmation for an overnight plan.
  • Vegetation fires and strong dry-season winds are a recurring local smoke and transparency risk.

Main trade-off: The uplands combine strong light escape with a useful dry-season climate signal, but overnight legality, fire conditions and the exact camping area need current confirmation.

Cambutal Pacific Coast

Los Santos · low Pacific coastal terrain

75/100
CoastRemotePhotography
Light Escape85
Clear Sky85
Access70
  • Cambutal sits on the sparsely built Pacific side of the Azuero Peninsula, far from Panama City’s main light dome.
  • Visit Panamá describes the regional dry season as the period of sunnier days, clearer skies and summer breezes.
  • The seaward sector offers a low southern-to-western horizon that suits wide-field sky and landscape photography.
  • Low elevation and direct marine exposure mean humidity and salt-laden haze can still reduce transparency.

Main trade-off: Use a lawful beach, lodging property or public access point rather than treating the planning marker as parking. Local coastal access conditions can vary by property and tide.

UTP Astronomical Observatory, Coclé

Llano Marín, Coclé · university astronomy facility

71/100
ObservatoryTelescopeEasy Access
Light Escape70
Clear Sky85
Access50
  • The Observatorio Astronómico de Panamá operates at the Universidad Tecnológica de Panamá campus in Llano Marín, Coclé.
  • UTP identifies it as Panama’s first astronomical observatory and lists a 14-inch Meade telescope among its equipment.
  • The observatory’s own material describes Llano Marín as a low-light setting used for astronomy outreach and recurring dry-season Astrocamping.
  • Routine guided visits are managed by the university, so facility access should be confirmed rather than assumed after dark.

Main trade-off: This is the strongest astronomy-support location in the portfolio, but it is a managed university facility. Independent nighttime entry is not implied by the marker.

Sarigua National Park

Herrera · low, open Pacific-side terrain

68/100
CoastRemotePhotography
Light Escape70
Clear Sky95
Access0
  • Sarigua’s unusually dry, sparsely vegetated landscape gives it one of the most open horizon profiles in the portfolio.
  • Its Azuero location benefits from Panama’s strongest recurring dry-season signal during January–February.
  • The site is far removed from the capital’s central light dome, although nearby settlements still prevent treating it as a measured dark-sky core.
  • Published protected-area hours are daytime hours, so the park itself receives no independent night-access credit.

Main trade-off: The sky-climate combination is attractive, but a dark landscape does not override park hours. A night plan should use a lawful alternative outside closed park boundaries unless MiAmbiente authorizes otherwise.

Coiba Island

Veraguas · remote Pacific island

67/100
IslandRemoteCoast
Light Escape85
Clear Sky70
Access25
  • Coiba sits well offshore inside a large protected Pacific archipelago, giving it strong separation from major urban lighting.
  • Access is boat-dependent, with official tourism information routing visits through mainland departure points such as Santa Catalina, Pixvae and Puerto Mutis.
  • Marine humidity and tropical cloud remain meaningful transparency constraints even when artificial light is low.
  • Protected-area status limits where and how visitors can stay; remoteness is not the same as open nighttime access.

Main trade-off: Coiba solves the light-pollution problem by distance, but creates a harder logistics problem. Boat timing, protected-area entry and overnight permissions control whether the sky can actually be used.

Contadora Island

Las Perlas, Panamá Province · low island terrain

66/100
IslandCoastEasy Access
Light Escape55
Clear Sky85
Access70
  • Contadora offers a practical island base within the Las Perlas archipelago, with established visitor services and transport links from the capital region.
  • Low coastal terrain provides broad sea horizons without the climbing and road exposure of Panama’s mountain sites.
  • Its easier access comes with more settlement lighting and a stronger regional light influence than remote Coiba.
  • January–February usually sits inside the drier Pacific season, while marine moisture remains an atmospheric limitation.

Main trade-off: Favor a legal beach or accommodation with a clear seaward sector, and check local access rules after dark. The island is easier to reach than Coiba but less isolated from artificial light.

Altos de Campana

Panamá Oeste · foothill and ridge terrain

62/100
MountainPhotographyEasy Access
Light Escape55
Clear Sky70
Access50
  • Altos de Campana rises west of the Panama City metropolitan area and provides elevated viewpoints toward the Pacific side.
  • Its ridge terrain earns a strong horizon score, especially compared with forested lower-elevation sites.
  • Proximity to the capital region keeps artificial-light escape below the western highlands and Azuero coast.
  • MiAmbiente’s published access information requires prior coordination for camping rather than implying unrestricted overnight use.

Main trade-off: The site works best as an elevated city-escape option when park arrangements are clear. Moisture, cloud and the eastern metropolitan glow remain the main trade-offs.

Santa Fe Highland Edge

Veraguas · inland highland edge

59/100
MountainEasy AccessPhotography
Light Escape70
Clear Sky55
Access70
  • Santa Fe is a useful highland base beside a large rainforest national park in central Veraguas.
  • The town-edge setting offers more straightforward lodging and road logistics than remote protected interiors.
  • Rainforest moisture, cloud and tree-lined or ridge-blocked horizons reduce its score relative to the drier Pacific arc.
  • The marker represents the highland planning area rather than an observing point inside undeveloped park terrain.

Main trade-off: For night use, prioritize a lawful open property or roadside setting outside restricted park areas. The main limitation is atmospheric moisture rather than urban light.

Why January–February Favors Panama’s Pacific Dry Arc

The common window is chosen for the full portfolio, not for a single standout site.

Azuero’s Dry-Season Edge

Cambutal and Sarigua sit on Panama’s drier Pacific side, where the recurring dry season brings more sunny periods and summer breezes. That improves the clear-sky reliability proxy in January–February, especially at Sarigua’s open, sparsely vegetated terrain.

Visit Panamá seasonal context for Pedasí and Tonosí

The Central Pacific Uplands

La Yeguada gains both elevation and a stronger dry-season signal than rainforest-facing Santa Fe. The trade-off is not only cloud: MiAmbiente records vegetation-fire episodes in the reserve during the dry season, so smoke and wind can erase an otherwise promising transparent night.

MiAmbiente on La Yeguada fire conditions

Dry Weather Does Not Mean Dry Air Everywhere

Panama remains tropical. Cambutal, Contadora and Coiba can gain cloud-free periods while retaining marine humidity, and the Pacific breeze can carry salt haze. The score therefore separates Clear-Sky Reliability from Atmospheric Transparency Potential rather than treating a dry-season forecast as proof of transparent air.

Barú: 3,474 Metres of Altitude Without a Clear-Sky Shortcut

Volcán Barú leads the portfolio because its summit combines strong light escape, Panama’s best elevation advantage and a broad horizon. Official tourism information places the summit at 3,474 m and notes that, in clear conditions, sight lines can reach both the Pacific Ocean and Caribbean Sea.

That geography is valuable for night-sky planning, but elevation does not remove tropical mountain cloud. Summit wind and rapidly changing weather are why Barú’s Clear-Sky Reliability score remains below the drier Azuero sites even while its atmosphere and horizon scores are much stronger.

The Access Clock Matters

Barú is not scored as unrestricted overnight terrain. MiAmbiente uses controlled access procedures and early-morning entry windows for the summit routes, so an astronomy plan has to fit the park’s current reservation and route rules. Arriving at a map marker after dark is not a substitute for confirmed access.

MiAmbiente: Volcán Barú access notice

Coiba and Contadora Solve Different Island Problems

IslandWhat It SolvesWhat It AddsPlanning Consequence
Coiba IslandStrong separation from urban lighting in a remote Pacific archipelagoBoat dependence, protected-area controls, tropical marine moistureBest for a trip already built around authorized island access; darkness alone does not make it the easiest astronomy choice.
Contadora IslandSea horizons with established visitor services and easier links to the capital regionMore local lighting and stronger regional glow than CoibaBetter for a simpler island stay when a lawful, dark-facing beach or property can be identified.

Official tourism information treats Coiba as a remote protected marine destination reached by boat, while Contadora is part of the more accessible Las Perlas visitor network. That difference explains why Coiba scores higher for light escape but lower for access clarity.

In Panama, the Protected-Area Clock Can Override a Dark Landscape

Sarigua and Campana

Sarigua receives the portfolio’s best clear-sky proxy but an access score of 0 because published protected-area hours are daytime hours. Altos de Campana is less restrictive for an arranged overnight plan: MiAmbiente’s published park information allows camping with prior coordination with park administration. Neither condition should be inferred from darkness maps alone.

Coiba and Barú

Coiba’s isolation is reached through boats and protected-area procedures; Barú’s high summit uses controlled mountain entry. La Yeguada also sits inside a managed forest reserve. For all three, current entry, camping, transport and route status should be confirmed with the responsible authority or operator before equipment is committed to a night session.

Nine Locations on One Panama Baseline

The table keeps the same score order as the map and location cards. The January–February window and factor weights remain identical across all nine locations.

RankLocationScoreLight EscapeClear SkyTarget UseNight AccessMain Constraint
1Volcán Barú Summit79/1008570High-altitude wide-field and horizon workControlled early mountain accessCloud, wind and summit weather
2La Yeguada Volcanic Uplands77/1008585Dark rural highland photographyProtected-area coordinationDry-season smoke and wind
3Cambutal Pacific Coast75/1008585Low-light coastal horizon and Milky Way photographyLawful beach or lodging accessMarine humidity and haze
4UTP Astronomical Observatory, Coclé71/1007085Telescope outreach and public astronomy contextManaged university accessCampus horizon and facility schedule
5Sarigua National Park68/1007095Dry open-horizon landscape planningDaytime park hoursNo routine independent night entry
6Coiba Island67/1008570Remote-island light escapeBoat and protected-area controlsHumidity, cloud and logistics
7Contadora Island66/1005585Accessible island horizonLocal beach or lodging rulesSettlement glow and marine moisture
8Altos de Campana62/1005570Elevated city escape and photographyCamping by prior coordinationMetropolitan glow and cloud
9Santa Fe Highland Edge59/1007055Practical inland highland baseTown-edge lawful accessRainforest moisture and blocked horizons

Tonight’s Astronomical Darkness

Calculated live from each location’s coordinates using NOAA’s public solar-position formula. Weather, cloud cover and local obstructions are not included.

Calculating…

Score Verification and Limitations

Preferred Observing Window

January–February

Locations Assessed

9

Method Version

2.2

Comparability Quality

C

Principal Data Periods

1 January–28 February fixed non-leap solar geometry; recurring Pacific dry-season conditions; normal protected-area and facility access regimes.

Source Groups

MiAmbiente, Visit Panamá, Universidad Tecnológica de Panamá / DINACE, Smithsonian Global Volcanism Program, NOAA solar geometry, and secondary mapping where a primary elevation record was unavailable.

Limitations: Artificial-light escape, clear-sky reliability and atmospheric transparency rely partly on disclosed categorical or environmental proxies; no unsupported SQM, Bortle, extracted point VIIRS, point cloud-cover percentage or point water-vapour value is claimed. Several protected landscapes have access regimes that can change, island transport depends on operators and conditions, and some lower-priority terrain elevations use secondary mapping context. Comparability Quality C reflects those proxy and representation limits rather than a missing factor.

(function(){ “use strict”; var boot=function(){ var pageRoot=document.getElementById(“stargaze-in-panama”); if(!pageRoot){return;} var toArray=function(nodes){return Array.prototype.slice.call(nodes);}; var prefersReduced=false; if(typeof window.matchMedia===”function”){ prefersReduced=window.matchMedia(“(prefers-reduced-motion: reduce)”).matches; } var mapElement=document.getElementById(“dsky-map-panama”); if(!mapElement){return;} var root=mapElement.closest(“.dsky-page”); if(!root){return;} if(root!==pageRoot){return;} if(typeof window.L===”undefined”){return;} if(mapElement.dataset.ready===”1″){ return; } if(mapElement._leaflet_id){ return; } var map=window.L.map(mapElement,{scrollWheelZoom:false,attributionControl:true}); mapElement._dskyMap=map; mapElement.dataset.ready=”1″; if(map.attributionControl){ map.attributionControl.setPrefix(false); } window.L.tileLayer(“https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png”,{ maxZoom:19, attribution:”\u00A9 OpenStreetMap contributors” }).addTo(map); var mapData=[ {name:”Volcán Barú Summit”,region:”Chiriquí · 3,474 m”,score:79,raw:79.25,lat:8.808,lng:-82.543,cardId:”volcan-baru-summit-card”}, {name:”La Yeguada Volcanic Uplands”,region:”Veraguas · 1,297 m volcanic high point”,score:77,raw:76.5,lat:8.47,lng:-80.82,cardId:”la-yeguada-volcanic-uplands-card”}, {name:”Cambutal Pacific Coast”,region:”Los Santos · low Pacific coastal terrain”,score:75,raw:74.75,lat:7.2653,lng:-80.4911,cardId:”cambutal-pacific-coast-card”}, {name:”UTP Astronomical Observatory, Coclé”,region:”Llano Marín, Coclé · university astronomy facility”,score:71,raw:70.5,lat:8.497228,lng:-80.330821,cardId:”utp-astronomical-observatory-cocle-card”}, {name:”Sarigua National Park”,region:”Herrera · low, open Pacific-side terrain”,score:68,raw:67.5,lat:8.024,lng:-80.468,cardId:”sarigua-national-park-card”}, {name:”Coiba Island”,region:”Veraguas · remote Pacific island”,score:67,raw:67.25,lat:7.4693076,lng:-81.7568253,cardId:”coiba-island-card”}, {name:”Contadora Island”,region:”Las Perlas, Panamá Province · low island terrain”,score:66,raw:65.75,lat:8.62727,lng:-79.03702,cardId:”contadora-island-card”}, {name:”Altos de Campana”,region:”Panamá Oeste · foothill and ridge terrain”,score:62,raw:62.25,lat:8.71393,lng:-79.92967,cardId:”altos-de-campana-card”}, {name:”Santa Fe Highland Edge”,region:”Veraguas · inland highland edge”,score:59,raw:59.25,lat:8.5125,lng:-81.07861,cardId:”santa-fe-highland-edge-card”} ]; var createMarkerIcon=function(index){ var markerNode=document.createElement(“span”); markerNode.className=”dsky-marker”; markerNode.setAttribute(“aria-hidden”,”true”); markerNode.textContent=String(index+1); return window.L.divIcon({ className:””, html:markerNode, iconSize:[34,34], iconAnchor:[17,17], popupAnchor:[0,-18] }); }; var createPopup=function(location){ var popup=document.createElement(“div”); popup.className=”dsky-popup”; var name=document.createElement(“strong”); name.textContent=location.name; popup.appendChild(name); popup.appendChild(document.createElement(“br”)); var summary=document.createElement(“span”); summary.textContent=location.region+” · “+location.score+”/100”; popup.appendChild(summary); popup.appendChild(document.createElement(“br”)); var detail=document.createElement(“a”); detail.className=”dsky-popup-detail”; detail.href=”#”+location.cardId; detail.dataset.cardId=location.cardId; detail.textContent=”View Details Below”; detail.addEventListener(“click”,function(event){ event.preventDefault(); var card=document.getElementById(location.cardId); if(!card){return;} card.scrollIntoView({behavior:prefersReduced?”auto”:”smooth”,block:”start”}); card.classList.add(“is-highlighted”); window.setTimeout(function(){ card.classList.remove(“is-highlighted”); },1600); }); popup.appendChild(detail); return popup; }; var markers=[]; var bounds=[]; mapData.forEach(function(location,index){ var marker=window.L.marker([location.lat,location.lng],{ icon:createMarkerIcon(index) }).addTo(map).bindPopup(createPopup(location)); marker.on(“click”,function(){ marker.openPopup(); }); markers.push(marker); bounds.push([location.lat,location.lng]); }); map.fitBounds(bounds,{padding:[32,32],maxZoom:6}); var legendButtons=toArray(pageRoot.querySelectorAll(“.dsky-map-item”)); legendButtons.forEach(function(button){ button.addEventListener(“click”,function(){ var index=Number(button.getAttribute(“data-marker-index”)); var marker=markers[index]; if(marker){ marker.openPopup(); map.panTo(marker.getLatLng()); } }); }); var repairMap=function(){ if(mapElement._dskyMap){ mapElement._dskyMap.invalidateSize(false); } }; window.requestAnimationFrame(function(){ window.requestAnimationFrame(repairMap); }); window.setTimeout(repairMap,250); window.setTimeout(repairMap,1000); window.addEventListener(“resize”,repairMap); if(typeof window.ResizeObserver===”function”){ var mapResizeObserver=new window.ResizeObserver(function(){ repairMap(); }); mapResizeObserver.observe(mapElement); } var searchInput=document.getElementById(“panama-location-search”); var filterButtons=toArray(pageRoot.querySelectorAll(“.dsky-filter-btn”)); var locationCards=toArray(pageRoot.querySelectorAll(“.dsky-spot-card”)); var resultCount=pageRoot.querySelector(“.dsky-result-count”); var activeFilter=”all”; var updateResults=function(){ var needle=””; if(searchInput){ needle=String(searchInput.value).toLowerCase().replace(/^\s+|\s+$/g,””); } var visible=0; locationCards.forEach(function(card){ var nameValue=card.getAttribute(“data-name”); var regionValue=card.getAttribute(“data-region”); var tagsValue=card.getAttribute(“data-tags”); if(nameValue===null){nameValue=””;} if(regionValue===null){regionValue=””;} if(tagsValue===null){tagsValue=””;} var name=String(nameValue).toLowerCase(); var region=String(regionValue).toLowerCase(); var tags=String(tagsValue).toLowerCase(); var haystack=name+” “+region+” “+tags; var textMatch=false; if(needle===””){ textMatch=true; }else{ if(haystack.indexOf(needle)!==-1){ textMatch=true; } } var tagMatch=false; if(activeFilter===”all”){ tagMatch=true; }else{ if(tags.split(” “).indexOf(activeFilter)!==-1){ tagMatch=true; } } var show=false; if(textMatch){ if(tagMatch){ show=true; } } card.hidden=!show; if(show){ visible+=1; } }); if(resultCount){ resultCount.textContent=String(visible)+(visible===1?” location shown”:” locations shown”); } }; filterButtons.forEach(function(button){ button.addEventListener(“click”,function(){ activeFilter=String(button.getAttribute(“data-filter”)); filterButtons.forEach(function(candidate){ var selected=candidate===button; candidate.classList.toggle(“is-active”,selected); candidate.setAttribute(“aria-pressed”,selected?”true”:”false”); }); updateResults(); }); }); if(searchInput){ searchInput.addEventListener(“input”,updateResults); } updateResults(); var evidenceButtons=toArray(pageRoot.querySelectorAll(“.dsky-evidence-toggle”)); evidenceButtons.forEach(function(button){ button.addEventListener(“click”,function(){ var panelId=button.getAttribute(“aria-controls”); var panel=document.getElementById(panelId); if(!panel){return;} var expanded=button.getAttribute(“aria-expanded”)===”true”; panel.hidden=expanded; button.setAttribute(“aria-expanded”,expanded?”false”:”true”); button.textContent=expanded?”View Method, Location Values and Sources”:”Hide Method, Location Values and Sources”; }); }); var scoreCard=pageRoot.querySelector(“.dsky-score-card”); if(scoreCard){ var factorNodes=toArray(scoreCard.querySelectorAll(“.dsky-score-factor”)); if(factorNodes.length===7){ var weightTotal=0; var weightedTotal=0; var formulaParts=[]; factorNodes.forEach(function(factor){ var value=Number(factor.getAttribute(“data-score”)); var weight=Number(factor.getAttribute(“data-weight”)); weightTotal+=weight; weightedTotal+=value*(weight/100); formulaParts.push(String(value)+”×”+(weight/100).toFixed(2)); }); if(weightTotal===100){ var roundedCountry=Math.round(weightedTotal); var storedCountry=Number(scoreCard.getAttribute(“data-overall-score”)); scoreCard.setAttribute(“data-score-validation”,storedCountry===roundedCountry?”ok”:”corrected”); scoreCard.setAttribute(“data-overall-score”,String(roundedCountry)); var scoreNumber=scoreCard.querySelector(“.dsky-score-number”); if(scoreNumber){ scoreNumber.textContent=String(roundedCountry); } toArray(pageRoot.querySelectorAll(“[data-country-score-display]”)).forEach(function(node){ node.textContent=String(roundedCountry); }); toArray(pageRoot.querySelectorAll(“[data-country-score-context]”)).forEach(function(node){ node.textContent=String(roundedCountry)+”/100″; }); var formulaNode=scoreCard.querySelector(“.dsky-weighted-formula”); if(formulaNode){ formulaNode.textContent=formulaParts.join(” + “); } var resultNode=scoreCard.querySelector(“.dsky-weighted-result”); if(resultNode){ resultNode.textContent=weightedTotal.toFixed(2)+” → “+String(roundedCountry)+”/100”; } } } } var locationResults=[]; locationCards.forEach(function(card){ var light=Number(card.getAttribute(“data-light-score”)); var clear=Number(card.getAttribute(“data-clear-score”)); var atmosphere=Number(card.getAttribute(“data-atmosphere-score”)); var darkness=Number(card.getAttribute(“data-darkness-score”)); var horizon=Number(card.getAttribute(“data-horizon-score”)); var access=Number(card.getAttribute(“data-access-score”)); var support=Number(card.getAttribute(“data-support-score”)); var calculatedRaw=(light*0.30)+(clear*0.20)+(atmosphere*0.15)+(darkness*0.10)+(horizon*0.10)+(access*0.10)+(support*0.05); var storedRaw=card.getAttribute(“data-location-score-raw”); var rawMatches=Number(storedRaw).toFixed(4)===Number(calculatedRaw).toFixed(4); var roundedLocation=Math.round(calculatedRaw); var storedLocation=Number(card.getAttribute(“data-location-score”)); card.setAttribute(“data-raw-validation”,rawMatches?”ok”:”mismatch”); card.setAttribute(“data-score-validation”,storedLocation===roundedLocation?”ok”:”corrected”); card.setAttribute(“data-location-score”,String(roundedLocation)); var visibleScore=card.querySelector(“.dsky-location-score-number”); if(visibleScore){ visibleScore.textContent=String(roundedLocation); } locationResults.push({ card:card, name:String(card.getAttribute(“data-location-name”)), score:roundedLocation, raw:calculatedRaw }); }); var expected=locationResults.slice().sort(function(a,b){ var scoreDiff=b.score-a.score; if(scoreDiff!==0){ return scoreDiff; } return b.raw-a.raw; }); var orderValid=true; expected.forEach(function(item,index){ var actual=locationResults[index]; if(!actual){ orderValid=false; }else{ if(actual.card.id!==item.card.id){ orderValid=false; } } var mapItem=mapData[index]; if(!mapItem){ orderValid=false; }else{ if(mapItem.name!==item.name){ orderValid=false; } if(mapItem.score!==item.score){ orderValid=false; } } var legendItem=legendButtons[index]; if(!legendItem){ orderValid=false; }else{ if(legendItem.getAttribute(“data-location-name”)!==item.name){ orderValid=false; } if(legendItem.getAttribute(“data-marker-index”)!==String(index)){ orderValid=false; } } }); pageRoot.setAttribute(“data-location-order-valid”,orderValid?”1″:”0″); if(expected.length===0){ return; } var highestScore=expected[0].score; var topItems=expected.filter(function(item){ return item.score===highestScore; }); var topNames=topItems.map(function(item){ return item.name; }); pageRoot.setAttribute(“data-best-location”,topNames.join(” | “)); pageRoot.setAttribute(“data-best-location-score”,String(highestScore)); pageRoot.setAttribute(“data-best-location-count”,String(topItems.length)); var leaderLabel=topItems.length===1?”Highest-Rated Location”:”Joint Highest-Rated Locations”; toArray(pageRoot.querySelectorAll(“[data-best-location-label]”)).forEach(function(node){ node.textContent=leaderLabel; }); toArray(pageRoot.querySelectorAll(“[data-best-location-name]”)).forEach(function(node){ node.textContent=topNames.join(“, “); }); toArray(pageRoot.querySelectorAll(“[data-best-location-score]”)).forEach(function(node){ node.textContent=String(highestScore); }); locationCards.forEach(function(card){ var isTop=topItems.some(function(item){ return item.card===card; }); card.classList.toggle(“is-top-location”,isTop); var badge=card.querySelector(“.dsky-top-badge”); if(isTop){ if(!badge){ badge=document.createElement(“span”); badge.className=”dsky-top-badge”; var topArea=card.querySelector(“.dsky-spot-top”); if(topArea){ topArea.appendChild(badge); } } if(badge){ badge.textContent=leaderLabel===”Highest-Rated Location”?”Highest-Rated Location”:”Joint Highest-Rated Location”; } }else{ if(badge){ if(badge.parentNode){ badge.parentNode.removeChild(badge); } } } }); }; if(document.readyState===”loading”){ document.addEventListener(“DOMContentLoaded”,boot,{once:true}); }else{ boot(); } })();
📌

Complete guide: Stargazing Countries

Scroll to Top