{"id":13936153,"url":"https://github.com/aaronlelevier/neo4j-github-followers","last_synced_at":"2026-02-27T10:12:17.037Z","repository":{"id":73454768,"uuid":"131027421","full_name":"aaronlelevier/neo4j-github-followers","owner":"aaronlelevier","description":"Example project combining Neo4j, Python and Github API","archived":false,"fork":false,"pushed_at":"2019-06-04T16:13:25.000Z","size":9,"stargazers_count":21,"open_issues_count":0,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-06T18:13:05.695Z","etag":null,"topics":["github","neo4j","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aaronlelevier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-25T15:31:03.000Z","updated_at":"2025-02-25T13:34:38.000Z","dependencies_parsed_at":"2023-02-28T13:01:47.697Z","dependency_job_id":null,"html_url":"https://github.com/aaronlelevier/neo4j-github-followers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aaronlelevier/neo4j-github-followers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlelevier%2Fneo4j-github-followers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlelevier%2Fneo4j-github-followers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlelevier%2Fneo4j-github-followers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlelevier%2Fneo4j-github-followers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaronlelevier","download_url":"https://codeload.github.com/aaronlelevier/neo4j-github-followers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlelevier%2Fneo4j-github-followers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29890775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T09:48:51.284Z","status":"ssl_error","status_checked_at":"2026-02-27T09:48:43.992Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","neo4j","python"],"created_at":"2024-08-07T23:02:25.256Z","updated_at":"2026-02-27T10:12:17.012Z","avatar_url":"https://github.com/aaronlelevier.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# README\n\n## Summary\n\nThis is an example project combining Neo4j, Python and Github API\n\nThis project demostrates:\n\n1. Call Github API using Python multithreading\n2. Collect data from threads and output to a `followers.csv`\n3. Use `followers.csv` which contains `User` data and `Follower` relationships to output CSVs distict for each:\n\n\t- `users.csv` - distinct Users\n\t- `follows.csv` - distinct mappings from User-to-Follows\n4. Load CSVs into Neo4j\n5. Create Neo4j relationships\n6. Query Neo4j using the Python `neo4j-driver` client\n7. Write queried data to write `json`\n8. Use `json` to generate a `D3Js` web graph\n\n## Quick Example\n\nThe current `web/d3-results.json` is already populated with my data, so just run:\n\n```\ncd web\nnpm install http-server\nhttp-server\n```\n\n## To build and run the project with your data\n\nCreate a Github API token - this will be needed to make requests if making over 60 requests an hour, the unauthenticated rate limit\n\n`pip install -r requirements.txt`\n\nPopulate CSVs for the Github User whose followers is being populated\n\n```\npython code/followers.py --username \u003cusername\u003e\npython code/follows.py --username \u003cusername\u003e\npython code/users.py --username \u003cusername\u003e\n```\n\nData can be loaded into Neo4j using the below queries\n\nAfter data is loaded, run this command to populate `web/d3-results.json`.\n\nEnvironment varialbe `NEO4J_PASSWORD` will need to be set for the Neo4j database connection in `query.py`\n\n```\npython query.py\n```\n\nStart Node server and see data with D3Js\n\n```\ncd web\nnpm install http-server\nhttp-server\n```\n\n\n## Neo4j Queries\n\n### Load CSV\n\nCSV must first be placed in the Neo4j `/import/` dir:\n\n```\n/Users/aaron/Library/Application\\ Support/Neo4j\\ Desktop/Application/neo4jDatabases/database-0bf7614b-cb8d-405e-baef-e1b94485e662/installation-3.3.5/import/\n```\n\nLoad `Users` table using CSV:\n\n```\nLOAD CSV WITH HEADERS FROM \"file:///users.csv\" AS row\nCREATE (u:User)\nSET u = row\n```\n\nLoad `Follows` table using CSV:\n\n```\nLOAD CSV WITH HEADERS FROM \"file:///follows.csv\" AS row\nCREATE (u:Follows)\nSET u = row\n```\n\n### Create Relationships\n\nCreate `FOLLOWS` relationships using previous 2 tables:\n\n```\nMATCH (u:User),(f:Follows), (u2:User)\nWHERE u.login = f.login\n  AND f.follows = u2.login\nCREATE (u)-[:FOLLOWS]-\u003e(u2)\n```\n\n### If you have to delete data and start over\n\nFirst delete relationships:\n\n```\nMATCH ()-[r:FOLLOWS]-() \nDELETE r\n```\n\nThen delete tables:\n\n```\nMATCH (r:User)\nDELETE r\n```\n\n```\nMATCH (r:Follows)\nDELETE r\n```\n\n## Libraries Used\n\n### Database\n\n[Neo4j](https://neo4j.com/)\n\n### Python\n\n[requests](https://github.com/requests/requests)\n\n[neo4j-driver](https://github.com/neo4j/neo4j-python-driver)\n\n### Javascript\n\n[d3js](https://github.com/d3/d3)\n\n[queue.js](https://github.com/d3/d3-queue)\n\n## LICENSE \n\nBSD-2\n\n## CONTRIBUTING\n\nContact me if you found this interesting\n\n## FUTURE PLANS\n\nAdd more end-to-end Neo4j Graph Database examples\n\n## Example Graph output images from this repo\n\n\n### 1st and 2nd level relationships (D3Js)\n\n![Imgur](https://i.imgur.com/7p74ftj.png)\n\n### 1st level relationships (Neo4j)\n\n![Imgur](https://i.imgur.com/uB0bPKg.png)\n\n### 1st and 2nd level relationships (Neo4j)\n\n![Imgur](https://i.imgur.com/6gVNsHZ.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronlelevier%2Fneo4j-github-followers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronlelevier%2Fneo4j-github-followers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronlelevier%2Fneo4j-github-followers/lists"}