Giter VIP home page Giter VIP logo

open-redistricting's Introduction

US Open Data: Open Redistricting

A website and toolset documentation for moving the redistricting process into public view. Produced by Stamen Design for US Open Data in 2016.

How it works

The Open Redistricting website offers a simple interface for uploading current and proposed district maps (in .geojson format), annotating and revising them, and supporting public feedback. It is basically a GitHub / Git client, designed to leverage the benefits of those tools without requiring users to familiarize themselves with them.

Open Redistricting repurposes core GitHub/Git features for the context of drawing legislative district maps as follows:

GitHub/Git Open Redistrcting
Repository Project
Pull Request/Branch Proposal
Branch commit Proposal revision

Resources

  • The Open Redistricting website is available for use by legislative redistricting staff and interested members of the public.
  • The workflow documentation outlines the GitHub/Git workflow facilitated by the website, without use of the website itself. Users may wish to roll their own implementation of the Open Redistricting tool to their own specifications, following these guidelines.

Running / Deploying

To run locally, you'll want to:

  • install NVM to manage your Node.js version
  • install YVM to manage your Yarn version
  • git clone this repository
  • and then:
nvm use
yarn use
yarn
yarn start

Deploying is as simple as npm run gh-deploy.

open-redistricting's People

Contributors

ericsoco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-redistricting's Issues

Implement thumbs up/down (reactions)

@waldoj says thumbs up/down voting is "useless...but necessary". Not of any intrinsic/real value for determining quality of proposal, but great for promoting engagement: a casual user may not care enough to comment on a proposal, but if they get an email encouraging them to "stop by and give it a thumbs up" then there's a higher chance of getting at least a minimal level of engagement, from a broader user base.

GitHub reactions API

List basic assumptions we're making

Create a document about the basic assumptions that underlie this: e.g., that we're using GitHub as the backend, the technical sophistication about each type of user, what kind of agencies or organizations that we expect to deploy it, etc.

Permissions issues

The intended permissions are as follows:

  1. Any member of open-redist can create a new project.
  2. Anyone can create a new proposal.

However, I ran into some last-minute permissions issues trying to make these things possible:

  1. It's not enough for a user to be a member of open-redist; the member must publicize his/her membership via open-redist's people page.

I ran into problems with the endpoint for checking all members (whether public or not) 302 redirecting and breaking the preflight request; instead, we use the endpoint for public members and therefore require public membership to create a project.

I'm not sure how to fix this problem; I expected the all-members API request to work, especially if the requester is a member of the org. But it does not.

  1. In order to create a proposal, a user must be an owner of open-redist. I believe this is due to the flow used to create a proposal:
  • first, a branch is created on the repo;
  • then, the PR is issued from that.

If the user is not an org owner / repo admin, the user has no rights to create a branch directly on the project repo; instead, a pull request (proposal) can only be made from a fork. The fix to this is most likely to programmatically (via the API) create a fork and issue the PR from that, instead of creating a branch directly on the repo.

Maintain map states in hash for ProposalPage

Store zoom/lat/lon in the hash for every map (current, proposed, diff) that supports pan/zoom.

Thinking of use case like e.g. 2003 Texas Redistricting, in which a specific part of the overall district map (in TX 2003, Travis County) is worth zooming in on. Could be valuable to zoom into a place of interest to share / annotate, e.g. on social media, in proposal page comments, etc.

Mock up ideas for Continuous Integration

Future versions of this tool-on-GitHub could author and integrate CI modules to provide information about proposals-as-PRs. When an edit is committed and pushed, these modules could generate metadata about contiguity, population count and balance, and demographic / ethnographic information. These metadata could appear on each commit like CI badges.

It's probably out of scope for us to build them for this project, but we can put some design thinking to it and mock something out for future implementers.

Support alternate proposal bases

Currently, createProposal branches off master only. This makes it possible to issue a proposal only off of the current district map.

This is probably enough for most use cases, especially given we support proposal revisions, but it might be worthwhile to add support for branching off an arbitrary branch (base one proposal on another). I'm running into this as I author sample projects.

Upgrade to Leaflet v1.0

1.0 finally came out, and has a bajillion improvements, notably big speed improvements that might help us with large maps. This should be as simple as updating package.json.

Share functionality / widget

Add to the project, even if it's just a line item in the Appendix that describes the sort of widget we think would be useful
Perhaps it's a link to a page with the diffs map (existing and proposed) with comments

launch plan

  • rename this repo to something more descriptive
  • finish documentation
  • coordinate timing with waldo
  • map diff component
  • verbage about what this is and what state it's in, and about how we may use/deploy this in the future (help from waldo on this)

...and more! think this through & communicate with @ericrodenbeck and @iamjimstanley

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.