2
$\begingroup$

I'd like to chart the location of the sun (azimuth and elevation) from a given location (e.g., Chicago) throughout the year for a stated year (e.g., 2010).

Here is the basic extraction of the current location of the sun, but it doesn't include a specified location or time.

Dataset[EntityValue[
   Entity["Star", "Sun"], 
  {EntityProperty["Star", "RightAscension"], 
   EntityProperty["Star", "Declination"]}, 
   "PropertyAssociation"]]

(Here is a good background description.)

solar paths

Plotting one path per month would be sufficient. (365 such paths would be too crowded.)

Any suggestions?

$\endgroup$
2
  • 2
    $\begingroup$ Check out SunPosition $\endgroup$
    – chuy
    Commented Jan 27, 2021 at 21:20
  • $\begingroup$ @shuy: Oh... thanks so much! This may be sufficient. $\endgroup$ Commented Jan 27, 2021 at 21:26

1 Answer 1

3
$\begingroup$

@chuy provided the key functionality... for which I'm grateful.

Here's the solution:

sunPosition = 
 SunPosition[Entity["City", {"Delft", "ZuidHolland", "Netherlands"}], 
    TimeZoneConvert[DateObject[{2020, 6, 21, #}, TimeZone -> 0], 
     Entity["City", {"Delft", "ZuidHolland", "Netherlands"}]]] & /@ 
  Range[1, 15];

ListPlot[sunPosition,
 PlotRange -> {-20, 70},
 Joined -> True,
 Ticks -> {Table[{i, 
     Text[Style[i^o, 14, FontFamily -> "Latin Modern Roman", 
       Italic]]}, {i, 0, 360, 30}], 
   Table[{j, 
     Text[Style[j^o, 14, FontFamily -> "Latin Modern Roman", 
       Italic]] }, {j, 0, 60, 20}]}]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.