powered by
Create a station metadata table (Station, LON, LAT) either by:
loading from a CSV file,
accepting an existing data.frame,
or auto-generating synthetic stations in a bounding box.
create_stations( source = NULL, n = 10, bbox = c(-3.5, 1.5, 4.5, 11.5), seed = NULL )
A data.frame with columns Station, LON, LAT.
Path to CSV file OR a data.frame with Station/LON/LAT OR NULL (to generate synthetic).
Integer number of stations to generate when source = NULL. Default 10.
numeric vector c(min_lon, max_lon, min_lat, max_lat). Default ~ Ghana bounding box.
Optional numeric to make generation reproducible.
create_stations(n = 5, seed = 42) create_stations(data.frame(Station="A", LON=0, LAT=5))
Run the code above in your browser using DataLab