pymc-devs / pymc-devs/pymc-examples
Error in `examples/spatial/malaria_prevalence.ipynb`
Open
Nobody has claimed this yet.
hackathon
- Dominant language
- Python
- Stars
- 398
- Forks
- 325
- Avg merge
- 9d 15m
- Merged PRs (30d)
- 1
Description
Something up with the CRS using these versions:
rasterio.__version__
# '1.4.2'
pyproj.__version__
# '3.7.0'
mapclassify.__version__
# '2.8.1'
Here is the tracback:
──────────────────────────────────────────── Error running examples/spatial/malaria_prevalence.ipynb ─────────────────────────────────────────────
---------------------------------------------------------------------------
Exception encountered at "In [7]":
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Cell In[7], line 13
9 with rio.open(in_path) as src:
11 img = src.read()
---> 13 src_crs = src.crs["init"].upper()
14 min_lon, min_lat, max_lon, max_lat = src.bounds
15 xs = gambia_gpdf_4326["geometry"].x
File rasterio/crs.pyx:885, in rasterio.crs.CRS.__getitem__()
KeyError: 'init'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open examples/spatial/malaria_prevalence.ipynb and inspect cell In [7], especially the CRS access after opening the raster. Reproduce the failure with rasterio 1.4.2, pyproj 3.7.0, and mapclassify 2.8.1, then verify that the notebook runs successfully and produces the expected spatial output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100