Stargazing in Dominican Republic: Mountains & Coasts

Stargazing in the Dominican Republic changes sharply between the 2,000-metre-plus Cordillera Central and the country’s dry, humid and wind-exposed coasts. The strongest escapes from the Santo Domingo and Santiago light domes are longer moves into high camp country or the protected southwest, while the Atlantic side trades open horizons for more moisture. February–March is the common planning window across eight mountain, basin, dune and coastal locations.

Dominican Republic Stargazing Score
76/100
Selected-location portfolio score
Highest-Rated Location
La Compartición · 85/100
High Cordillera Central camp
Preferred Observing Window
February–March
Dry-season balance with about 9.77 hours of astronomical darkness per night
Locations Assessed
8
Mountains, basin, dunes and three coastal regimes
Strongest Sky Type
High mountain + dry southwest
Cordillera Central elevation and Pedernales remoteness lead for different reasons
Main Atmospheric Risk
Maritime moisture
Most limiting on the humid Samaná side; mountain cloud matters inland
Primary Light-Dome Escape
Pedernales + interior Cordillera Central
The clearest separation from Santo Domingo and Santiago

Dominican Night-Sky Planning Map

The markers cover eight different observing environments, from a 2,450 m mountain camp to dry southwest beaches, low dunes and a humid Atlantic cape.

Each marker is an approximate planning center rather than a parking pin. Mountain camps, protected-area gates, four-wheel-drive tracks and coastal access can operate under different rules, so confirm the responsible park or road authority before an overnight visit.

Dominican Republic Stargazing Suitability Score

76/100

The portfolio pairs high Cordillera camps and plateaus with the dry southwest, an arid northwest coast, the Baní dunes and humid Cabo Samaná. The same seven factor medians and weights are used across all eight locations, which makes the mountain-versus-coast trade-offs visible without rewarding a location simply for being remote. The index is an editorial planning measure for these locations, not a live weather forecast or an automatic statement of night access.

Highest-Rated LocationLa Compartición · 85/100
Preferred Observing WindowFebruary–March
Locations Assessed8
Factor Coverage7/7
Method Version2.2
Comparability QualityC
Score ScopeSelected Location Portfolio

Artificial-Light Escape

30%85/100

Clear-Sky Reliability

20%78/100

Atmospheric Transparency Potential

15%70/100

Astronomical Darkness Duration

10%100/100

Elevation and Horizon Quality

10%85/100

Night Access and Legal Clarity

10%50/100

Dark-Sky Protection and Astronomy Support

5%25/100

Weighted Total: 85×0.30 + 77.5×0.20 + 70×0.15 + 100×0.10 + 85×0.10 + 50×0.10 + 25×0.05 = 76.25 → 76/100

Read the Stargazing Suitability Score methodology

Stargazing Locations: Mountains, Dry Southwest and Atlantic Coasts

Scores use one common February–March window. Search by place or region, or filter by terrain and access pattern.

8 of 8 locations shown

La Compartición

Cordillera Central · La Vega

Location Stargazing Score 85/100Highest-Rated Location
MountainRemotePhotography
Light Escape95/100
Clear Sky70/100
Access85/100

Route logic: Independent roadside observing is not the access model here. The Pico Duarte route uses an official guide, mountain travel and designated camping infrastructure.

  • Official Pico Duarte routes use La Compartición as an overnight camping ground before the upper mountain stages.
  • Geological route documentation places La Compartición at about 2,450 m, giving it the highest sustained elevation in this portfolio.
  • The Cordillera Central setting puts the observing camp well away from the main urban light concentrations on the south and Cibao plains.
  • February–March nights can be cold at this elevation; the Pico Duarte route calls for warm layers and planned camp logistics.

Bahía de las Águilas

Pedernales · Jaragua National Park

Location Stargazing Score 84/100
CoastRemotePhotography
Light Escape95/100
Clear Sky85/100
Access70/100
  • The beach lies inside Jaragua National Park on the far southwest coast, with no hotels, shops or restaurants along the protected beach.
  • An open Caribbean horizon gives photographers broad southern and western sky sectors with little terrain blockage.
  • Official visitor information describes access by all-terrain vehicle or by boat from Cabo Rojo rather than ordinary urban road access.
  • Pedernales sits in the drier southwest, and February–March falls inside the region’s recurring dry-season pattern.

