Website: http://railroads.unl.edu/mobility-after-emancipation/
This is a single page view with visualizations of data collected from seven Freedmen's Bureaus' labor contracts at the Civil War's conclusion.
- Alexandria (1866)
- Camp Nelson (1865)
- Chattanooga (1866)
- Louisville (1866 - 1867)
- Memphis (1865)
- Petersburg (1865)
- Wisewell Barracks (1866 - 1867)
This site pregenerates the JSON used to power the map, charts, and table views from a CSV in order to accomplish the goal of zero database integration and "dropability" of the site into multiple environments.
The map is powered by Leaflet. Its base layer is pulling from Stamen Design's Toner Lite and therefore also OpenStreetMap.
The map also utilizes a slider for date range selection, LeafletSlider, from a fork's branch removeAllMarkers. The slider requires jQuery UI.
Finally, the map's fullscreen ability is provided by leaflet.fullscreen.
The charts and table are built with d3.js. Fortunately, despite d3 being unfamiliar territory, the following tutorials and answers were helpful in the construction of these features.
- D3 Dynamic Pie Chart Demo (majority of code's construction)
- D3 Dynamic Array of Tables
- Doughnut Transition demo
- Simple Pie Chart
- Stack Overflow changing labels
The layout of this site uses Bootstrap and jQuery.
Install ruby 2.4.1. The script is running off of data at pregeneration/csv/contracts.csv
. Make changes as needed, then run:
ruby pregeneration/scripts/pregenerate.rb
This will update the files in the data repository. You should see changes immediately upon refreshing your browser.