function updateMap(condition) {
            const mapVars = {
                "precip": "#precipPts",
                "soilm": "#soilmPts"
            };

            if (currentVar === 'discharge') {
                d3.select('#mrbG').attr("visibility", "visible");
                d3.select('#disTxtG').attr("visibility", "hidden");
            } else {
                d3.select(mapVars[currentVar]).attr("visibility", "hidden");
            }
            if (condition === 'discharge') {
                d3.select('#mrbG').attr("visibility", "hidden");
                div.style("opacity", "0");
                d3.select('#disTxtG').attr("visibility", "visible");
            } else {
                d3.select(mapVars[condition]).attr("visibility", "visible");
            }

            currentVar = condition;
        }
// update the map as radio buttons are selected
update the map as radio buttons are selected
update the map as radio buttons are selected
function updateMap(condition) {
            const mapVars = {
                "precip": "#precipPts",
                "soilm": "#soilmPts"
            };
            if (currentVar === 'discharge') {
                d3.select('#mrbG').attr("visibility", "visible");
                d3.select('#disTxtG').attr("visibility", "hidden");
            } else {
                d3.select(mapVars[currentVar]).attr("visibility", "hidden");
            }
            if (condition === 'discharge') {
                d3.select('#mrbG').attr("visibility", "hidden");
                div.style("opacity", "0");
                d3.select('#disTxtG').attr("visibility", "visible");
            } else {
                d3.select(mapVars[condition]).attr("visibility", "visible");
            }
            currentVar = condition;
        }
function updateMap ( condition ) { const mapVars = { "precip" : "#precipPts" , "soilm" : "#soilmPts" } ; if ( currentVar === 'discharge' ) { d3 . select ( '#mrbG' ) . attr ( "visibility" , "visible" ) ; d3 . select ( '#disTxtG' ) . attr ( "visibility" , "hidden" ) ; } else { d3 . select ( mapVars [ currentVar ] ) . attr ( "visibility" , "hidden" ) ; } if ( condition === 'discharge' ) { d3 . select ( '#mrbG' ) . attr ( "visibility" , "hidden" ) ; div . style ( "opacity" , "0" ) ; d3 . select ( '#disTxtG' ) . attr ( "visibility" , "visible" ) ; } else { d3 . select ( mapVars [ condition ] ) . attr ( "visibility" , "visible" ) ; } currentVar = condition ; }
update the map as radio buttons are selected
update the map as radio buttons are selected