Coastal trade-off: The map point is a bay planning center, not a legal overnight stopping point. Park entry, transport, camping and current protected-area rules need to be settled before a night session.

Valle Nuevo

Constanza · La Vega

Location Stargazing Score 79/100
MountainRemotePhotography
Light Escape85/100
Clear Sky70/100
Access70/100

Valle Nuevo occupies a high Cordillera Central plateau above 2,200 m, with open grassland, pine forest and broad upland terrain.

  • Public access remains under Ministry of Environment management; camping is organized through the Jardín del Edén use area.
  • Constanza’s highland climate can turn sharply colder after sunset than the lowlands.
  • Cloud-forest influence and mountain cloud are the main reason its clear-sky score trails the dry southwest coast.

Access check: Use the official public-use and camping system rather than treating a map marker as an unrestricted pull-off. Check the current park road and camping arrangement before departure.

Las Caritas — Lago Enriquillo

Independencia · Lago Enriquillo National Park

Location Stargazing Score 78/100
Easy AccessPhotographyRemote
Light Escape85/100
Clear Sky85/100
Access50/100

Access first: This is a strong low-elevation southwest alternative, but the attraction and platform are managed sites. Confirm after-hours access and legal stopping before setting up equipment.

  • Las Caritas sits on the cliffs north of Lago Enriquillo beside the main road, with a short stair-and-trail approach to a viewing platform.
  • The platform looks across the Enriquillo basin; the lake surface itself is about 40 m below sea level.
  • The Ministry of Environment describes the Enriquillo region as the driest part of the country, supporting a stronger clear-sky baseline than the humid northeast.
  • The official location record lists protected-area permits, so ordinary daytime access should not be read as automatic overnight permission.

Hoyo de Pelempito

Pedernales · Sierra de Bahoruco

Location Stargazing Score 75/100
MountainRemotePhotography
Light Escape85/100
Clear Sky70/100
Access50/100

The Aceitillar route climbs from the Pedernales lowlands to roughly 1,300 m, crossing dry forest, pine and cloud-forest environments.

  • The viewpoint overlooks a depression more than 700 m deep, creating unusually open terrain sectors for landscape astronomy.
  • Sierra de Bahoruco access uses a protected-area road and four-wheel-drive planning rather than a simple coastal pull-off.
  • Moisture can increase abruptly with elevation even when the nearby Pedernales coast is dry.

Access check: The visitor center and viewpoint are useful orientation landmarks, but their normal visitor function does not establish unrestricted night use. Verify road and protected-area access for the planned night.

El Morro de Montecristi

Monte Cristi · northwest coast

Location Stargazing Score 73/100
CoastEasy AccessPhotography
Light Escape70/100
Clear Sky85/100
Access50/100
  • Montecristi has an arid, warm and sunny climate, making the northwest one of the country’s more dependable dry coastal environments.
  • El Morro rises about 242 m above the coast and opens broad Atlantic views from a distinctive limestone headland.
  • The site remains close enough to San Fernando de Monte Cristi for a noticeable town-side light dome compared with the Pedernales coast.
  • Exposed coastal wind can be more limiting for tripods and telescopes than temperature.

Planning trade-off: Use established public access and legal parking rather than stopping on service or protected-area tracks. Check current park hours if the session extends beyond normal visitor periods.

Dunas de Baní

Peravia · Las Calderas

Location Stargazing Score 71/100
CoastEasy AccessPhotography
Light Escape70/100
Clear Sky85/100
Access25/100
  • The protected dune field stretches for roughly 15 km across the Las Calderas peninsula, and the tallest dunes reach about 35 m.

Protected-area constraint: The low access score reflects managed protected-area use and uncertainty around independent after-hours entry. Confirm current entry rules and avoid assuming that a daytime dune trail stays open at night.

  • The dry subtropical setting and low coastal terrain give broad sky sectors without mountain blockage.
  • Compared with Pedernales, Baní is closer to larger settlements and the Santo Domingo corridor, so regional light has more influence.
  • Protected-area controls and permits are more important here than the apparent ease of reaching the coast.

Cabo Samaná

Samaná · eastern peninsula

