coastalwalkr
is another mapbot, inspired by Matt Dray's londonmapbot
and my narrowbotR
. When up and running the coastalwalkr
will take walks along the coast of Great Britain.
- pull GB coastline from
{rnaturalearth}
- identify walking mechanism to follow coast in one direction, accounting for coastal geometry
- create twitter account
- explore open data: nearest RLNI station, nearest public transport
- identify tweet strategy
- write script for tweeting
- write GH Action workflow for automation
Others in the mapbotverse select a position at random each time they tweeet. londomapbot
generates a random latitude and longitude within a bounding box that contains the M25 and tweets an aerial photo of the location along with an OSM link. narrowbotr
picks a random location from a list of canal features, it also searches flickr for photos close to the location, if no flickr photo is found it too uses an aerial photo of the location.
In developing a strategy for coastalwalkr
the idea is to move beyond single unconnected tweets. The bot will start at a random location and then "walk" along the coast for a given number of tweets before starting a new walk at another location. While each tweet on a walk will be from a new location they will be near each other (e.g. 2-3 km) so unlike the other mapbots each tweet can contain different information. For example, along with the current location of the walk the different tweets on a walk might contain:
- Tweet starting location with street map of the location
- Tweet stating nearest public transport facilities
- Tweet aerial photo of the current location
- Tweet nearest bathing water quality information
- Tweet some key statistics about the local area (population, age profile, employment rate)
- Tweet nearest RNLI lifeboat
- Tweet flickr photo
- Tweet nearest non-GB location.
- Tweet local MP/MSP/MS
- Tweet distance from starting position
Use Mapbox as per standard mapbots
Use DfT NaPTAN/NPTG data/service.
- download NaPTAN data
- explore data
- clean bus stop names
- convert bus stops to {sf} object
- convert railways to {sf} object
- test plotting of bus/rail {sf} objects
- test nearest bus/rail selection
- build dataset of other transport facilities
- test nearest other transport selection
Test plot (starting at first point of Natural Earth GB coastline: 3.32346 West, 56.36586 North, mouth of the River Tay, SE of Perth):
- Natural Earth coatline in light grey
- Simplified coastline in blue (i.e. computational walking path)
- First 20 points of real coast (converted to line) in black
- Sequential points on computational path in blue
- Nearest real coastline points in red
- NaPTAN objects as triangles: bus stops in green, railway stations in blue
Use Mapbox as per standard mapbots
The Environment Agency Bathing Water Quality API (for England) and Natural Resources Wales Bathing Water Quality Data API provide data for each country using a similar API format.
Raw data from the Scottish Environment Protection Agency appears to be missing, but some data is published on the web: (i) a table of location names and their rating here; (ii) HTML profiles for individual locations here; and, (iii) more detailed PDF profiles here
The NOMIS API can provide access to a range of local statistics, for example population estimates, household composition, employment rate, regional income levels. For consistency and up-to-date data the local authority district level is the lowest available geography. This would also allow ability to link to authority website/twitter handle.
The Royal National Lifeboat Institution is a charity that operates lifeboat and lifeguard services around the coasts of Great Britain, Ireland, the Isle of Man and Channel Islands. They publish a large amount of open data about lifeboat stations, the lifeboat fleet and launches, and beaches with lifeguards.
Use Flickr API as per narrowbotR
Use sf::st_nearest_point()
to find nearest point on non-GB location. Consider excluding Scottish Islands?
The UK Parliament's open data service provides data about MPs, including their twitter handles. Similarly the Scottish Parliament's open data service also provides a variety of data about MSPs.
It is unclear if the Senedd's open data services includes details of MSs. It may be easier to collate a separate dataset by scraping the HTML pages/other sources.
Use {sf}
to calculate the distance between start and end points, crow flies and along the coastline.