var g = {
	nodes: [
		 {
		   "id": "n0",
		   "label": "CTPs",
		   "x": -1,
		   "y": 0,
		   "size": 2,
		   "color": "#000",
		   "hover_color": "#000"
		 },
		 {
		   "id": "n1",
		   "label": "Community/NFIP/Mayor",
		   "x": 1,
		   "y": 0,
		   "size": 2,
		   "color": "#000",
		   "hover_color": "#000"
		 },
		 {
		   "id": "n2",
		   "label": "FEMA",
		   "x": 0,
		   "y": 1,
		   "size": 2,
		   "color": "#000",
		   "hover_color": "#000"
		 },
		 {
		   "id": "n3",
		   "label": "PMR",
		   "x": 0,
		   "y": 2,
		   "size": 2,
		   "color": "#000",
		   "hover_color": "#000"
		 },
		 {
		   "id": "n4",
		   "label": "LOMR",
		   "x": 1,
		   "y": 1,
		   "size": 2,
		   "color": "#000",
		   "hover_color": "#000"
		 },
		 {
		   "id": "n5",
		   "label": "Report",
		   "x": 1,
		   "y": 2,
		   "size": 2,
		   "color": "#000",
		   "hover_color": "#000"
		 },
		 {
		   "id": "n6",
		   "label": "Community input",
		   "x": -2,
		   "y": 2.5,
		   "size": 2,
		   "color": "#000",
		   "hover_color": "#000"
		 },
		 {
		   "id": "n7",
		   "label": "Short-term map",
		   "x": -1,
		   "y": 3.2,
		   "size": 2,
		   "color": "#ff0000",
		   "hover_color": "#ff0000"
		 },
		 {
		   "id": "n8",
		   "label": "Data viewer",
		   "x": 0,
		   "y": 4,
		   "size": 2,
		   "color": "#ff0000",
		   "hover_color": "#ff0000"
		 },
		 {
		   "id": "n9",
		   "label": "Long-term map",
		   "x": 0,
		   "y": 2.8,
		   "size": 2,
		   "color": "#ff0000",
		   "hover_color": "#ff0000"
		 },
		 {
		   "id": "n10",
		   "label": "Metadata",
		   "x": 1.2,
		   "y": 3.2,
		   "size": 2,
		   "color": "#ff0000",
		   "hover_color": "#ff0000"
		 }
		],

	edges: [
		 {
		   "id": "e0",
		   "source": "n0",
		   "target": "n2",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "Community Technical Partners (CTPs) - for example, private firms or universities with the technical capability to undertake flood risk modelling - can initiate a map revision process. In such cases, FEMA awards the CTP a grant to undertake the modelling. The CTP then turns over the results to FEMA."
		 },
		 {
		   "id": "e1",
		   "source": "n1",
		   "target": "n2",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ad5353",
		   "hover_color": "#ff0000",
		   "caption": "Make it easier for communities to make changes. Also, make it open source so that communities can do their own modelling and request changes."
		 },
		 {
		   "id": "e2",
		   "source": "n2",
		   "target": "n2",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ad5353",
		   "hover_color": "#ff0000",
		   "caption": "Require FEMA to update the maps more frequently"
		 },
		 {
		   "id": "e3",
		   "source": "n2",
		   "target": "n3",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "After receiving a request, FEMA can undertake a Physical Map Revision (PMR), a revision of the map panel -- the official map document showing flood risk."
		 },
		 {
		   "id": "e4",
		   "source": "n2",
		   "target": "n4",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "After receiving a request, FEMA can choose not to revise the map panel with a Physical Map Revision and instead modify the accompanying notes through a Letter of Map Revision (LOMR). In this case, the map panel does not reflect FEMA's flood risk assessment or who is required to purchase insurance until the next Physical Map Revision."
		 },
		 {
		   "id": "e5",
		   "source": "n4",
		   "target": "n5",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "The LOMR process results in a report of alterations that accompanies the map panels."
		 },
		 {
		   "id": "e6",
		   "source": "n5",
		   "target": "n3",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "A LOMR report is used to modify the map panel during the subsequent Physical Map Revision process."
		 },
		 {
		   "id": "e7",
		   "source": "n3",
		   "target": "n7",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ad5353",
		   "hover_color": "#ff0000",
		   "caption": "FEMA should produce two types of flood insurance map: a short-term map and a long-term map. This would allow FEMA to calculate flood risk under sea level rise without immediately requiring more people to buy flood insurance."
		 },
		 {
		   "id": "e8",
		   "source": "n6",
		   "target": "n7",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ccc",
		   "hover_color": "#000",
		   "caption": "The PMR process takes longer than LOMR because it includes a process to solicit community input on the new map."
		 },
		 {
		   "id": "e9",
		   "source": "n7",
		   "target": "n8",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ad5353",
		   "hover_color": "#ff0000",
		   "caption": "Make FEMA's flood data viewer more accessible for a general public. Encourage the development of local flood risk data viewers."
		 },
		 {
		   "id": "e10",
		   "source": "n3",
		   "target": "n9",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ad5353",
		   "hover_color": "#ff0000",
		   "caption": "FEMA should produce two types of flood insurance map: a short-term map and a long-term map. This would allow FEMA to calculate flood risk under sea level rise without immediately requiring more people to buy flood insurance."
		 },
		 {
		   "id": "e11",
		   "source": "n3",
		   "target": "n10",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ad5353",
		   "hover_color": "#ff0000",
		   "caption": "FEMA should release more metadata about its flood risk maps, including who initated each revision process in an area, what was the result of that process, and what contractor or model was used to generate the prediction."
		 },
		 {
		   "id": "e12",
		   "source": "n9",
		   "target": "n8",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ad5353",
		   "hover_color": "#ff0000",
		   "caption": "Make FEMA's flood data viewer more accessible for a general public. Encourage the development of local flood risk data viewers."
		 },
		 {
		   "id": "e13",
		   "source": "n10",
		   "target": "n8",
		   "type": "curvedArrow",
		   "size": 3,
		   "color": "#ad5353",
		   "hover_color": "#ff0000",
		   "caption": "Make FEMA's flood data viewer more accessible for a general public. Encourage the development of local flood risk data viewers."
		 }
		 ]
	};

var s = new sigma({
  graph: g,
  renderer: {
    container: document.getElementById('sigma-proposal-container'),
    type: 'canvas'
  },
  settings: {   
      minEdgeSize: 0.5,
		maxEdgeSize: 4,
	  enableEdgeHovering: true,
	  defaultEdgeHoverColor: '#ff0000',
	  edgeHoverColor: 'edge',
	  edgeHoverSizeRatio: 1.5,
	  edgeHoverExtremities: true,
	  nodeHoverColor: 'node',
	  enableCamera:false,
	  sideMargin: 1,
	  minZoom: 1.5,
	  mouseWheelEnabled: false
  
	}
});

	
s.bind('overEdge outEdge', function(e) {
  document.getElementById("proposal-caption").innerHTML = e.data.edge.caption;
  });