Outside Minnesota? Jump to The Minnesota State Capitol or drag the pin on the map!

Minnesota Boundaries

Waiting for browser ...

Loading…

Data Sets

The following describes the data sets that are available with this service.

Loading...

API

The Boundary Service API provides a RESTful interface to a wealth of data about official geographic boundaries within Minnesota. Data is retrieved from the API as JSON (optionally JSONP) with nested GeoJSON for describing the boundary shapes.

There are two resources described by the API: Boundary Sets and Boundaries.

Boundary Sets

Boundary Sets describe the extent and provenance of a group of Boundaries as well how recently they were last updated. Here, for example, is the Boundary Set for State House districts (2012):


{
  authority: "Minnesota Legislative Coordinating Commission - GIS Office",
  boundaries: [ .. ],
  count: 134,
  domain: "Minnesota",
  href: "http://www.gis.leg.mn/redist2010/plans.html",
  last_updated: "2012-05-03",
  metadata_fields: [ .. ],
  name: "State House districts (2012)",
  notes: "These districts were defined in 2012.",
  resource_uri: "/1.0/boundary-set/state-house-districts-2012/",
  slug: "state-house-districts-2012"
}

To see a paginated list of available Boundary Sets access the following URL:

http://boundaries.minnpost.com/1.0/boundary-set/

Descriptions of all the properties of a Boundary Set can be accessed at:

http://boundaries.minnpost.com/1.0/boundary-set/schema/

A single Boundary Set may be accessed directly by its slug:

http://boundaries.minnpost.com/1.0/boundary-set/state-house-districts-2012/

Boundaries

Boundaries are the individual shapes within a Boundary Set. The Boundary for 4th Congressional district (2012) looks like:


{
  centroid: {
    coordinates: [
      -92.9809341315504,
      45.00196132245185
    ],
    type: "Point"
  },
  external_id: "180077",
  kind: "Congressional district (2012)",
  metadata: { .. },
  name: "4",
  resource_uri: "/1.0/boundary/4-congressional-district-2012/",
  set: "/1.0/boundary-set/congressional-districts-2012/",
  simple_shape: { .. },
  slug: "4-congressional-district-2012"
}

A paginated list of all Boundaries can be accessed at:

http://boundaries.minnpost.com/1.0/boundary/

As with Boundary Sets a description of all properties returned with the Boundary can be retrieved from:

http://boundaries.minnpost.com/1.0/boundary/schema/

And a single Boundary may be accessed directly by its slug:

http://boundaries.minnpost.com/1.0/boundary/4-congressional-district-2012/

For ease of URL construction a Boundary may also be referenced by appending the Boundary's external_id property to it's parent Boundary Set's URL. For example:

http://boundaries.minnpost.com/1.0/boundary-set/state-house-districts-2012/2

Note: The metadata fields returned with a Boundary are taken directly from the original data sources. In certain cases these may be out of date. An effort has been made to capture such issues in the Boundary Set's notes property, but these values should generally not be taken at face value.

Limiting resources returned

Pagination of returned resources is handled with the limit and offset parameters:

http://boundaries.minnpost.com/1.0/boundary/?limit=10&offset=10

In addition, queries may (and should) be constrained by passing a comma-delimited list of Boundary Set slugs to the sets parameter:

http://boundaries.minnpost.com/1.0/boundary/?sets=state-house-districts-2012,state-house-districts-2002

Point queries

The fundamental query exposed by the Boundary Service is a point-in-polygon search by latitude and longitude. Here is an example:

http://boundaries.minnpost.com/1.0/boundary/?contains=44.954155,-93.1038669999999&sets=state-house-districts-2012

This will return the State House district (2012) that The Minnesota State Capitol resides in.

Note: In addition to the contains parameter we also pass the sets parameter to constrain the query. Its important to use this parameter to limit your queries to only the data you need so your queries will be fast.

Near queries

The near query finds all Boundaries that intersect a circle of a specified radius using a given point as its center:

http://boundaries.minnpost.com/1.0/boundary/?near=44.954155,-93.1038669999999,1km&sets=state-house-districts-2012

This returns all State House districts (2012) within one kilometre of The Minnesota State Capitol. The radius parameter may be specified in any units supported by GeoDjango.

Note: This query will execute more slowly than the point query.

Intersection queries

The intersects query finds all Boundaries which intersect a specified Boundary. For example, to find all State House districts (2012) which intersect the 4th Congressional district (2012), one would request:

http://boundaries.minnpost.com/1.0/boundary/?intersects=4-congressional-district-2012&sets=state-house-districts-2012

The Boundary Service does not currently support querying by arbitrary shapes.

JSONP

For use in client-side applications the Boundary Service API may be accessed via JSONP. Simply append the format and callback parameters to the query string:

http://boundaries.minnpost.com/1.0/boundary/?format=jsonp&callback=func

API Keys

By default all anonymous traffic is throttled. With an API key and username, throttling will be turned off. Please contact us to receive an API key and username. You can use the this in your calls like the following:

http://boundaries.minnpost.com/1.0/boundary/4-congressional-district-2012/?username=YOUR_USERNAME&api_key=YOUR_API_KEY

Source

Build your own boundary service!

The source code for Minnesota Boundaries is open source; you are welcome to copy, modify and reuse it as you see fit. We are also very happy to accept bug reports and patches!

The code for Minnesota Boundaries can be found at github.com/MinnPost/mn-boundaryservice, which was forked from github.com/opennorth/blank-boundaryservice.

License

All source and assets are licensed under the permissive MIT license, unless otherwise noted. Boundary data is licensed by their respective sources.

About

Minnesota Boundaries is a free service provided by MinnPost and was developed by MinnPost's interactive team. The application is based on software created by the News Applications team at the Chicago Tribune.

Open Data

The data for this project was acquired from a variety of agencies. Documentation of exactly how and where the data was retrieved is available by accessing any Boundary Set via the API. Examples can be found on the API page.