chooseFile = {
const bgwn7 = d3.range(9, 12.5, .5).map(d => d.toFixed(1).replace('.','_'));
const chin7 = d3.range(29.5, 40, .5).map(d => d.toFixed(1).replace('.','_'));
const files = ["Florence"].concat(bgwn7).concat(chin7);
const florence = "https://pbogden.com/mapping/data/florence/AL062018_pts.shp";
const inundation_base = "https://pbogden.com/mapping/data/inundation/shapefiles/";
const bfiles = bgwn7.map((d,i) => { return inundation_base + "polygons/" + d + ".shp" });
const cfiles = chin7.map((d,i) => { return inundation_base + "shp/ahps/inundation/chin7/polygons/" + d + ".shp" });
d3.select(viewof choice).append('input')
.attr('type', 'button')
.attr('value', 'florence')
.on('click', (d, i) => {
mutable x = [d,i, florence];
mutable z = getData(florence);
})
d3.select(viewof choice).select("#bgwn7").selectAll("input")
.data(bgwn7)
.enter().append('input')
.attr('type', 'button')
.attr('value', d => d)
.on('click', (d, i) => {
mutable x = [d,i, bfiles[i]];
mutable z = getData(bfiles[i]);
})
return [florence, bfiles, cfiles]
}