Skip to content

Guymer/bots

Repository files navigation

British Overseas Territories Sunsets (BOTS)

This Python 3.x module contains all the functions required to calculate the sunrises and sunsets of all territories in the BOT along with some pretty maps. It uses this data to demonstrate that the sun has not (yet) set over the BOT (thanks to the Pitcairn Islands and the BIOT, excluding the BAT). This project was inspired by the What If? blog post Sunset on the British Empire.

Usage

BOTS can be run very easily, below is a minimum working example.

import bots
bots.run("myOutput")

Example Output

BOTS will create a file called db.json which will make it run quicker the next time you run it. BOTS with also create a PNG image for every territory so that you know where it is in the world. Finally, BOTS will produce a graph (called plot.png) which should look like the one below.

BOTS output

The solid coloured bars are the times when the whole territory has sunlight and the translucent wings are when some of the territory has sunlight. The BAT and South Georgia & the South Sandwich Islands have noticeable translucent regions because those territories have large extents.

Dependencies

BOTS requires the following Python modules to be installed and available in your PYTHONPATH.

BOTS uses some Global Self-Consistent Hierarchical High-Resolution Geography resources and some Natural Earth resources via the cartopy module. If they do not exist on your system then cartopy will download them for you in the background. Consequently, a working internet connection may be required the first time you run BOTS.

Bugs

  • The map for the British Antarctic Territory is wrong: it incorrectly shades the entirety of Antartica red when in reality the BAT only extends from -80.0 longitude to -20.0 longitude. However, the final plot of sunrises and sunsets does not share this problem as it only uses locations between -80.0 longitude and -20.0 longitude.

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages