From 0b80f5ce3b7a6557a9a83a81ed394fb5e0348afb Mon Sep 17 00:00:00 2001 From: mikekinde <144503748+mikekinde@users.noreply.github.com> Date: Thu, 8 Feb 2024 10:58:48 -0600 Subject: [PATCH] Update bubble-maps.md In the python code that sets the variable "limits", the range numbers are resulting in missed values. This is because the first number in the list pair is inclusive while the second number is exclusive. For example, the limit pair of (0,2) only iterates through two loops (0 & 1) instead of three. The net result is that the map doesn't include the "2" city (Chicago). --- doc/python/bubble-maps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python/bubble-maps.md b/doc/python/bubble-maps.md index ccd78306bc2..23e1d543824 100644 --- a/doc/python/bubble-maps.md +++ b/doc/python/bubble-maps.md @@ -85,7 +85,7 @@ df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/2014_ df.head() df['text'] = df['name'] + '
Population ' + (df['pop']/1e6).astype(str)+' million' -limits = [(0,2),(3,10),(11,20),(21,50),(50,3000)] +limits = [(0,3),(3,11),(11,21),(21,50),(50,3000)] colors = ["royalblue","crimson","lightseagreen","orange","lightgrey"] cities = [] scale = 5000