Location Stargazing Score 65/100
CoastRemotePhotography
Light Escape70/100
Clear Sky55/100
Access50/100
  • Cabo Samaná projects into the Atlantic at the eastern end of the peninsula, leaving wide sea horizons around a low cape.
  • Samaná’s official climate profile is humid tropical with sea breezes, a different observing environment from dry Montecristi and Pedernales.
  • The cape’s low elevation, about 16 m in open geodata, makes horizon quality the attraction rather than altitude.
  • Maritime humidity, fast cloud development and exposed wind lower the planning score even when local artificial light is limited.

Planning trade-off: The coordinate marks the cape area, not a surveyed parking or observing pad. Confirm the last legal access point and return route before staying after dark.

Cordillera Central Nights: La Compartición or Valle Nuevo?

La Compartición favors committed mountain observers. It is an official overnight point on the Pico Duarte route at about 2,450 m, and the access model already assumes a guide, hiking logistics and a camp night. That makes legal overnight use clearer than at many scenic viewpoints, but reaching it is the largest physical commitment in the portfolio.

Its score leads because the mountain camp combines strong artificial-light escape, high elevation and an established overnight route. February and March still require cold-weather layers; the official Pico Duarte guidance specifically warns hikers to prepare for low temperatures.

Valle Nuevo is the more road-oriented highland option. The park’s upland plains and pine landscapes sit above 2,200 m, and public access remains under Ministry of Environment management. Camping is organized at Jardín del Edén rather than treated as informal dispersed use.

The compromise is cloud. Constanza and Valle Nuevo can be colder and clearer than the lowlands on good nights, yet cloud-forest and orographic cloud can develop around the high terrain. A road-accessible mountain site is therefore not automatically more reliable than the dry Pedernales coast.

Pedernales: Dry Karst Coast Below, Cloud Forest Above

Bahía de las Águilas and Hoyo de Pelempito are close enough to belong to the same southwest planning trip, yet they behave very differently after sunset. The Jaragua coast is low, dry and open toward the Caribbean. The Sierra de Bahoruco road climbs toward Aceitillar and roughly 1,300 m, crossing dry forest, pine forest and cloud-forest zones before reaching the Hoyo de Pelempito viewpoint.

For a telescope or wide-field camera, the coast offers the simpler horizon and the stronger clear-sky score. Hoyo de Pelempito adds elevation and a deep foreground, but moisture and cloud can increase with the climb even while Cabo Rojo remains dry below.

Both are protected landscapes. Bahía de las Águilas is reached by all-terrain vehicle or boat from Cabo Rojo, while the Bahoruco route uses mountain-road access. Night plans should be built around the park’s current entry, road and camping arrangements rather than around the map coordinate alone.

Montecristi and Samaná: Two Atlantic Horizons, Different Air

Coastal choiceClimate signalNight-sky advantageMain constraint
El Morro de MontecristiDry, warm and sunny northwestElevated headland and broad Atlantic sectorsTown-side light dome and exposed wind
Cabo SamanáHumid tropical peninsula with sea breezesLow cape with open Atlantic geometryHumidity, fast cloud and wind

El Morro gains a much higher clear-sky score because the official Montecristi climate profile is dry and sunny. Cabo Samaná’s appeal is geometric rather than atmospheric: the eastern cape opens the horizon, but the Samaná Peninsula carries a humid tropical climate. For long-exposure photography, lens dew and changing cloud deserve more attention on the eastern peninsula.

Leaving Santo Domingo’s Glow: Baní Is the First Step, Not the Darkest Step

Dunas de Baní provides a dry coastal landscape west of Santo Domingo with broad horizons and an unusual foreground, but it still sits closer to the capital corridor and nearby settlements than the Enriquillo basin or Pedernales. Its artificial-light score is therefore lower than Las Caritas, Hoyo de Pelempito and Bahía de las Águilas.

Continuing west changes the night-sky problem from urban escape to access logistics. Around Lago Enriquillo the landscape becomes drier and more sparsely settled; farther south, Jaragua and Sierra de Bahoruco add protected-area roads, gates and transport choices. The best southwest location depends on whether the priority is a legal overnight route, an open sea horizon, high terrain or a shorter approach.

