From 4d8c9bbce78835caa625280107e9dac380b60646 Mon Sep 17 00:00:00 2001 From: Yousuf Yesil <102487215+yousufyesil@users.noreply.github.com> Date: Sat, 7 Jun 2025 21:15:11 +0200 Subject: [PATCH] Update 2015-08-11-US-pop-by-state-choropleth.html Update to newest version of d3 because this shown version was deprecated and didn't work in practice --- .../2015-08-11-US-pop-by-state-choropleth.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/_posts/plotly_js/maps/choropleth-maps/2015-08-11-US-pop-by-state-choropleth.html b/_posts/plotly_js/maps/choropleth-maps/2015-08-11-US-pop-by-state-choropleth.html index dc4755bcf..849ba1776 100644 --- a/_posts/plotly_js/maps/choropleth-maps/2015-08-11-US-pop-by-state-choropleth.html +++ b/_posts/plotly_js/maps/choropleth-maps/2015-08-11-US-pop-by-state-choropleth.html @@ -7,10 +7,15 @@ arrangement: horizontal --- -d3.csv('https://raw.githubusercontent.com/plotly/datasets/master/2014_usa_states.csv', function(err, rows){ - function unpack(rows, key) { -return rows.map(function(row) { return row[key]; }); -} +d3.csv('https://raw.githubusercontent.com/plotly/datasets/master/2014_usa_states.csv') + .then(function(rows) { + function unpack(rows, key) { + return rows.map(function(row) { return row[key]; }); + } + + // hier kannst du deine weitere Verarbeitung starten + }) + var data = [{ type: 'choropleth', locationmode: 'USA-states',