Note DataSF has changed the format of this Schools dataset since this example was first made.
Key aspects this example demonstrates
Fetching a CSV dataset with a spatial (WKT) component
Creation of a database view upon the dataset that translates column "CCSF Entity" to a series of colors
create view if not exists schools_vw
as
select case "ccsf_entity"
when 'Private' then 'red'
when 'SFCCD' then 'green'
when 'SFUSD' then 'blue'
else 'yellow' end fillColor,
"campus_name" tooltip,
s.*
from schools s;
Creating a Map Visualization of the dataset view with contextual styling applied (marker point fill color based on a Column Value)