In advance of Monday's solar eclipse, a SAS ODS Graphics map of the locations in Architectural Digest's Where to See the Solar Eclipse: The 13 Best Cities to Watch the Event. Happy viewing, all!
* Fun With SAS ODS Graphics: Mr. Sun, Mr. Moon (Best Cities for Eclipse Viewing)
Data source: Gecoded cities from architecturaldigest.com/story/solar-eclipse-2024-best-cities;
* Get cities + latitude + longitude from Google Sheets;
FILENAME cities url 'https://docs.google.com/spreadsheets/d/1uu9zHLpaKteksCFKnvQw-HWS7czdW1nY8IzGPpq-TSQ/export?format=csv&gid=0';
proc import datafile=cities out=cities DBMS=CSV REPLACE; GETNAMES=Yes; DATAROW=2;
ods graphics / antialias height=7in width=7in;
proc sgmap plotdata=cities noautolegend; * Use SGMAP + OpenStreetMap to plot cities;
title height=14pt font=arial "Architectural Digest's 13 Best Cities for Seeing the Solar Eclipse";
openstreetmap; * Overlay multiple markers in attempt at black-on-yellow 'eclipse-look' markers;
scatter x=long y=lat / datalabel=city datalabelattrs=(family=arial size=14pt color=black) markerattrs=(symbol=circlefilled size=13pt);
scatter x=long y=lat / markerattrs=(symbol=circlefilled size=12pt color=yellow); * Stadium points;
scatter x=long y=lat / markerattrs=(symbol=circlefilled size=8pt color=black); * Stadium points;
run;
DATA (Google Sheets)
Yep - interesting blog post. ... But it doesn't appear they used SAS to create any of the maps in the blog post(?)
They used the SGMAP procedure, which is shipped with Base SAS. SAS Help Center: Overview: PROC SGMAP
The maps in the blog post show numeric (lat/long) axes - I've never seen Proc SGMAP do that. Are you 100% certain they were created with SGMAP?
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.