
Show HN: A live map of sunlight on earth - tpaschalis
https://sunlight.live
======
sciurus
You'll find this sort of visualization on a lot of ham radio websites, since
skywave propagation between two points varies based on the amount of sunlight
among other things. For instance,
[https://www.pskreporter.info/pskmap.html](https://www.pskreporter.info/pskmap.html)

The Geochron ([https://www.geochron.com/about/what-is-
it/](https://www.geochron.com/about/what-is-it/)) is a mechanical map+clock
created in 1965 that shows it.

~~~
MichaelApproved
Does more sunlight help or hurt skywave propagation?

~~~
teraflop
It's not quite as simple as that, because there are multiple ionospheric
layers with different physical properties that affect RF propagation.

An over-simplified explanation is that the outer layers of the atmosphere
persist continuously, and can be used for very long distance communication,
but only reflect radio waves at relatively low frequencies (<10MHz). The lower
layers that become ionized during the day absorb some of the radio waves,
reducing overall efficiency and range, but also allow operation at higher
frequencies which would be unusable at night.

And you can get very efficient long-distance propagation along the terminator
at dawn and dusk:
[https://www.qsl.net/w2vtm/grayline.html](https://www.qsl.net/w2vtm/grayline.html)

------
mixmastamyk
This is a really useful visual if one has contacts or meetings in other world
cities. The left edge of the light hump is roughly 6am, the center is noon,
and the right edge is roughly 6pm. The center of the dark hump is midnight,
give or take DST.

Gnome2 had a map like this in its calendar/time drop-down when you add cities
to it: [https://help.gnome.org/misc/release-
notes/2.22/figures/rnuse...](https://help.gnome.org/misc/release-
notes/2.22/figures/rnusers-international-clock.png.fr)

It's one of the main reasons I still use Mate. No other desktop environment
keeps it handy like this. I try them for a bit, then always go back to Mate.

~~~
bityard
Offtopic but MATE is also literally the only Linux desktop that gets multi-
head right, especially when it comes to hot-adding and hot-removing displays.
All others do weird things to the window layout or crash when you add or
remove a monitor while the machine was asleep.

~~~
mixmastamyk
Interesting. Perhaps because it was one of the only ones to stick around long
enough to mature, until it was abandoned CADT style.

------
joeyrobert
Interesting that these maps are always binary: light or dark, when the
intensity of light varies based on how high the sun is in the sky. Is there a
version of this map that takes that into account?

~~~
zie
You would need to have the data of how high the sun is in the sky, plus to be
accurate you would need to have cloud data as well.

~~~
smackay
This [https://www.timeanddate.com/astronomy/different-types-
twilig...](https://www.timeanddate.com/astronomy/different-types-
twilight.html) is probably a good approximation.

------
kmano8
Tangentially related plug for a small site I built to tell you when golden
hour is at your location
[https://whenisgoldenhour.com/](https://whenisgoldenhour.com/) [1]

Would love to figure out how to incorporate a world dot map like this, but
showing the two current golden hours (morning and evening) instead.

[1]
[https://github.com/ksho/whenisgoldenhour.com/](https://github.com/ksho/whenisgoldenhour.com/)

~~~
arethuza
Out of interest - how are you getting location? I didn't get a consent warning
for client side geolocation and it seems accurate so it doesn't appear to be
IP based (my public IP appears to be a few hundred miles south of my actual
location).

~~~
kmano8
I'm using the google geolocation API
[https://developers.google.com/maps/documentation/geolocation...](https://developers.google.com/maps/documentation/geolocation/intro)
at
[https://github.com/ksho/whenisgoldenhour.com/blob/master/pag...](https://github.com/ksho/whenisgoldenhour.com/blob/master/pages/index.tsx#L11)

I've gone back and forth on replacing this with a browser-based location
request so the user is aware what's going on -- the tradeoff being the
friction of clicking the allow button.

------
kylek
Somewhat related- not quite live, but NASA's DSCOVR is a satellite that is
always on the sunlit side of the earth:

[https://epic.gsfc.nasa.gov/](https://epic.gsfc.nasa.gov/)

------
krispbyte
Here is another take at the same: [http://www.fourmilab.ch/cgi-
bin/Earth](http://www.fourmilab.ch/cgi-bin/Earth)

------
enriquto
I was expecting a map showing the clouds!

------
khaki54
I like the one that has the sunlight map plus the live cloud cover feeds -
Interestingly enough, this is the site that holds all the linux manpages.

[https://www.die.net/earth/](https://www.die.net/earth/)

You can actually just link the image to your desktop and depending on settings
will auto update throughout the day. Sometimes you need to write a script

------
wang_li
Xsunclock.

[http://www.fourmilab.ch/xsunclock/](http://www.fourmilab.ch/xsunclock/)

------
TeMPOraL
Nice!

Huh, I wanted to draw something exactly like this to put as hero image of my
company page, except with ISS orbit instead of the terminator. I really like
this "world map out of dots" style.

~~~
tpaschalis
Thanks! I was inspired by the world map that appears on my android's Clock
application, and it was an opportunity to write some structured matplotlib
code and learn about new stuff.

You might want to take a look at the Natural Earth [1] datasets and GeoPandas
[2], they're great if you're dealing with any kind of geographical data.

[1] [https://www.naturalearthdata.com/](https://www.naturalearthdata.com/)

[2] [http://geopandas.org/](http://geopandas.org/)

------
Tepix
Can't you use a static image on the server and compute the terminator on the
client side? That way it would always be up-to-date even without a reload.

------
ch4s3
This reminded me of a moving city on Mercury called Terminator from Kim
Stanley Robinson‘s novel 2312. The city slides along metal tracks propelled by
the expansion and contraction of the metal as the terminator of the sunlight
shifts. There’s even a sun cult that chases perpetual dawn. It’s a pretty good
science novel.

------
imjustsaying
Nice work.

Want another challenge? Try one with the azimuthal equidistant projection.
Would be quite interesting to watch the comparison.

------
agapon
In the old days I used use xearth ([https://xearth.org/](https://xearth.org/))
to set my X background to a view of our planet with the sunlight correctly
applied.

------
bhrgunatha
There used to be a page that showed the view from a webcam located wherever
the sun was currently rising as you viewed the page.

Can't find it any more though - probably been removed.

------
perilunar
You can get a live map of where the sun is shining from Google maps. Just
switch to satellite view and zoom out until you see the whole earth, then a
bit more.

------
bugeats
I'd love to use this as a clock pane in my window manager. If you added the
local time and removed some of the large text, it would be a great background.

------
joshypants
Very nice. It would also be cool to be able to input what datetime you want it
to display sunlight for.

~~~
tpaschalis
Modifying the Python code for this would be trivial. I need to think about how
to best serve each 'session' though, or transfer the image generation to the
client-side. Nice plan for a weekend!

------
jarjoura
Poor Antarctica right now.

------
ge96
I don't know off hand what this cliche wave is called(shown in like all SciFi
space launch movies) the wider top part of the wave that's the Earth tilted in
that direction? eg. northern part is exposed towards the sun more. At this
time for me in US.

~~~
tpaschalis
As cosmic_quanta mentioned it's called the terminator, and it's generally the
dividing line between the 'illuminated' and 'unilluminated' part of a
celestial body.

You're right, the weird shape is due to the projection of "earth" in the X-Y
plane, if you chose a different projection it would appear differently. The
calculations make sure that the result is ±1 accurate all year long.

The truth is that even the definition of 'daylight' and 'night-time' is not
straightforward. The most common definitions include the Civil, Nautical and
Astronomical Twilights [1], depending on the sun's position, so it should
actually be a gradient.

[1]
[https://en.wikipedia.org/wiki/Twilight](https://en.wikipedia.org/wiki/Twilight)

~~~
ge96
thanks for the info, I just see that squiggly line all over that 'sine wave'
looking thing on space-related scenes on a big screen.

------
sc9311
This would be pretty slick as a new tab chrome extension.

------
salutonmundo
related, and also useful: [https://xkcd.com/now/](https://xkcd.com/now/)

------
sumeetk
simple and sweet - quite interesting and useful !

