# Adding a base map to census geometry in python

**URL:** <https://forum.ipums.org/t/adding-a-base-map-to-census-geometry-in-python/5658>\
**Category:** NHGIS\
**Created:** [February 5, 2024, 7:13pm UTC](https://forum.ipums.org/t/adding-a-base-map-to-census-geometry-in-python/5658 "2024-02-05T19:13:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aziz\_Sunderji](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.ipums.org/aziz_sunderji/32/852_2.png) [@Aziz\_Sunderji](https://forum.ipums.org/u/Aziz_Sunderji)\
**Post date:** [February 5, 2024, 7:13pm UTC](https://forum.ipums.org/t/adding-a-base-map-to-census-geometry-in-python/5658/1 "2024-02-05T19:13:04Z")

</div>

Hello!

I am trying to map census data (downloaded with geometry from NHGIS) in python using matplotlib and adding a basemap using contextily.

Basemaps are in crs 3587, but when I convert the NHGIS geometry from its native format (crs 4257?) to 3587 in order to add the basemap, the geometry column turns into “inf inf”.

Any ideas?

---

<div class="post-metadata">

**Author:** ![JonathanSchroeder](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.ipums.org/jonathanschroeder/32/70_2.png) [@JonathanSchroeder](https://forum.ipums.org/u/JonathanSchroeder)\
**Post date:** [February 5, 2024, 7:33pm UTC](https://forum.ipums.org/t/adding-a-base-map-to-census-geometry-in-python/5658/2 "2024-02-05T19:33:32Z")

</div>

NHGIS shapefiles use Esri’s USA Contiguous Albers Equal Area Conic projected coordinate system. The files [come with](https://www.nhgis.org/frequently-asked-questions-faq#projected_coordinate_system) a “.prj” file that contains the exact specification for this system. I don’t know what the CRS code is. [This site](https://spatialreference.org/ref/esri/102003/) suggests to me that the code is 102003.
