Giter VIP home page Giter VIP logo

open-election-map's Introduction

Created by Code for DC. Published as a public domain work under the CC0 License.

So you want a election map?

You will need

  • A topojson file showing the boundaries of voting districts in your jurisdiction. You'll probably need to find a shapefile (.shp) of these boundaries, perhaps from a board of elections or government data portal, and convert it to the topojson format (look in the 'Converting Data' section of this useful tutorial). Save this file as data/precinct-boundaries.json.
  • A Google Spreadsheet matching the format of this one, but with your own candidates and results. A starting point for demographic data about voting districts is the US Census Bureau's American FactFinder website, where you'll need to select the geographic type 'Voting District' from the advanced search interface.

You can easily customize

  • The header and footer in the index.html file.
  • The Google Analytics tracking code in the index.html file.
  • The location of your Google Spreadsheet in the update-data.rb file.
  • The REFRESH_DELAY in the js/main.js file to enable automatic refreshing of data.
  • The TOOLTIP_DESCRIPTION in the js/main.js file to customize how a voting district is identified with additional information from the vtd spreadsheet (i.e. to describe "Precinct 48" as "North Springfield").
  • The AVAILABLE_FILTERS in the js/main.js file to customize the filtering options based on the data you have available.

To get started

  • Easiest way to host the map is by using Github Pages.
  • Run the command ./update-data.rb from the project directory in order to grab the latest data from your Google Spreadsheet (you'll either need a Mac or need a Linux machine with Ruby installed). Alternatively, you can download your Google Spreadsheet as a CSV file and replace the data in the data/ directory.

open-election-map's People

Contributors

cmgiven avatar

Stargazers

 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

open-election-map's Issues

Add a civic.json file

A civic.json file provides information about this project that's not included in the Github metadata. The full details of the format are here. Just put it in the root of your repo and we'll automatically display that info on the projects page.

Code for DC also has a tool to help put the file together here, and a validator to make sure everything's in the right place here.

(Also, since Code for DC is tracking this project, any issues tagged with help wanted will show up on http://codefordc.org/projects/helpwanted.html. If you are stuck on something, try that!)

Comments on pre-release of map solicited from DC-CFA Listserv

  1. The position of the map kind of fights with the ability to see the dashboard w/ the actual data. The main issue is that you have to shift your browser resolution to get the full map and the dashboard in the same view.
  2. There is also some weirdness w/ displaying the hover-over data in the dash because it means you have to roll over and off to see how the location compares to the totality of returns at that moment.
  3. Specifically, if you have it, metadata about the district would be great, like what ward it is in, how many votes are actually coming from that precinct, maybe some select data that is also feeding the filters that you have on the side (which are awesome).

Just my thoughts. Really looking forward to this.

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.