{"id":25521904,"url":"https://github.com/mu373/netscitools","last_synced_at":"2025-10-07T06:49:26.508Z","repository":{"id":258397583,"uuid":"871374174","full_name":"mu373/netscitools","owner":"mu373","description":"Python package that includes useful functions for network science.","archived":false,"fork":false,"pushed_at":"2024-10-16T21:50:46.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-27T13:31:25.250Z","etag":null,"topics":["network","networkx","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mu373.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-10-11T20:39:17.000Z","updated_at":"2024-10-16T21:57:17.000Z","dependencies_parsed_at":"2024-10-18T20:16:58.753Z","dependency_job_id":"361fe3e9-3970-478e-9957-e990d139da74","html_url":"https://github.com/mu373/netscitools","commit_stats":null,"previous_names":["mu373/nstools"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mu373/netscitools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu373%2Fnetscitools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu373%2Fnetscitools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu373%2Fnetscitools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu373%2Fnetscitools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mu373","download_url":"https://codeload.github.com/mu373/netscitools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu373%2Fnetscitools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278734406,"owners_count":26036404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["network","networkx","python"],"created_at":"2025-02-19T18:17:34.699Z","updated_at":"2025-10-07T06:49:26.492Z","avatar_url":"https://github.com/mu373.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netscitools\nNetwork Science tools (netscitools): Python package that includes useful functions for network science.\n\n\n## Installation\n```sh\n# Clone the repository from GitHub\ngit clone https://github.com/mu373/netscitools\n\n# Install package using pip\ncd netscitools\npip install .\n```\n\n## Modules\nThis package includes the following modules:\n- `netscitools.network`: Convinient functions for graphs in networkx \n- `netscitools.neu_courses`: Tools to analyze course prerequisite networks at Northeastern\n- `netscitools.util`: Utility functions\n\n## Usage\n\n### Network tools\n```py\nfrom netscitools.network import *\nimport networkx as nx\nimport matplotlib.pyplot as plt\n\nG = nx.karate_club_graph()\n\n# Describe the network\ndescribe_network(G)\n\n# Plot degree distribution\nG1 = nx.to_undirected(G)\nx, y = degree_distribution(G1)\nplt.loglog(x, y,marker='o',lw=0);\n\n# Degree preserving randomization\nG_random = degree_preserving_randomization(G1)\n\n# Class 7: Depth-first search\nexplore_queue = [0]\nnodes_visited = {0: 0}\ndfs(explore_queue, nodes_visited, G)\n\n# Class 7: Breadth-first search\nexplore_queue = [0]\nnodes_visited = {0: 0}\nbfs(explore_queue, nodes_visited, G)\n```\n\n### Northeastern University Course Prerequisite network\n```py\nfrom netscitools.neu_courses import *\nimport requests\n\ndept_name = \"chme\"\ndept_html = requests.get(\"https://catalog.northeastern.edu/course-descriptions/{}/\".format(dept_name)).text\n\n# Get course information (course title, course description, prerequisite) for the department\ncourses_info = get_northeastern_course_info(dept_html)\n\n# Turn the course information into networkx graph object\nG_prereq = create_course_prerequisite_network(dept_name, courses_info)\n\n# Plot!\nnx.draw(G_prereq)\n```\n\n### Utilities\n```py\nfrom netscitools.util import compare_decimal_places\ncompare_decimal_places(0.01, 0.01)\ncompare_decimal_places(0.01111, 0.01111111)\n```\n\n## License\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmu373%2Fnetscitools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmu373%2Fnetscitools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmu373%2Fnetscitools/lists"}