GithubHelp home page GithubHelp logo

dnalob / open-election-map Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cmgiven/open-election-map

0.0 1.0 0.0 1004 KB

Election map for DC's 2014 general election

Home Page: http://electionmap.wamu.org

License: Creative Commons Zero v1.0 Universal

CSS 8.45% HTML 2.87% JavaScript 88.10% Ruby 0.58%

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

Watchers

James Cloos avatar

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.