2

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?

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
David G. Stork
  • 41,180
  • 3
  • 34
  • 96

1 Answers1

3

@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

David G. Stork
  • 41,180
  • 3
  • 34
  • 96