Skip to content

Commit c070d91

Browse files
committed
change readme
1 parent 744ff90 commit c070d91

3 files changed

Lines changed: 69 additions & 1 deletion

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,5 @@ _build/
9393

9494
# setuptools-scm/
9595
src/*/_version.py
96+
97+
data

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
# West Africa Labor Market Analysis
22

3-
[Table of contents](docs/_toc.yml)
3+
## Assignment
4+
5+
The Poverty team in West Africa is seeking to study labor market trends from LinkedIn and GitHub data.
6+
7+
## Contents
8+
9+
```{tableofcontents}
10+
11+
```

notebooks/github-trends/software-development.ipynb

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1818,6 +1818,64 @@
18181818
" collaborators_chart, \"Source: GitHub Innovation Graph economy collaborators data.\"\n",
18191819
")"
18201820
]
1821+
},
1822+
{
1823+
"cell_type": "code",
1824+
"execution_count": 83,
1825+
"id": "682b3c86",
1826+
"metadata": {},
1827+
"outputs": [
1828+
{
1829+
"name": "stdout",
1830+
"output_type": "stream",
1831+
"text": [
1832+
"Wrote data/GitHub/developers.csv\n",
1833+
"Wrote data/GitHub/repositories.csv\n",
1834+
"Wrote data/GitHub/organizations.csv\n",
1835+
"Wrote data/GitHub/git_pushes.csv\n",
1836+
"Wrote data/GitHub/languages.csv\n",
1837+
"Wrote data/GitHub/economy_collaborators.csv\n",
1838+
"Wrote data/GitHub/language_to_cluster_mapping.csv\n"
1839+
]
1840+
},
1841+
{
1842+
"name": "stderr",
1843+
"output_type": "stream",
1844+
"text": [
1845+
"/Users/ssarva/west-africa-labor-market-analysis/.venv/lib/python3.14/site-packages/urllib3/connectionpool.py:1110: InsecureRequestWarning: Unverified HTTPS request is being made to host 'raw.githubusercontent.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings\n",
1846+
" warnings.warn(\n"
1847+
]
1848+
}
1849+
],
1850+
"source": [
1851+
"from pathlib import Path\n",
1852+
"\n",
1853+
"output_dir = Path(\"data/GitHub\")\n",
1854+
"output_dir.mkdir(parents=True, exist_ok=True)\n",
1855+
"\n",
1856+
"github_csv_sources = {\n",
1857+
" \"developers.csv\": f\"{INNOVATION_GRAPH_DATA_URL}/developers.csv\",\n",
1858+
" \"repositories.csv\": f\"{INNOVATION_GRAPH_DATA_URL}/repositories.csv\",\n",
1859+
" \"organizations.csv\": f\"{INNOVATION_GRAPH_DATA_URL}/organizations.csv\",\n",
1860+
" \"git_pushes.csv\": f\"{INNOVATION_GRAPH_DATA_URL}/git_pushes.csv\",\n",
1861+
" \"languages.csv\": f\"{INNOVATION_GRAPH_DATA_URL}/languages.csv\",\n",
1862+
" \"economy_collaborators.csv\": (\n",
1863+
" f\"{INNOVATION_GRAPH_DATA_URL}/economy_collaborators.csv\"\n",
1864+
" ),\n",
1865+
" \"language_to_cluster_mapping.csv\": LANGUAGE_CLUSTER_MAPPING_URL,\n",
1866+
"}\n",
1867+
"\n",
1868+
"for filename, url in github_csv_sources.items():\n",
1869+
" response = requests.get(\n",
1870+
" url,\n",
1871+
" timeout=30,\n",
1872+
" verify=filename != \"language_to_cluster_mapping.csv\",\n",
1873+
" )\n",
1874+
" response.raise_for_status()\n",
1875+
" output_path = output_dir / filename\n",
1876+
" output_path.write_bytes(response.content)\n",
1877+
" print(f\"Wrote {output_path}\")"
1878+
]
18211879
}
18221880
],
18231881
"metadata": {

0 commit comments

Comments
 (0)