Using Custom Overlays

Alec Ramsay
Dave’s Redistricting
6 min readSep 4, 2020

You can add custom overlays to your maps in DRA 2020. There are two kinds:

  • Layers — These are static shapes & points defined in GeoJSON or ESRI Shapefiles (in zip archive format) and can represent any information that you want to layer on top of your map,¹ and
  • Maps — These are live community or district maps created in DRA. When these maps are edited, the changes propagate to the maps overlaid with them.

This general-purpose feature enables many scenarios, but here are three specific ones:

  • Overlaying a community of interest (COI), so you can see how it relates to the districts in your map
  • Overlaying the outlines of the current districts onto your map, so you can see how the districts are different, and
  • Displaying the relative value of some property over the map (e.g. income), by adjusting color or opacity on a shape-by-shape level.

This example shows the Saginaw Chippewa Community in Michigan split across congressional districts 4 and 5.

If you share a map, the overlays will also display for any users you share it with. Users to whom you give edit permission for a map can also add and remove overlays and change their appearance.

Managing Custom Overlays

To add, remove, or change the appearance of custom overlays for a map, use the Custom Overlays panel in the lower left side of Map view.

This shows three overlays added to the map.

When you click on the gear icon in the upper right corner, you’ll see a Select Layers and Maps popup.

This shows that this map applies three overlays. The first is a community map; the second and third are layers. You can stop showing an existing overlay, by deselecting it and pressing Apply.

To remove a layer from a map, uncheck that row and press Apply.

The next two sections describe how to manage layer overlays and community & district map overlays, respectively.

Adding Layers

To add more or remove existing layers, to make new layers available by importing them, or to delete layers that you have previously imported, click on Add Layers.

The popup shows the layers that are available for the current map.

We automatically make layers for the official 116th Congressional maps available to everyone. These are marked with a blue check circle. The other layers shown were previously imported by this user and made available for any of their maps of Michigan.

  • To make another layer available to this map, select the checkbox for that row and press Pick.
  • To delete a layer from the service (perhaps because you have a newer version that you want to replace it with), select it and press Delete. Once you delete a layer, it is no longer available to add to any other map that you own, although existing maps that you have added it to will continue to display the overlay.
  • To import a new layer to DRA so you can add it to any map for the current state, press Import New. You’ll get an Import Layer popup.
  • Press Choose File and find the GeoJSON or Shapefile file that represents the overlay (more on that below). Note: Import the whole .zip shapefile archive, not just the one .shp file.
  • Edit the default name for the overlay, if you want something different
  • Optionally add a description, and
  • Press Import Layer

After the import is complete, the overlay will show up in the list of available overlays and you can add it to your map. It will also be available in any other maps for the state that you own. Note: The overlays that you import are private to you, except when you share a map with others — or publish a map to everyone — that attaches an overlay.

If you do not want to import or delete any more layers, just press Dismiss.

Adding Communities & Maps

The process for overlaying community and district maps is similar. When you press Add Maps, you’ll get a map picker.

The search box will be pre-filtered to show the communities that you have created for the map’s state:

  • You can find communities that others have drawn, by clicking on the Published or Official toggles
  • You can find district maps, by clicking on the COI toggle, and
  • You can find maps for other states, by clicking on the This State toggle — This allows you to create multi-state maps! (tutorial, tutorial)

You can also change the search criteria directly (see Filtering & Sorting Maps).

Adding community maps is described in detail in Drawing Communities in DRA.

Formatting Custom Overlays

You can change how an overlay appears on your map, using the four controls to the right of the overlay name in the Custom Overlays panel.

Left to right, the controls toggle overlay:

  • Lines
  • Fill
  • Labels, and
  • Landmarks

To create an image of custom overlays overlaid on a map, you can either:

  • Export the Map Image
  • Pan & zoom until you have the view you want and take a screenshot, or
  • Download an image using a feature of Chrome (see Creating Map Images)

Working With Layers

You can create layers from DRA maps, you can create them with general-purpose GIS tools, and you can find or make them in tools for defining communities of interest.

Creating Layers From DRA Maps

As noted above, we automatically make layers for the official 116th Congressional maps available to everyone in the Pick Layers dialog. You can create layers for other maps as well:

  • Open the map you want to make into a layer
  • Click Export on the command bar
  • Select the District shapes (as .geojson) option, to export the geometry of the district shapes
  • Press Export — The file will be named district-shapes.geojson in your downloads folder (you can rename it if you like).
  • You can then Import this as a layer into your map, as described above — Point GeoJSON features are converted to Landmarks on the layer.

Note: You can simply add the map as a map too.

Finding or Making Layers in Other Tools

As noted above, a layer is simply a GeoJSON or Shapfile file defining one or more shapes for a state. You can make arbitrary layers with whatever general-purpose tools you have at your disposal.² Alternatively, you can find layers made with purpose-built tools: for example, Districtr and Representable let you draw communities.

To import a community defined in Representable:

  • Go to Representable
  • Click the View All Maps at the bottom
  • Find a community
  • Click on it, and you’ll see details about the community (shown below)
  • Press Export GeoJSON

You can then import that GeoJSON into your map as a layer, as described above.

Of course, you can also use tools like Districtr and Representable to first define a community, before you export the GeoJSON.

Footnotes

  1. Like an overhead projector acetate, if you’re of a certain age.
  2. If you are creating a GeoJSON using general-purpose tools, or you’re developing a purpose-built tool that generates GeoJSON files, these are the details about how properties in the GeoJSON affect the appearance in the overlay in DRA:
  • The Label for a shape is determined by one of of these properties (in order, with uppercase variants): name, name10, namelsad, namelsad10, entry_name.
  • The Color for a shape is determined by a color, fillcolor, or linecolor properties for the shape. Line and fill color properties overrides color for that attribute, if present. Colors are HTML color strings (e.g. “blue”, “#0000ff”, etc).
  • The Opacity of a shape is determined by opacity, fillopacity, or lineopacity properties for the shape, with the same semantics as above. Opacity values are decimal numbers in the range [0, 1].

--

--

Alec Ramsay
Dave’s Redistricting

I synthesize large complex domains into easy-to-understand conceptual frameworks: I create simple maps of complex territories.