Skip to content

Adding a new magic command: %degreeDistribution #749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Starting with v1.31.6, this file will contain a record of major features and updates made in each release of graph-notebook.

## Upcoming
- Added %degreeDistribution magic command ([PR](https://github.com/aws/graph-notebook/pull/749)) TODO: add to the specific release below when it's released

## Release 5.0.1 (May 19, 2025)
- Locked numba dependency to 0.60.0 to avoid numpy conflict ([Link to PR](https://github.com/aws/graph-notebook/pull/735))
Expand Down
21 changes: 21 additions & 0 deletions additional-databases/neptune/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,24 @@ https://aws.amazon.com/amazon-linux-2/
<b>DNS flush: </b> after setting your hosts file, do a DNS flush to make sure your changes are reflected in the client-side DNS.

<b> HTTPS: </b> Check that when you connect to Neptune via a browser that you're using `https://` in the URL.

## Magic commands specific to Neptune Analytics

`%degreeDistribution` - Creates an interactive histogram visualizing the degree distribution of vertices in a graph. The histogram displays the number of vertices (y-axis) that have a specific degree (x-axis).

**Parameters**
- **traversalDirection**: Specifies which degree to analyze
- `both` (default): Total degree
- `inbound`: In-degree
- `outbound`: Out-degree
- **vertexLabels**: Filter vertices by label (default: empty list)
- **edgeLabels**: Filter edges by label (default: empty list)

**Features**
- Parameters can be set via command line arguments or dropdown widgets
- Dropdowns are automatically populated with existing vertex/edge labels
- Interactive controls for adjusting:
- Bin type and width
- Axis scales and limits

For detailed examples and output formats, see the [documentation](https://docs.aws.amazon.com/neptune-analytics/latest/userguide/degree-distribution.html).
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ dependencies = [
'networkx==2.4',
'numpy>=1.23.5,<1.24.0',
'pandas>=2.1.0,<=2.2.2',
'plotly>=6.1.2',

# Graph databases and query languages
'gremlinpython>=3.5.1,<=3.7.2',
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ itables>=2.0.0,<=2.1.0
networkx==2.4
numpy>=1.23.5,<1.24.0
pandas>=2.1.0,<=2.2.2
plotly>=6.1.2

# Graph databases and query languages
gremlinpython>=3.5.1,<=3.7.2
Expand Down
Loading