At Las Caritas and the Baní dunes, a visitor attraction that is straightforward by day can still have different after-hours rules. Plan the legal stopping point before sunset and verify protected-area access with the responsible authority.

Mountain vs Coast Decision Matrix

All eight locations are shown in the same score order used by the map and location cards.

LocationScoreLight EscapeClear SkyTarget UseHorizonNight AccessMain Constraint
La Compartición85/10095/10070/100High-altitude camp astronomyHigh mountain, open camp sectors85/100Long guided mountain approach
Bahía de las Águilas84/10095/10085/100Remote coastal astrophotographyOpen Caribbean horizon70/1004×4 or boat access; park rules
Valle Nuevo79/10085/10070/100Highland telescope / landscapeHigh plateau with ridge sectors70/100Mountain cloud; managed camping
Las Caritas — Lago Enriquillo78/10085/10085/100Dry-basin photographyCliff platform over open basin50/100After-hours access clarity
Hoyo de Pelempito75/10085/10070/100Mountain landscape astronomyElevated viewpoint over deep basin50/100Mountain road and cloud
El Morro de Montecristi73/10070/10085/100Dry coastal horizon242 m coastal headland50/100Town light and wind
Dunas de Baní71/10070/10085/100Dune foreground photographyLow dunes with broad coastal sectors25/100Managed protected-area access
Cabo Samaná65/10070/10055/100Atlantic-horizon photographyLow cape with broad Atlantic sectors50/100Humidity, cloud and wind

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 Limits

Preferred Observing Window

February–March

Locations Assessed

8

Method Version

2.2

Comparability Quality

C — several sky, climate and atmosphere inputs use disclosed categorical scoring rather than point instruments or site-specific cloud grids.

Principal Data Periods

Seasonal climate descriptions are long-run destination context; astronomical darkness uses the fixed 1 February–31 March reference window; terrain and protected-area status use standing official records.

Limitations

Local cloud, haze, wind, vegetation and gate conditions can differ from the planning baseline. Check current park, road and access status before travel.

Source Groups

Dominican Ministry of Environment protected-area and access information; Dominican Republic Ministry of Tourism destination and route pages; Dominican Republic Film Commission location records; Dominican Geological Survey route documentation; NOAA solar-position equations; OpenStreetMap-based geodata for map context.

