Skip to content

Commit 0b80f5c

Browse files
authored
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).
1 parent f5bc9b1 commit 0b80f5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: doc/python/bubble-maps.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/2014_
8585
df.head()
8686

8787
df['text'] = df['name'] + '<br>Population ' + (df['pop']/1e6).astype(str)+' million'
88-
limits = [(0,2),(3,10),(11,20),(21,50),(50,3000)]
88+
limits = [(0,3),(3,11),(11,21),(21,50),(50,3000)]
8989
colors = ["royalblue","crimson","lightseagreen","orange","lightgrey"]
9090
cities = []
9191
scale = 5000

0 commit comments

Comments
 (0)