Coder Social home page Coder Social logo

hock / manifest Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 4.0 554.17 MB

Manifest is an investigative toolkit intended for researchers, journalists, students, and scholars interested in visualizing, analyzing, and documenting supply chains, production lines, and trade networks.

Home Page: https://supplystudies.com/manifest/

HTML 3.71% CSS 0.07% JavaScript 86.29% Hack 3.57% Less 6.37%
supplychains logistics sourcemap manifest journalism research

manifest's People

Contributors

chrismad25 avatar hock avatar lennox55555 avatar

Stargazers

 avatar  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

manifest's Issues

Visualizing Multiple Supply Chains

While visualizing multiple supply chains works great on the map, it doesn't do so great with other visualizations. For example, right now two or three supply chains all jostle for space when viewed as a graph. We need:

  1. A design proposal.
  • should these all be integrated into one graph, etc.
  • should there be some non-map visualization interface for toggling them
  • should there be some sidebar based interfaced for selecting things
  • should we just use the layer pane to do this (right now it alters the transparency of nodes, etc.. which is NOT how it works on the map (where it complete removes these nodes).
  1. An implementation of that proposal.

Add Support for More Detailed Hops

Currently lines between nodes have no user-defined information. Add (optional) support for adding more detailed data to lines at the user level (in google sheets, for example, this may take the form of an additional sheet detailed lines, allowing users to add measures, etc.

Rebuild manifester.js in ExpressJS

Our minimal web service (manifester.js) is a little bit -too- minimal for continued expansion. We should reimplement the very basic logic in expressjs so we have some framework support to expand this a bit going forward.

Google Sheets Importer Bugs

The google sheets importer has a number of processing bugs:

  • It cannot handle commas in images (and since plenty of images use this, we should probably change the separator more generally... I suggest some unwise--and therefore infrequently used--character like "|"). We should make sure the google sheets entry logic is somewhat standardized.
  • It cannot handle plus (+) in urls (confirmed in the source column)
  • The name of a measure cannot be "length" (keyword conflict probably)

Add DestinationIndex to FormatGSHEET

Haven't been able to build Manifest locally yet so not sure this would work but perhaps its as simple as reusing the same conditional logic from FormatMANIFEST?

FormatGSHEET(d, options) {
d.raw = JSON.parse(JSON.stringify(d));
let sheetoverview = this.GSheetToJson(d.g)[0];
let sheetpoints = this.GSheetToJson(d.r);
let sheetid = options.id;
let sheetsc = {type:'FeatureCollection', mtype: 'gsheet', features: [], properties: { title: sheetoverview.name, description: sheetoverview.description, address: sheetoverview.rootaddress, geocode: sheetoverview.rootgeocode, measure: sheetoverview.measure }, details: options, mapper: {}, raw: d.raw, stops: [], hops: []};
sheetsc.details.layers = []; sheetsc.details.measures = {};
sheetsc.details.url = '#gsheet-'+sheetsc.details.url.split('&id=')[1];
for (let point of sheetpoints) {
let j = sheetsc.features.length;
sheetsc.features[j] = {type: 'Feature'};
sheetsc.features[j].properties = {};
sheetsc.features[j].properties.title = point.name;
sheetsc.features[j].properties.description = point.description;
sheetsc.features[j].properties.placename = point.location;
sheetsc.features[j].properties.category = point.category;
sheetsc.features[j].properties.sources = point.sources;
sheetsc.features[j].properties.notes = point.notes;
sheetsc.features[j].properties.measures = {};
sheetsc.features[j].geometry = {type:'Point', coordinates:[Number(point.geocode.split(',')[1]), Number(point.geocode.split(',')[0])]};
sheetsc.stops.push({ 'local_stop_id':Math.max(1,j), 'id':Math.max(1,j), 'attributes':sheetsc.features[j].properties });
}
return sheetsc;

84 to 7507 in 260d1a7

 FormatGSHEET(d, options) { 
 	d.raw = JSON.parse(JSON.stringify(d)); 
 	let sheetoverview = this.GSheetToJson(d.g)[0]; 
 	let sheetpoints = this.GSheetToJson(d.r); 
 	let sheetid = options.id; 
  
 	let sheetsc = {type:'FeatureCollection', mtype: 'gsheet', features: [], properties: { title: sheetoverview.name, description: sheetoverview.description, address: sheetoverview.rootaddress, geocode: sheetoverview.rootgeocode, measure: sheetoverview.measure }, details: options, mapper: {}, raw: d.raw, stops: [], hops: []}; 
 	sheetsc.details.layers = []; sheetsc.details.measures = {}; 
 	sheetsc.details.url = '#gsheet-'+sheetsc.details.url.split('&id=')[1]; 
 	for (let point of sheetpoints) { 
 		let j = sheetsc.features.length; 
 		sheetsc.features[j] = {type: 'Feature'};			 
 		sheetsc.features[j].properties = {};	 
 		sheetsc.features[j].properties.title = point.name; 
 		sheetsc.features[j].properties.description = point.description; 
 		sheetsc.features[j].properties.placename = point.location; 
                if (point.destinationindex !== '') {
                            let hops = point.destinationindex.split(',');
                            for (let h in hops) { d.hops.push({ from_stop_id:Number(sheetoverview.index), to_stop_id:Number(hops[h]), attributes:ft.properties}); }
                }
 		sheetsc.features[j].properties.category = point.category; 
 		sheetsc.features[j].properties.sources = point.sources; 
 		sheetsc.features[j].properties.notes = point.notes; 
 		sheetsc.features[j].properties.measures = {}; 
 		sheetsc.features[j].geometry = {type:'Point', coordinates:[Number(point.geocode.split(',')[1]), Number(point.geocode.split(',')[0])]};				 
 		sheetsc.stops.push({ 'local_stop_id':Math.max(1,j), 'id':Math.max(1,j), 'attributes':sheetsc.features[j].properties }); 
 	}		 
 	return sheetsc; 

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.