ft-interactive/austerity-map

Name: austerity-map

Owner: FT Interactive News

Description: The map published as part of the FT Austerity Audit in 2013.

Created: 2016-02-24 16:20:08.0

Updated: 2016-02-26 11:42:17.0

Pushed: 2016-02-26 16:59:28.0

Homepage: http://ig.ft.com/austerity-map/

Size: 5225

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Getting set up
  1. Clone the repo.
  2. Run npm install && bower install to install dependencies.
  3. Run grunt server and the development version (with non-minified assets) should open in your browser.
Rebuilding data files

Do not manually edit any of the files in app/data. This folder contains three JSONP files that are included in the build, but should not be edited directly.

These files are generated by the grunt data task. Before running this, you need to configure your database settings like this:

  1. Make a copy of the database-settings_SAMPLE.coffee file, named database-settings.coffee.
  2. Edit the MySQL details in this new file (with details of the actual database and table containing the austerity data).

fields.js

This file defines the cuts, measures and presets. To edit them, just edit the source file in config/fields.coffee. Then run:

grunt data:fields

This will rebuild the app/data/fields.js file.

deviations.js

This file contains the information about the standard deviations, mean averages, and ranges of SDUs for all of the cut/measure combinations. To regenerate it, run:

grunt data:deviations

This uses the Martin's query (saved in data/get-deviations.sql) to build the devitations.js file.

local-authorities-topojson.js

This is the big file containing every local authority's map shape and austerity data. It is built based on a huge GeoJSON file exported from the OS Shapefile (data/la-shapes.json) and using the austerity data from the database. To rebuild it:

grunt data:topojson

To rebuild all three at once

grunt data

(Be aware that the topojson part takes ages.)

Building
grunt build

This creates the dist folder, which contains your built project.

You may need to manually 'rev' the filenames.

Local development
grunt server

This serves a development version of the map locally, without minifying the assets.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.