My Authors
Read all threads
Attention web cartographers: Today I'm releasing d3-geo-scale-bar version 1! It's a JavaScript library that makes it easy to add scale bars to your #D3js maps. Here's an introduction and tutorial on @observablehq: observablehq.com/@harrystevens/… #cartography
@observablehq Just give it a projection, and it'll give you a scale bar. It even plays nicely with transitions! observablehq.com/@harrystevens/…
@observablehq It also plays nicely with d3-zoom. observablehq.com/@harrystevens/…
@observablehq You're not limited to any particular unit of measurement. For example, here's a map showing yards near the National Mall in Washington, D.C. observablehq.com/@harrystevens/…
@observablehq You're not even limited to planet Earth. For example, by setting the radius to 1737.4, the radius of the Moon in kilometers, you can put your scale bar on the Moon! observablehq.com/@harrystevens/…
@observablehq Of course, not every map needs a scale bar. Think twice before using d3-geo-scale-bar with projections that show large parts of the sphere or that have significant local distortions. They are also often out of place on thematic maps like choropleth and bubble maps.
@observablehq But with d3-geo-scale-bar, now web cartographers at least have the option of easily adding scale bars to our maps. It's just about 11kb minified. To download d3-geo-scale-bar, read its source code, or contribute to the project, visit its GitHub page. github.com/HarryStevens/d…
Missing some Tweet in this thread? You can try to force a refresh.

Enjoying this thread?

Keep Current with Harry Stevens

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!