-
-
Save rpardee/c4b7e4036c26d1221fa3d1cd5f1bf760 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var outcomes_health ; | |
function filter_down(indata) { | |
const cols = indata.columns; | |
let values = {}; | |
indata.columns.forEach(col => (values[col] = d3.map(indata, d => d[col]).keys())); | |
outcomes_health = values['health_outcomes'] ; | |
} | |
async function get_values() { | |
let data = await d3.csv('https://raw.githubusercontent.com/lennymd/test_evidence_map/main/public/data/column_values.csv'); | |
filter_down(data) ; | |
console.log(outcomes_health) ; // works! | |
} | |
get_values() ; | |
console.log(outcomes_health) ; // runs first--and returns undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment