From the Vega Example Gallery
A choropleth map of 2009 U.S. unemployment rates by county. A quantize scale is used to divide the color range into 9 discrete, uniformly-spaced bins.
A Dorling cartogram is a thematic map that uses sized circles to represent a quantity of interest per geographic region. This example visualizes the ratio of obese adults (BMI >= 30) by U.S. state in 2008. A double encoding uses both circle area and fill color to convey the obesity rate. Vega’s force transform and geoCentroid expression function are used to compute the layout.
A configurable map of world countries. Explore the results of applying different map projections and parameter settings. This example loads TopoJSON data and applies the Vega geoshape and graticule transforms.
A globe visualization of earthquakes reported by the USGS for the week of February 6, 2018. The earthquakes are formatted as GeoJSON data, and the geoshape transform’s pointRadius parameter is used to visualize earthquake magnitude as a circular area. This example is based on Jeremy Ashkenas’ USGS World Earthquake Map.
A gallery of world maps using various cartographic projections. Each map clips the projected land masses and graticule to the sphere of the Earth to ensure no extraneous shapes are shown. This example uses projections from the d3-geo-projection library that are not included in the standard Vega release.
A world map that pans and zooms in response to mouse drag and scroll wheel input. This example applies an inverse map projection (using Vega’s invert expression function) to map changes in pixel space to updated projection parameters.
This example visualizes the difference in projected area of countries using two different map projections. Each country is abstracted to a circle, sized by the area of that country under a particular map projection. Country circles are positioned based on the centroid position of the country under a primary projection. A second set of circles are then overlaid, with projected areas based on a secondary projection. This example demonstrates Vega’s geoArea and geoCentroid expression language functions.
A colored contour plot of the Maungawhau volcano in New Zealand. This example demonstrates contour generation directly from a provided grid of data values, rather than performing kernel density estimation on a discrete point set.
A vector field visualization of simulated winds over northwestern Europe. This example uses the angle channel of the symbol mark to set the orientation of wedge or arrow shape types.