diff --git a/scripts/get-data.sh b/scripts/get-data.sh
index 73dbb84fc..38d757cfa 100755
--- a/scripts/get-data.sh
+++ b/scripts/get-data.sh
@@ -75,4 +75,12 @@ do
curl http://data.nextstrain.org/"${i}" --compressed -o data/"${i}"
done
+staging_files=(
+ "testing_states.json" \
+)
+for i in "${staging_files[@]}"
+do
+ curl http://staging.nextstrain.org/"${i}" --compressed -o data/"${i}"
+done
+
echo "The local data directory ./data now contains up-to-date datasets from http://data.nextstrain.org"
diff --git a/src/components/main/index.js b/src/components/main/index.js
index 8aa27ff41..bcf1e93e6 100644
--- a/src/components/main/index.js
+++ b/src/components/main/index.js
@@ -6,6 +6,7 @@ import SidebarToggle from "../framework/sidebar-toggle";
import Info from "../info/info";
import Tree from "../tree";
import Map from "../map/map";
+import States from "../states/states";
import { controlsHiddenWidth } from "../../util/globals";
import Footer from "../framework/footer";
import DownloadModal from "../download/downloadModal";
@@ -141,6 +142,7 @@ class Main extends React.Component {
}
{this.props.displayNarrative || this.props.showOnlyPanels ? null : }
{this.props.panelsToDisplay.includes("tree") ? : null}
+
{this.props.panelsToDisplay.includes("map") ? : null}
{this.props.panelsToDisplay.includes("entropy") ?
(
diff --git a/src/components/map/map.js b/src/components/map/map.js
index 3ec2b2c5b..30753399a 100644
--- a/src/components/map/map.js
+++ b/src/components/map/map.js
@@ -205,6 +205,9 @@ class Map extends React.Component {
// const initialVisibilityVersion = this.props.visibilityVersion === 1; /* see tree reducer, we set this to 1 after tree comes back */
// const newVisibilityVersion = this.props.visibilityVersion !== prevProps.visibilityVersion;
+ // following is temporary and only for prototyping
+ if (!this.props.metadata.geoResolutions.filter((x) => x.key === this.props.geoResolution)[0].demes) return;
+
if (mapIsDrawn && allDataPresent && demesTransmissionsNotComputed) {
timerStart("drawDemesAndTransmissions");
/* data structures to feed to d3 latLongs = { tips: [{}, {}], transmissions: [{}, {}] } */
@@ -365,6 +368,10 @@ class Map extends React.Component {
*/
maybeUpdateDemesAndTransmissions(nextProps) {
if (!this.state.map || !this.props.treeLoaded || !this.state.d3elems) { return; }
+
+ // following is temporary and only for prototyping
+ if (!nextProps.metadata.geoResolutions.filter((x) => x.key === nextProps.geoResolution)[0].demes) return;
+
const visibilityChange = nextProps.visibilityVersion !== this.props.visibilityVersion;
const haveData = nextProps.nodes && nextProps.visibility && nextProps.geoResolution && nextProps.nodeColors;
diff --git a/src/components/map/mapHelpersLatLong.js b/src/components/map/mapHelpersLatLong.js
index 8a213e18b..9119bd9e1 100644
--- a/src/components/map/mapHelpersLatLong.js
+++ b/src/components/map/mapHelpersLatLong.js
@@ -49,7 +49,7 @@ const maybeGetTransmissionPair = (latOrig, longOrig, latDest, longDest, map) =>
* Traverses the tips of the tree to create a dict of
* location(deme) -> list of visible tips at that location
*/
-const getVisibleNodesPerLocation = (nodes, visibility, geoResolution) => {
+export const getVisibleNodesPerLocation = (nodes, visibility, geoResolution) => {
const locationToVisibleNodes = {};
nodes.forEach((n, i) => {
if (n.children) return; /* only consider terminal nodes */
@@ -73,7 +73,7 @@ const getVisibleNodesPerLocation = (nodes, visibility, geoResolution) => {
* @param {array} currentArcs only used if updating. Array of current arcs.
* @returns {array} arcs for display
*/
-const createOrUpdateArcs = (visibleNodes, legendValues, colorBy, nodeColors, currentArcs=undefined) => {
+export const createOrUpdateArcs = (visibleNodes, legendValues, colorBy, nodeColors, currentArcs=undefined) => {
const colorByIsGenotype = isColorByGenotype(colorBy);
const legendValueToArcIdx = {};
const undefinedArcIdx = legendValues.length; /* the arc which is grey to represent undefined values on tips */
diff --git a/src/components/states/states.js b/src/components/states/states.js
new file mode 100644
index 000000000..497495fa6
--- /dev/null
+++ b/src/components/states/states.js
@@ -0,0 +1,250 @@
+import React from "react";
+import { connect } from "react-redux";
+import { withTranslation } from "react-i18next";
+import { select } from "d3-selection";
+import { interpolateNumber } from "d3-interpolate";
+import ErrorBoundary from "../../util/errorBoundry";
+import Legend from "../tree/legend/legend";
+import Card from "../framework/card";
+import { getVisibleNodesPerLocation, createOrUpdateArcs } from "../map/mapHelpersLatLong";
+import { getAverageColorFromNodes } from "../../util/colorHelpers";
+import { drawDemesAndTransmissions } from "../map/mapHelpers";
+import { getTraitFromNode } from "../../util/treeMiscHelpers";
+import { bezier } from "../map/transmissionBezier";
+import { NODE_NOT_VISIBLE } from "../../util/globals";
+
+/**
+ * This is a prototype.
+ * There are numerous calls into functions and use of data structures designed
+ * for the