(function(){ “use strict”; var boot=function(){ var root=document.getElementById(“stargaze-in-dominican-republic”); if(!root){return;}var each=function(list,callback){ Array.prototype.forEach.call(list,callback); };var prefersReduced=false; if(typeof window.matchMedia===”function”){ prefersReduced=window.matchMedia(“(prefers-reduced-motion: reduce)”).matches; }var focusCard=function(cardId){ var card=document.getElementById(cardId); if(!card){return;} card.classList.add(“is-highlighted”); if(typeof card.scrollIntoView===”function”){ card.scrollIntoView({behavior:prefersReduced?”auto”:”smooth”,block:”start”}); } window.setTimeout(function(){ card.classList.remove(“is-highlighted”); },1800); };var mapData=[ {name:”La Compartición”,region:”Cordillera Central · La Vega”,lat:19.035519,lng:-70.96182,score:85,raw:84.7500,cardId:”la-comparticion-card”}, {name:”Bahía de las Águilas”,region:”Pedernales · Jaragua National Park”,lat:17.838056,lng:-71.613056,score:84,raw:84.0000,cardId:”bahia-de-las-aguilas-card”}, {name:”Valle Nuevo”,region:”Constanza · La Vega”,lat:18.8000,lng:-70.6823,score:79,raw:79.0000,cardId:”valle-nuevo-card”}, {name:”Las Caritas — Lago Enriquillo”,region:”Independencia · Lago Enriquillo National Park”,lat:18.560278,lng:-71.687778,score:78,raw:77.7500,cardId:”las-caritas-lago-enriquillo-card”}, {name:”Hoyo de Pelempito”,region:”Pedernales · Sierra de Bahoruco”,lat:18.09128,lng:-71.50935,score:75,raw:74.7500,cardId:”hoyo-de-pelempito-card”}, {name:”El Morro de Montecristi”,region:”Monte Cristi · northwest coast”,lat:19.88871,lng:-71.65469,score:73,raw:73.2500,cardId:”el-morro-montecristi-card”}, {name:”Dunas de Baní”,region:”Peravia · Las Calderas”,lat:18.207778,lng:-70.545833,score:71,raw:70.7500,cardId:”dunas-de-bani-card”}, {name:”Cabo Samaná”,region:”Samaná · eastern peninsula”,lat:19.30153,lng:-69.15243,score:65,raw:65.0000,cardId:”cabo-samana-card”} ];var mapElement=document.getElementById(“dsky-map-dominican-republic”); if(!mapElement){return;} var mapRoot=mapElement.closest(“.dsky-page”); if(!mapRoot){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 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(); focusCard(location.cardId); }); popup.appendChild(detail);return popup; };var markers=[]; var bounds=window.L.latLngBounds([]);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.extend([location.lat,location.lng]); });map.fitBounds(bounds,{padding:[32,32],maxZoom:6});var legendButtons=root.querySelectorAll(“.dsky-map-item”); each(legendButtons,function(button){ button.addEventListener(“click”,function(){ var markerIndex=parseInt(button.getAttribute(“data-marker-index”),10); var marker=markers[markerIndex]; 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(“dominican-location-search”); var filterButtons=root.querySelectorAll(“.dsky-filter-btn”); var cards=root.querySelectorAll(“.dsky-spot-card”); var resultCount=root.querySelector(“.dsky-result-count”); var activeTag=”all”;var applyFilters=function(){ var query=””; if(searchInput){ query=searchInput.value.toLowerCase().replace(/^\s+|\s+$/g,””); }var visible=0;each(cards,function(card){ var name=card.getAttribute(“data-name”)||””; var region=card.getAttribute(“data-region”)||””; var tags=card.getAttribute(“data-tags”)||””; var haystack=(name+” “+region+” “+tags).toLowerCase();var queryMatch=query===””?true:haystack.indexOf(query)!==-1; var tagMatch=activeTag===”all”?true:(” “+tags+” “).indexOf(” “+activeTag+” “)!==-1; var show=queryMatch;if(show){ show=tagMatch; }card.hidden=!show;if(show){ visible=visible+1; } });if(resultCount){ resultCount.textContent=String(visible)+” of “+String(cards.length)+” locations shown”; } };if(searchInput){ searchInput.addEventListener(“input”,applyFilters); }each(filterButtons,function(button){ button.addEventListener(“click”,function(){ activeTag=button.getAttribute(“data-filter”)||”all”;each(filterButtons,function(item){ var selected=item===button; item.classList.toggle(“is-active”,selected); item.setAttribute(“aria-pressed”,selected?”true”:”false”); });applyFilters(); }); });var evidenceButtons=root.querySelectorAll(“.dsky-evidence-toggle”);each(evidenceButtons,function(button){ button.addEventListener(“click”,function(){ var panelId=button.getAttribute(“aria-controls”); var panel=document.getElementById(panelId);if(!panel){return;}var isOpen=button.getAttribute(“aria-expanded”)===”true”;if(isOpen){ button.setAttribute(“aria-expanded”,”false”); button.textContent=”View Method, Location Values and Sources”; panel.hidden=true; }else{ button.setAttribute(“aria-expanded”,”true”); button.textContent=”Hide Method, Location Values and Sources”; panel.hidden=false; } }); });var scoreCard=root.querySelector(“.dsky-score-card”);if(scoreCard){ var factorNodes=scoreCard.querySelectorAll(“.dsky-score-factor”); var totalWeight=0; var weightedTotal=0; var formulaParts=[];each(factorNodes,function(node){ var factorScore=Number(node.getAttribute(“data-score”)); var factorWeight=Number(node.getAttribute(“data-weight”));totalWeight=totalWeight+factorWeight; weightedTotal=weightedTotal+(factorScore*(factorWeight/100)); formulaParts.push(String(factorScore)+”×”+(factorWeight/100).toFixed(2));var valueNode=node.querySelector(“.dsky-score-value”); if(valueNode){ valueNode.textContent=String(Math.round(factorScore))+”/100″; }var fill=node.querySelector(“.dsky-bar-fill”); if(fill){ fill.style.width=String(Math.round(factorScore))+”%”; } });if(factorNodes.length===7){ if(totalWeight===100){ var roundedCountry=Math.round(weightedTotal);scoreCard.setAttribute(“data-overall-score”,String(roundedCountry));var countryDisplays=root.querySelectorAll(“[data-country-score-display]”); each(countryDisplays,function(node){ node.textContent=String(roundedCountry); });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”; }scoreCard.setAttribute(“data-score-valid”,”1″); } }var cardMeta=[];each(cards,function(card,index){ var factorValues=[ Number(card.getAttribute(“data-light-score”)), Number(card.getAttribute(“data-clear-score”)), Number(card.getAttribute(“data-atmosphere-score”)), Number(card.getAttribute(“data-darkness-score”)), Number(card.getAttribute(“data-horizon-score”)), Number(card.getAttribute(“data-access-score”)), Number(card.getAttribute(“data-support-score”)) ];var factorWeights=[0.30,0.20,0.15,0.10,0.10,0.10,0.05]; var calculatedRaw=0;factorValues.forEach(function(value,factorIndex){ calculatedRaw=calculatedRaw+(value*factorWeights[factorIndex]); });var storedRaw=card.getAttribute(“data-location-score-raw”); var rawMatches=Number(storedRaw).toFixed(4)===Number(calculatedRaw).toFixed(4); var calculatedScore=Math.round(calculatedRaw);card.setAttribute(“data-location-score”,String(calculatedScore)); card.setAttribute(“data-raw-valid”,rawMatches?”1″:”0″);var scoreNode=card.querySelector(“.dsky-location-score-number”); if(scoreNode){ scoreNode.textContent=String(calculatedScore); }cardMeta.push({ name:card.getAttribute(“data-location-name”)||””, score:calculatedScore, raw:calculatedRaw, card:card, index:index }); });var sortedMeta=cardMeta.slice();sortedMeta.sort(function(a,b){ var scoreDifference=b.score-a.score;if(scoreDifference!==0){ return scoreDifference; }return b.raw-a.raw; });var orderValid=true;sortedMeta.forEach(function(item,index){ var actual=cardMeta[index];if(actual){ if(actual.name!==item.name){ orderValid=false; } }else{ orderValid=false; }var mapItem=mapData[index];if(mapItem){ if(mapItem.name!==item.name){ orderValid=false; } }else{ orderValid=false; }var legendItem=legendButtons[index];if(legendItem){ var legendName=legendItem.querySelector(“.dsky-map-name”);if(legendName){ if(legendName.textContent!==item.name){ orderValid=false; } }else{ orderValid=false; } }else{ orderValid=false; } });root.setAttribute(“data-location-order-valid”,orderValid?”1″:”0″);var topScore=0;if(sortedMeta.length){ topScore=sortedMeta[0].score; }var leaders=sortedMeta.filter(function(item){ return item.score===topScore; });var leaderNames=leaders.map(function(item){ return item.name; });var leaderText=leaderNames.join(” | “);root.setAttribute(“data-best-location”,leaderText); root.setAttribute(“data-best-location-score”,String(topScore)); root.setAttribute(“data-best-location-count”,String(leaders.length));var labelText=leaders.length===1?”Highest-Rated Location”:”Joint Highest-Rated Locations”; var badgeText=leaders.length===1?”Highest-Rated Location”:”Joint Highest-Rated Location”;var bestLabels=root.querySelectorAll(“[data-best-location-label]”); var bestNames=root.querySelectorAll(“[data-best-location-name]”); var bestScores=root.querySelectorAll(“[data-best-location-score]”);each(bestLabels,function(node){ node.textContent=labelText; });each(bestNames,function(node){ node.textContent=leaderNames.join(“, “); });each(bestScores,function(node){ node.textContent=String(topScore); });cardMeta.forEach(function(item){ var isLeader=item.score===topScore; var badge=item.card.querySelector(“.dsky-top-badge”);if(isLeader){ item.card.classList.add(“is-top-location”);if(!badge){ badge=document.createElement(“span”); badge.className=”dsky-top-badge”;var locationScore=item.card.querySelector(“.dsky-location-score”);if(locationScore){ locationScore.appendChild(badge); } }if(badge){ badge.textContent=badgeText; } }else{ item.card.classList.remove(“is-top-location”);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