You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+33-14Lines changed: 33 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
*Not yet released. These are forthcoming changes in the main branch.*
6
6
7
-
The new [geo mark](https://observablehq.com/@observablehq/plot-geo) renders GeoJSON geometries.
7
+
The new [geo mark](./README.md#geo) renders GeoJSON geometries such as polygons, lines, and points. Together with Plot’s new [projection system](https://observablehq.com/@observablehq/plot-projections), Plot can now produce thematic maps. For example, the choropleth map below shows unemployment rates by U.S. county.
8
8
9
9
[<imgsrc="./img/choropleth.png"width="640"alt="A choropleth of unemployment rate by U.S. county">](https://observablehq.com/@observablehq/plot-geo)
Naturally, it works with Plot’s core features, including scales, legends, and faceting.
24
+
The new top-level [**projection** option](./README.md#projection-options) controls how geometric coordinates are transformed to the screen and supports a variety of common geographic projections, including the composite U.S. Albers projection shown above, the Equal Earth projection, the Mercator projection, the orthographic and stereographic projections, several conic and azimuthal projections, among others. Projections can be fit to geometry using the projection.**domain** option, and rotated to an arbitrary aspect using the projection.**rotate** option.
25
25
26
-
[<imgsrc="./img/faceted-map.png"width="930"alt="A dot map of Walmart store openings faceted by decade">](https://observablehq.com/@observablehq/plot-geo)
26
+
[<imgsrc="./img/orthographic.png"width="640"alt="A world map using the orthographic projection, centered somewhere around San Antonio, Texas">](https://observablehq.com/@observablehq/plot-projections)
The new top-level [**projection** option](https://observablehq.com/@observablehq/plot-projections) controls how geometry coordinates are mapped to the screen. While primarily for the geo mark, it works automatically with most of Plot’s other mark types. For example, here is a map using vectors to show county-level vote margins in the 2020 U.S. presidential election.
41
+
The new graticule convenience mark renders meridians and parallels (lines of constant longitude and latitude), while the sphere convenience mark draws the outline of the sphere.
42
+
43
+
Plot’s projection system works automatically with most of Plot’s mark types, including dots, vectors, lines, and rects. For example, the map below uses vectors to show county-level vote margins in the 2020 U.S. presidential election: a margin for Biden is shown as a blue left-pointing arrow, while a margin for Trump is shown as a red right-pointing arrow; the length of the arrow is proportional to the margin.
43
44
44
45
[<imgsrc="./img/vector-map.png"width="640"alt="An arrow map showing the county-level vote margins in the 2020 U.S. presidential election; a margin for Biden is shown as a blue left-pointing arrow, and a margin for Trump is shown as a red right-pointing arrow">](https://observablehq.com/@observablehq/plot-projections)
45
46
@@ -64,7 +65,7 @@ Plot.plot({
64
65
})
65
66
```
66
67
67
-
With the line mark, it’s not just a point projection; the line mark automatically passes line geometry through the projection, allow projections to interpret line segments as geodesics and to clip or cut as needed. For example, the route of the HMS *Beagle* shown below is automatically cut when it crosses the antimeridian.
68
+
For the [line mark](./README.md#line), the specified projection doesn’t simply project control points; the projection has full control over how geometry is transformed from its native coordinate system (often spherical) to the screen. This optionally allows line geometry to be represented as [geodesics](https://en.wikipedia.org/wiki/Geodesic), which are sampled and clipped during projection. For example, the map below shows the route of Charles Darwin’s voyage on the HMS *Beagle*; note that the line is cut when it crosses the antimeridian in the Pacific ocean. (Also note the use of the *stroke* channel to vary color.)
68
69
69
70
[<imgsrc="./img/beagle.png"width="640"alt="A map of the route of the HMS Beagle, 1831–1836; color indicates direction, with the ship initially departing London and heading southwest before circumnavigating the globe">](https://observablehq.com/@observablehq/plot-projections)
70
71
@@ -80,7 +81,25 @@ Plot.plot({
80
81
})
81
82
```
82
83
83
-
Plot’s projection system works with Plot’s transforms. For example, the map below demonstrates using the hexbin transform to aggregate projected locations into local hexagons.
84
+
Plot’s new geo mark and projection system work with Plot’s other core features, including scales, legends, faceting, and transforms. For example, here is a faceted dot map showing openings of Walmart stores over five decades.
85
+
86
+
[<imgsrc="./img/faceted-map.png"width="930"alt="A dot map of Walmart store openings faceted by decade">](https://observablehq.com/@observablehq/plot-geo)
As another example using the same dataset, the map below uses the hexbin transform to aggregate Walmart store opening into local hexagons.
84
103
85
104
[<imgsrc="./img/hexbin-map.png"width="640"alt="A bivariate hexbin map of Walmart store openings; within each hexagonal area, size indicates the number of Walmart store openings, and color indicates the year of the first opening">](https://observablehq.com/@observablehq/plot-projections)
86
105
@@ -100,7 +119,7 @@ Plot.plot({
100
119
})
101
120
```
102
121
103
-
While a variety of basic projections are included by default, Plot’s projection system can be extended using any implementation that is compatible with D3’s *projection*.stream interface. This includes the existing d3-geo-projection and d3-geo-polygon libraries. For example, here is a world map using Goode’s interrupted homolosine projection.
122
+
In addition to the included basic projections, Plot’s projection system can be extended using any projection implementation compatible with D3’s [projectionstream interface](https://github.com/d3/d3-geo/blob/main/README.md#streams). This includes all the projections provided by the [d3-geo-projection](https://github.com/d3/d3-geo-projection) and [d3-geo-polygon](https://github.com/d3/d3-geo-polygon) libraries! For example, here is a world map using Goode’s interrupted homolosine projection.
104
123
105
124
[<imgsrc="./img/goode.png"width="640"alt="A world map using Goode’s interrupted homolosine projection">](https://observablehq.com/@observablehq/plot-projections)
0 commit comments