All Projects → Zsailer → Nx_altair

Zsailer / Nx_altair

Licence: mit
Draw interactive NetworkX graphs with Altair

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Nx altair

Tushare
TuShare is a utility for crawling historical data of China stocks
Stars: ✭ 11,288 (+6999.37%)
Mutual labels:  pandas
Datacompy
Pandas and Spark DataFrame comparison for humans
Stars: ✭ 147 (-7.55%)
Mutual labels:  pandas
Pipeline Live
Pipeline Extension for Live Trading
Stars: ✭ 154 (-3.14%)
Mutual labels:  pandas
Ml Cheatsheet
A constantly updated python machine learning cheatsheet
Stars: ✭ 136 (-14.47%)
Mutual labels:  pandas
Data Analysis
主要是爬虫与数据分析项目总结,外加建模与机器学习,模型的评估。
Stars: ✭ 142 (-10.69%)
Mutual labels:  pandas
Stock Price Predictor
This project seeks to utilize Deep Learning models, Long-Short Term Memory (LSTM) Neural Network algorithm, to predict stock prices.
Stars: ✭ 146 (-8.18%)
Mutual labels:  pandas
Spatialpandas
Pandas extension arrays for spatial/geometric operations
Stars: ✭ 134 (-15.72%)
Mutual labels:  pandas
Programming With Data
🐍 Learn Python and Pandas from the ground up
Stars: ✭ 156 (-1.89%)
Mutual labels:  pandas
Panda Run
A panda parkour game, based on Cocos2d-js, running on Android / iOS
Stars: ✭ 145 (-8.81%)
Mutual labels:  pandas
Alphalens
Performance analysis of predictive (alpha) stock factors
Stars: ✭ 2,130 (+1239.62%)
Mutual labels:  pandas
Data Forge Js
JavaScript data transformation and analysis toolkit inspired by Pandas and LINQ.
Stars: ✭ 139 (-12.58%)
Mutual labels:  pandas
Python Cheat Sheet
Python Cheat Sheet NumPy, Matplotlib
Stars: ✭ 1,739 (+993.71%)
Mutual labels:  pandas
Census Data Downloader
Download U.S. census data and reformat it for humans
Stars: ✭ 149 (-6.29%)
Mutual labels:  pandas
Pandasschema
A validation library for Pandas data frames using user-friendly schemas
Stars: ✭ 135 (-15.09%)
Mutual labels:  pandas
Pandas Doc Zh
📖 [译] Pandas 中文文档(待校对)
Stars: ✭ 155 (-2.52%)
Mutual labels:  pandas
Machine Learning Projects
This repository consists of all my Machine Learning Projects.
Stars: ✭ 135 (-15.09%)
Mutual labels:  pandas
Opendatawrangling
공공데이터 분석
Stars: ✭ 148 (-6.92%)
Mutual labels:  pandas
Handyspark
HandySpark - bringing pandas-like capabilities to Spark dataframes
Stars: ✭ 158 (-0.63%)
Mutual labels:  pandas
Py Quantmod
Powerful financial charting library based on R's Quantmod | http://py-quantmod.readthedocs.io/en/latest/
Stars: ✭ 155 (-2.52%)
Mutual labels:  pandas
Machine Learning With Python
Practice and tutorial-style notebooks covering wide variety of machine learning techniques
Stars: ✭ 2,197 (+1281.76%)
Mutual labels:  pandas

nx_altair

Draw NetworkX graphs with Altair

Gitter chat

nx_altair offers a similar draw API to NetworkX but returns Altair Charts instead.

If you'd like to contribute, join the to-do list below.

Examples

If you'd like to start playing with nx_altair, download this notebook!

Simple graph

import networkx as nx
import nx_altair as nxa

# Generate a random graph
G = nx.fast_gnp_random_graph(n=20, p=0.25)

# Compute positions for viz.
pos = nx.spring_layout(G)

# Draw the graph using Altair
viz = nxa.draw_networkx(G, pos=pos)

# Show it as an interactive plot!
viz.interactive()

Leverage Altair

Customize the visualization

nx_altair also supports many of the same arguments from NetworkX for styling your network--with an Altair twist! Map visualization attributes in a declarative manner.

import numpy as np

# Add weights to nodes and edges
for n in G.nodes():
    G.nodes[n]['weight'] = np.random.randn()

for e in G.edges():
    G.edges[e]['weight'] = np.random.uniform(1, 10)


# Draw the graph using Altair
viz = nxa.draw_networkx(
    G, pos=pos,
    node_color='weight',
    cmap='viridis',
    width='weight',
    edge_color='black',
)

# Show it as an interactive plot!
viz.interactive()

Install

To install from PyPI:

pip install nx_altair

To install for development, clone this repos and install using pip

pip install -e .

Contributing

We welcome pull requests! If you find a bug, we'd love for you to submit a PR. If you're not sure how to do that, check out this simple guide.

If you have a feature request, please open an issue or submit a PR!

Todo list

A list of things to-do (good ideas for PRs).

  • [ ] Add draw method that mirrors networkx (easy)
  • [ ] Node color scale vmix, vmax (easy)
  • [ ] Edge color scale vmix, vmax (easy)
  • [ ] Node labels (medium)
  • [ ] Edge labels (medium)
  • [ ] Mouse-hover interactivity (medium)
  • [ ] Arrows for edges (hard)
  • [ ] Support for large (>1000 edge) networks (hard)
  • [ ] Force-directed interactivity (very hard---beyond altair's current support).
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].