{"id":20990,"library":"basemap-data","title":"Basemap Data Assets","description":"Data assets for matplotlib basemap. This package provides the shapefiles, topography, and other geospatial data required by the basemap toolkit. Version 2.0.0 is a major release that reorganized data handling and removed deprecated datasets. Release cadence is sporadic, tied to basemap releases.","status":"active","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/matplotlib/basemap","tags":["basemap","geospatial","map","data","shapefiles"],"install":[{"cmd":"pip install basemap-data","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"basemap-data provides data files used by basemap at runtime; must be installed separately if not using conda.","package":"basemap","optional":false},{"reason":"basemap depends on matplotlib, required for plotting.","package":"matplotlib","optional":false}],"imports":[{"note":"No change; same as always.","symbol":"Basemap","correct":"from mpl_toolkits.basemap import Basemap"}],"quickstart":{"code":"import os\nos.environ['BASEMAP_DATA_DIR'] = '/path/to/basemap-data'  # optional custom path\nfrom mpl_toolkits.basemap import Basemap\nimport matplotlib.pyplot as plt\nm = Basemap(projection='mill', llcrnrlat=-60, urcrnrlat=90, llcrnrlon=-180, urcrnrlon=180)\nm.drawcoastlines()\nplt.show()","lang":"python","description":"Minimal example: create a Basemap instance and draw coastlines. Ensure basemap-data is installed so shapefiles are found automatically."},"warnings":[{"fix":"Migrate to Cartopy: `pip install cartopy` and `import cartopy.crs as ccrs`. See https://matplotlib.org/basemap/users/intro.html","message":"Basemap and basemap-data packages are removed from metplotlib. Use Cartopy instead.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"If you get missing shapefile errors, ensure basemap-data is installed and you are using a supported projection. Old custom datasets need manual placement in the data directory.","message":"basemap-data does NOT include the full dataset archive. Some older shapefiles may require separate download from SOEST.","severity":"gotcha","affected_versions":"all"},{"fix":"Plan migration to Cartopy (https://scitools.org.uk/cartopy/).","message":"The 'basemap' package itself is deprecated. No new features, only critical bug fixes.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `pip install basemap` (and also `pip install basemap-data` for data).","cause":"basemap package not installed.","error":"ImportError: No module named 'mpl_toolkits.basemap'"},{"fix":"Run `pip install basemap-data`. If using custom path, set env var BASEMAP_DATA_DIR.","cause":"basemap-data not installed or path not set correctly.","error":"FileNotFoundError: [Errno 2] No such file or directory: '.../basemap-data/...'"},{"fix":"Upgrade with `pip install --upgrade basemap basemap-data`.","cause":"Outdated basemap version (<1.0.0).","error":"AttributeError: module 'mpl_toolkits.basemap' has no attribute 'Basemap'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}