kharita, the Tailwind of maps
Designed maps from one style string¶
kharita turns a GeoDataFrame and a short string of utilities into a classified, coloured, legended, titled map on a designed basemap. It is built on Lonboard, so the same string draws twenty states or a million points.
Why kharita¶
One string per map¶
fill-[density] ramp-ylorrd scheme-q5 classifies, colours and builds the legend. Order does not matter; two words that set the same thing raise a clear error.
Every colour by name¶
22 Tailwind families, any hex colour, about 170 named ramps from ColorBrewer, matplotlib, Crameri, cmocean and CARTOColors, and the IPC and WorldCover standards.
Title and legend done¶
A title card, a legend with class counts, a bar or gradient legend, a size key and a height key, placed anywhere and styled with the same Tailwind words.
Designed basemaps¶
Sixteen keyless basemaps: print paper, midnight, neon, topographic, poster, figure-ground, satellite. Recolour any part, add shaded relief or 3D buildings.
Terrain built in¶
kh.contours() traces contour lines from open elevation tiles, generalised like a printed map, ready to style, label and lay over imagery.
Share one file¶
.to_html("map.html") writes the whole map, title and legend into one page anyone can open.
Start in five lines¶
import geopandas as gpd
import kharita as kh
states = gpd.read_file("data/processed/sudan_states.gpkg")
kh.map(states, "theme-paper fill-[pop/area_km2] ramp-ylorrd scheme-q5 stroke-white", title="Population density")
Then read Core concepts, browse the colour palette, or copy a recipe from the gallery.
