跳到正文
原文
Simon Willison·· 15 天前AI 评分25

datasette-cluster-map 0.19 现已可配合 Datasette 1.0a42 使用

datasette-cluster-map 0.19

AI 导读

datasette-cluster-map 0.19 现已可以配合 Datasette 1.0a42 使用。这一版依赖新的 datasette-leaflet,以便 OpenStreetMap 瓦片在被请求时带上 referrer 头。

正文 · 原文

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

来源:Simon Willison · simonwillison.net