Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions docs/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,39 @@ curl -s https://tanbirramim.github.io/open-source-radar/data/issues.json \
```

A snapshot of this data is also published as a dataset on Hugging Face: [TanbirRamim/open-source-radar](https://huggingface.co/datasets/TanbirRamim/open-source-radar), with an `issues` table and a `repositories` table.

## Feeds

Every language and topic has an RSS feed of beginner issues, so you can follow new ones in any feed reader.

- Feed index: https://tanbirramim.github.io/open-source-radar/feeds/
- One language: `https://tanbirramim.github.io/open-source-radar/feeds/<slug>.xml`, for example [python.xml](https://tanbirramim.github.io/open-source-radar/feeds/python.xml). The slugs are in `language_slugs` in `issues.json` (`cpp`, `csharp`, `go`, ...).
- One topic: `https://tanbirramim.github.io/open-source-radar/feeds/topics/<slug>.xml`, for example [ai-ml.xml](https://tanbirramim.github.io/open-source-radar/feeds/topics/ai-ml.xml). The slugs are in `topic_feed_slugs`.

## Python example

Standard library only. It downloads `issues.json`, looks up each issue's repository language and prints the five newest beginner issues for one language.

```python
import json
import urllib.request

DATA_URL = "https://tanbirramim.github.io/open-source-radar/data/issues.json"
LANGUAGE = "Python"

with urllib.request.urlopen(DATA_URL, timeout=30) as response:
data = json.load(response)

repos = data["repositories"]
matches = [
issue
for issue in data["issues"]
if issue["level"] == "beginner" and repos.get(issue["repo"], {}).get("language") == LANGUAGE
]
matches.sort(key=lambda issue: issue["created"], reverse=True)

print(f"{len(matches)} beginner {LANGUAGE} issues")
for issue in matches[:5]:
print(f"{issue['repo']}#{issue['number']}: {issue['title']}")
print(f" {issue['url']}")
```
Loading