Skip to content

Instantly share code, notes, and snippets.

Last active Jan 15, 2022
What would you like to do?
Scale Bar In Washington, D.C.
license: gpl-3.0

When using d3-geo-scale-bar, scaleBar.radius will also come in handy if you want to plot units on Earth other than kilometers, miles, meters, or feet, all of which come with preset units. For instance, when adding a scale bar to a map of a small area, you can set scaleBar.radius to 6967419.888, the mean radius of the Earth in yards.

For example, here is a map of buildings near the National Mall in Washington, D.C., using data from the great Open Data DC.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment