From 0d45199aba93b6fdf6f75608d5782c24ed267703 Mon Sep 17 00:00:00 2001 From: Shanmukha Sai Bapiraj Vinnakota <78416587+bapiraj@users.noreply.github.com> Date: Sun, 15 Mar 2026 22:50:58 -0700 Subject: [PATCH 1/2] Fix duplicate index check in _lat_lons_from_geojson --- datascience/maps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datascience/maps.py b/datascience/maps.py index 652491b3..6a36c27b 100644 --- a/datascience/maps.py +++ b/datascience/maps.py @@ -904,7 +904,7 @@ def _lat_lons_from_geojson(s): GeoJSON coordinates are always stored in (longitude, latitude) order. """ - if len(s) >= 2 and isinstance(s[0], _number) and isinstance(s[0], _number): + if len(s) >= 2 and isinstance(s[0], _number) and isinstance(s[1], _number): lat, lon = s[1], s[0] return [(lat, lon)] else: From 87dc85beed3ae9e721482e74e16f9e243d1dc09a Mon Sep 17 00:00:00 2001 From: Shanmukha Sai Bapiraj Vinnakota <78416587+bapiraj@users.noreply.github.com> Date: Sun, 15 Mar 2026 22:58:14 -0700 Subject: [PATCH 2/2] Update CHANGELOG for v0.18.2 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6580b577..b1201771 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +### v0.18.2 +* Fixed duplicate index check in `_lat_lons_from_geojson` where `s[0]` was validated twice instead of checking both `s[0]` and `s[1]` + ### v0.18.1 * Added optional `seed` parameter to `sample_proportions()` for reproducible results * Added optional `seed` parameter to `proportions_from_distribution()` for reproducible results