返回全部资讯
Simon Willison 博客T2·开发与工程

Datasette 地图插件 0.19 兼容 1.0a42

原标题:datasette-cluster-map 0.19
38AI 研判分

Datasette 老牌插件 datasette-cluster-map 发布 0.19 版本,适配 Datasette 1.0a42,并依赖新版 datasette-leaflet 为 OpenStreetMap 瓦片请求带上 referrer 头。作者同时展示了加州 PG&E 电厂数据的分面地图界面,体现 Datasette 近期改版的分面功能。

报道正文

One of the oldest Datasette plugins, and still one of my favorites. It now works with Datasette 1.0a42, and depends on the new datasette-leaflet to ensure OpenStreetMap tiles are requested with a referrer header.

Here's a map of power plants owned by California's PG&E., also demonstrating Datasette's recently redesigned facets:

Screenshot of a faceted map interface. Three facet panels at the top: 'country_long 1' with United States of America 81 selected; 'owner 1' with Pacific Gas & Electric Co. 81 selected; 'primary_fuel 5' listing Hydro 63, Solar 10, Gas 5, Storage 2, Nuclear 1. Each primary_fuel row has a pale blue horizontal bar behind its label, sized in proportion to its count: Hydro's bar fills most of the row width, Solar's is a short sliver, Gas's is shorter still, and Storage and Nuclear have only a thin strip at the left edge. Below is a Leaflet map with + and − zoom controls showing California and Nevada, with marker clusters across northern and central California: 9 near Redding, 21 near Chico, 2 to the west of Chico, 13 northeast of Sacramento, 7 east of Stockton, 6 at Oakland, 10 at Fresno, 9 west of Visalia, 2 north of Bakersfield, plus two individual blue pin markers on the coast, one in the far north and one north of Santa Maria. Attribution: Leaflet | © OpenStreetMap contributors