KathmanduLivingLabs/bhimeshwor-casualty-map

Name: bhimeshwor-casualty-map

Owner: Kathmandu Living Labs

Description: null

Created: 2015-06-01 02:08:49.0

Updated: 2015-06-01 02:18:50.0

Pushed: 2015-06-22 19:27:52.0

Homepage: null

Size: 10380

Language: CSS

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

About

This map show Casualties in Dolakha district from the April 25th earthquake in Nepal. Casualty data can be found here.

This app frame is built using the Foundation responsive framework and jeykll pages.

Dependencies
Beginning steps
  1. Clone the repo: git clone https://github.com/energyapps/app-frame-foundation.git
  2. Get access to google docs by asking Dan Wood.
  3. Build the Jekyll site/ folder by running jekyll build in the home directory. I recommend running jekyll build –watch, which automatically rebuilds your site folder whenever you change something in the directory.
  4. Run the jekyll server by running jekyll serve. You can now see your page at localhost:4000
Steps to update the data
  1. See if data has been updated here.

  2. Make a copy the most recently created data in /Nepal/quake_casualties and update the name. Naming should be nepal_quake_YY_MM_DD_HH using military time in NST.

  3. The first page autocopied contains the data automatically ported over from the gov't website.

  4. names and population 2011 are static and used for calculating names/totals in casualty and population. Leave these two alone.

  5. Check casualty and population sums (at bottom) and ensure that they are calculating the correct totals

  6. Export casualty and population as a csv named same as above: nepal_quake_YY_MM_DD_HH. Place in the /data/

  7. Run topojson in your /data/ folder using the following script, inputting your csv name as shown:

    topojson -o districts_topo.json –id-property 'vcode, vcode' –external-properties=data.csv –properties='district=vdc_name' –properties='dead=dead' –properties='injured=injured' –properties='GovComplete=GovComplete' –properties='GovPartial=GovPartial' –properties='OthComplete=OthComplete' –properties='OthPartial=OthPartial' –properties='population=population' –properties='deadpercent=deadpercent' –properties='injuredpercent=injuredpercent' – vdcs.geojson;

  8. Update date in index.html, iframe.html (2 places on each page)

  9. Update casualty totals in index.html, iframe.html

  10. Check to make sure that the correct numbers are showing on the map, and there are no errors, on localhost:4000. (i.e. make sure that jekyll has rebuilt the _site/ directory.)

  11. push to gh-pages on github using this commit message “data update Month D, YYYY HHMM NST”

Organziation of files

Needs updating. You should mainly be interested in adding data to the /data/ folder and editing the DOM info on index.html and iframe.html

  1. root directory
    • README.md
      • You are here.
    • index.html
      • Where you put your markup. The header info is for Jekyll. Leave it alone.
    • iframe.html -Where you put your markup for the iframe file that is served on quakerelief.info.
  2. _layout/
    • The _layouts/ folder is the Jekyll folder that contains layouts for any type of page within a jekyll site.
    • default.html
      • This is a very rough cannibalization of the DOM elements in energy.gov/maps element.
      • Markup, CSS, and JS are merged here automatically by Jekyll, though you may need to update the links based on the js and css pages you create (below).
      • Contains links to JS, CSS in other folders (see below), as well as links to external energy.gov css files.
    • iframe_default.html - Where the iframe css and js paths are located
    • treatments_default.html - ignore this.
  3. _site/
    • This is the folder that is generated by Jekyll and holds the merged static webpages.
  4. js/
    • foundation.min.js
      • The Foundation javascript library.
    • script.js
      • script that executes all commands on graphic. This would be added to the maps content type.
  5. css/
    • foundation/
      • contains the foundation.js CSS presets.
      • foundation_doe.css is the edited foundation document.
    • style.css
      • custom css to be added to map. CSS that would be added to the maps content type.
    • master_style.css
      • A static copy of the above as a fallback when the energy.gov links break.
    • fonts.css
      • a collection of some commonly used energy.gov fonts
Updated: 5/2/15 1500 NST

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.