Air pollution tutorial should show path to "vectorization"
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 673
- Forks
- 229
- PR merge metrics
- No merged PRs in 30d
Description
The air polution tutorial has a "vectorized" function to calculte the AIQ (IIRC). This can be vectorized using searchsorted (which is a bit much work, but not too tricky).
I am also almost completely certain that it can also be replaced with a single call to np.interp1d.
Having the "vectorize" version seems good, but doesn't fully leverage the concepts that NumPy provides. I think it would be great arc to keep it, but then also show the final interp and maybe even the searchsorted idea. (I honestly don't like stopping at vectorize becuzse it makes seems that vectorize is a common approach, when I consider it more of a fallback solution – whether used a lot in practice or not.)
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
Start with the air pollution tutorial and locate the existing vectorized function used to calculate the AQI. Compare how the tutorial could present the vectorize approach alongside the searchsorted and interpolation ideas; done means the tutorial explains these alternatives and does not imply vectorize is the only path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100