slv.basemap#
Salt Lake Valley basemaps.
SaltLake makes a cartopy map of the valley and layers features onto it. Every
add_* method returns the map, so calls chain:
from slv.basemap import SaltLake
m = (
SaltLake(tiles="terrain")
.add_population()
.add_trax(lines="RG")
.add_sites(["wbb", "ldf", "hdp"], labels={"wbb": "UOU"})
.add_mesowest()
.add_legend()
.add_inset()
.add_north_arrow()
)
m.fig.savefig("slv.png", dpi=300)
The load_* functions read the layers’ data (group data via $SLV_SPATIAL_DIR, slv
user data via $SLV_USER_DATA_DIR) and return lon/lat GeoDataFrames; the add_*
methods only plot, so any of them also takes data you pass in.
Attributes
Colour of each TRAX line, keyed by its |
|
Stadia Maps credit, required wherever its tiles are shown. |
Functions
A cartopy tiler that caches its tiles on disk, safe to build in several processes at the same moment. |
|
2022 Census state or county boundaries from |
|
Interstates (UGRC road |
|
MesoWest stations ( |
|
Block-group population and density (people km⁻², over land area). |
|
A Stadia Maps tiler ( |
Classes
A cartopy map of the Salt Lake Valley. |