Code Monkey home page Code Monkey logo

network-graph-tutorial's Introduction

Building an Interactive Network Graph to Understand Communities

A hands-on tutorial originally given for PyData Seattle/NYC/Global, and PyCon US, where we learn about people, put them into graphs, then build a fun graph app!

For past recordings, try: Seattle/NYC/Global

Watch the video - it really happened!

Introduction -- People?!

People are hard to understand, developers doubly so! In this tutorial, we will explore how communities form in organizations to develop a better solution than "The Org Chart". We will walk through using a few key Python libraries in the space, develop a toolkit for Clustering Attributed Graphs (more on that later) and build out an extensible interactive dashboard application that promises to take your legacy HR reporting structure to the next level.

In this tutorial, we will develop some fundamental knowledge on Graph Theory and capabilities in using key Python libraries to construct and analyze network graphs, including xarray, networkx, and dash-cytoscape. The goal of this talk is to build the tools you need to launch your own interactive dashboard in Python that can help explore communities of people based on shared characteristics (e.g. programming languages, projects worked on, apps used, management structure). The data we will dig into focuses on building a better understanding of developers + users and how they form communities, but this could just as easily be extended to any social network. The work we do here can be easily extended to your communities and use cases -- let's build something together!

This talk is aimed at Pythonistas with beginner+ experience; we talk through some complex libraries and mathematical concepts, but beginners should be able to follow along and still build their understanding (and an app!)


Outline

First, some slides!

[Data](Part 0 - The Data/README.md)

[Building a Simple Network Graph](Part 1 - The Graph/README.md)

[Clustered Attribute Graphs](Part 2 - Clustered Graph Attributes/README.md)

[Exploring Communities with an Interactive App](Part 3 - An App/README.md)

  • Build a an app with dash and dash-cytoscape to expose our analytics toolkit and explore the communities inside our fictional company

More Things?

  • Deploy your app to the Cloud! This repo is set up to push to Google App Engine pretty easily, but give it a go with Heroku, Azure, or whatever the defacto (semi)-free option is these days!
  • Build better sample data, try different types of companies, communities, etc. and look for useful patterns
  • Add a feature to show how two people are connected (choose two nodes and then draw some/all of the paths between them)
  • Visualize larger networks -- our system starts to break down over ~500 nodes and needs pagination + sharding (?)

Deployment

Google App Engine

  1. Install the Google Cloud SDK https://cloud.google.com/sdk/docs/install-sdk#deb
  2. Initialize the repo gcloud init and log in. Create a new project if needed.
  3. Configure your app.yaml https://cloud.google.com/appengine/docs/standard/reference/app-yaml?tab=python
  4. Deploy the app gcloud app deploy
  5. View it! gcloud app browse or -- https://community-networks-pydata.uc.r.appspot.com/

network-graph-tutorial's People

Contributors

lucasdurand avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

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.