Giter Site home page Giter Site logo

bdpedigo / networks-course Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 26.0 228.18 MB

A short course on network data science at Johns Hopkins University

Home Page: https://bdpedigo.github.io/networks-course/

License: MIT License

Python 98.99% Shell 1.01%
networks python python3 network-analysis data-science teaching teaching-materials jupyter-book

networks-course's Introduction

Network Data Science - EN.580.129 (22)

A repo housing a course introducing students to network data science at Johns Hopkins University.

Term: Intersession 2023

Instructor: Benjamin D. Pedigo

Times: M T W Th F, 1:00PM - 4:15PM

Schedule: 01-09-2023 to 01-20-2023

Credits: 2

Repo structure

  • .github: Files specifying how the repo behaves on GitHub
  • data: Directory to store raw data.
  • docs: Files to build the documentation website in the form of a Jupyter Book
  • pkg: A local Python package used for analysis in the Jupyter Notebooks

Building the book

Coming soon

Running the code

Coming soon

Credits

This project is created using the excellent open source Jupyter Book project and the executablebooks/cookiecutter-jupyter-book template.

networks-course's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

networks-course's Issues

`plot_network_partition` reuses variable from outer scope

When working through the community detection part of the material I noticed that the plot_network_partition was using the node_df from the outer scope, which made this function fail when I was applying it on some other data. Not a major thing, but I though I would suggest a fix.

However, I was unable to get the notebook to build since the data isn't in the repo, and hence I couldn't make a PR to fix it. However, I think the code below should fix the issue:

def plot_network_partition(adj, node_data, partition_key):
    fig, axs = plt.subplots(1, 2, figsize=(15, 7))

    networkplot(
        adj,
        x="x",
        y="y",
        node_data=node_data.reset_index(),
        node_alpha=0.9,
        edge_alpha=0.7,
        edge_linewidth=0.4,
        node_hue=partition_key,
        node_size="degree",
        edge_hue="source",
        ax=axs[0],
    )
    _ = axs[0].axis("off")

    _ = heatmap(
        adj,
        inner_hier_labels=node_data[partition_key],
        ax=axs[1],
        cbar=False,
        cmap="Purples",
        vmin=0,
        center=None,
        sort_nodes=True,
    )

    return fig, ax

Excellent materials, btw. Interesting, well-written, and easy to follow. Kudos!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.