d3-geo-projection
Extended geographic projections for d3-geo. See Command-Line Cartography for an introduction.
Installing
If you use NPM, npm install d3-geo-projection
. Otherwise, download the latest release. You can also load directly from d3js.org as a standalone library. AMD, CommonJS, and vanilla environments are supported. In vanilla, a d3
global is exported:
<script src="https://d3js.org/d3-array.v2.min.js"></script> <script src="https://d3js.org/d3-geo.v2.min.js"></script> <script src="https://d3js.org/d3-geo-projection.v3.min.js"></script> <script> var aitoff = d3.geoAitoff(); </script>
API Reference
Projections
Note: projections tagged [d3-geo] are exported by d3-geo, not d3-geo-projection. These commonly-used projections are also included in the d3 default bundle.
d3.geoAiry() · Source, Examples
d3.geoAiryRaw(beta)
Airy’s minimum-error azimuthal projection.
airy.radius([radius])
Defaults to 90°.
d3.geoAitoff() · Source, Examples
d3.geoAitoffRaw
The Aitoff projection.
d3.geoAlbers() · Source [d3-geo]
Albers’ equal-area conic projection.
d3.geoArmadillo() · Source, Examples
d3.geoArmadilloRaw(phi0)
The armadillo projection. The default center assumes the default parallel of 20° and should be changed if a different parallel is used. Note: requires clipping to the sphere.
armadillo.parallel([parallel])
Defaults to 20°.
d3.geoAugust() · Source, Examples
d3.geoAugustRaw
August’s epicycloidal conformal projection.
d3.geoAzimuthalEqualArea() · Source [d3-geo], Examples
d3.geoAzimuthalEqualAreaRaw
The Lambert azimuthal equal-area projection.
d3.geoAzimuthalEquidistant() · Source [d3-geo], Examples
d3.geoAzimuthalEquidistantRaw
The azimuthal equidistant projection.
d3.geoBaker() · Source, Examples
d3.geoBakerRaw
The Baker Dinomic projection.
d3.geoBerghaus() · Source, Examples
d3.geoBerghausRaw(lobes)
Berghaus’ star projection. The default center assumes the default lobe number of 5 and should be changed if a different number of lobes is used. Note: requires clipping to the sphere.
berghaus.lobes([lobes]) · Source
If lobes is specified, sets the number of lobes in the resulting star, and returns this projection. If lobes is not specified, returns the current lobe number, which defaults to 5.
d3.geoBertin1953() · Source
d3.geoBertin1953Raw
Jacques Bertin’s 1953 projection.
d3.geoBoggs() · Source, Examples
d3.geoBoggsRaw
The Boggs eumorphic projection. More commonly used in interrupted form.