d3heatmap

d3heatmap is a Python package to create interactive heatmaps based on d3js.

https://github.com/erdogant/d3heatmap

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary

Keywords

adjacency-matrix clustering d3-javascript d3js heatmap interactive javascript python
Last synced: 6 months ago · JSON representation ·

Repository

d3heatmap is a Python package to create interactive heatmaps based on d3js.

Basic Info
Statistics
  • Stars: 10
  • Watchers: 1
  • Forks: 2
  • Open Issues: 0
  • Releases: 14
Topics
adjacency-matrix clustering d3-javascript d3js heatmap interactive javascript python
Created over 5 years ago · Last pushed over 2 years ago
Metadata Files
Readme Funding License Citation

README.md

This library is since 18-01-2023 fully implemented in D3Blocks. This repo will be froozen at v0.2.3 and not updated anymore. Please use heatmap in D3Blocks for updates and further support.

d3heatmap

Project Status Python Pypi Docs LOC Downloads Downloads License Forks Issues DOI Medium Donate <!---BuyMeCoffee--> <!---Coffee-->

d3heatmap is a Python package to create interactive heatmaps based on d3js. * The aim of d3heatmap is to create interactive heatmaps that can be used stand-alone and being visual attractive. * This library does not require any additional installation of javascript, or downloads or setting paths to your systems environments. You just need python and pip install this library. There are two main functions to create a heatmap and there are some differences between the two. Read below for more details. Have fun!

``` pip install d3blocks

Import

from d3blocks import D3Blocks

Initialize

d3 = D3Blocks()

Load example data

df = d3.import_example('stormofswords') df = d3.vec2adjmat(df['source'], df['target'], weight=df['weight'], symmetric=True)

Plot

d3.heatmap(df) ```

Functionalities

d3heatmap.matrix * Allows none symetric adjacency matrices. * Colormap can be changed. * No clustering. * round-ish elements.

d3heatmap.heatmap * Allows Clustering. * Colormap is fixed. * Advanced cluster coloring. Clusters are colored and within each cluster the color is incremental based on the value. * Adjacency matrix must be symetric.

Star the D3Blocks repo if you like it! ⭐️

Installation

pip install d3heatmap

  • Alternatively, install d3heatmap from the GitHub source: bash git clone https://github.com/erdogant/d3heatmap.git cd d3heatmap pip install -U .

Import d3heatmap

python from d3heatmap import d3heatmap as d3

Example 1: plot using the heatmap function

```python df = d3.import_example()

Create heatmap

paths = results = d3.heatmap(df) ```

Klik on the figure for the interactive example.

Example 2: plot using the matrix function

```python df = d3.import_example(size=(6,20))

Create heatmap

paths = d3.matrix(df) ```

Example 3: plot using the matrix function

```python

The dataframe contains more columns then rows. Adjust the size and color differently.

df = d3.import_example(size=(6,20))

Create heatmap

paths = d3.matrix(df, fontsize=10, title='Hooray!', description='d3 matrix is created using https://github.com/erdogant/d3heatmap.', path='c:/temp/example/d3_matrix.html', width=600, height=300, cmap='interpolateGreens', vmin=1) ```

Example 4: Matrix with parameters changed:

```python

The dataframe contains more columns then rows. Adjust the size and color differently.

df = d3.import_example(size=(6,20))

Create heatmap

paths = d3.matrix(df, fontsize=10, title='Hooray!', description='d3 matrix is created using https://github.com/erdogant/d3heatmap.', path='c:/temp/example/d3_matrix.html', width=600, height=300, cmap='interpolateGreens', vmin=1) ```

Example 4: Comparison heatmap vs matrix:

There are quit some differences between the heatmap vs matrix functionality.

python df = d3.import_example() results = d3.heatmap(df, title='d3heatmap with the heatmap function.', path='heatmap.html') results = d3.matrix(df, title='d3heatmap with the matrix function.', cmap='interpolatePRGn', path='matrix.html', width=700, height=700)

Citation

Please cite d3heatmap in your publications if this is useful for your research. See right column for citation information.

References

  • https://github.com/erdogant/d3heatmap
  • https://d3-graph-gallery.com
  • https://https://d3js.org/

Maintainer

  • Erdogan Taskesen, github: erdogant
  • This work is created and maintained in my free time. If you wish to buy me a Coffee for this work, it is very appreciated.
  • Contributions are welcome.
  • Star it if you like it!

Owner

  • Name: Erdogan
  • Login: erdogant
  • Kind: user
  • Location: Den Haag

Machine Learning | Statistics | Bayesian | D3js | Visualizations

Citation (CITATION.cff)

# YAML 1.2
---
authors: 
  -
    family-names: Taskesen
    given-names: Erdogan
    orcid: "https://orcid.org/0000-0002-3430-9618"
cff-version: "1.1.0"
date-released: 2019-12-28
keywords: 
  - "heatmap"
  - "interactive"
  - "clustering"
  - "d3js"
  - "python"
license: "MIT"
message: "If you use this software, please cite it using these metadata."
repository-code: "https://github.com/erdogant/d3heatmap"
title: "Interactive and standalone heatmaps (d3heatmap)"
version: "0.1.7"
...

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 73
  • Total Committers: 2
  • Avg Commits per committer: 36.5
  • Development Distribution Score (DDS): 0.452
Past Year
  • Commits: 21
  • Committers: 2
  • Avg Commits per committer: 10.5
  • Development Distribution Score (DDS): 0.19
Top Committers
Name Email Commits
erdogant e****t@g****m 40
Erdogan Taskesen 3****t 33

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 827 last-month
  • Total docker downloads: 11
  • Total dependent packages: 2
  • Total dependent repositories: 4
  • Total versions: 12
  • Total maintainers: 1
pypi.org: d3heatmap

Python package to create interactive heatmap based on d3js.

  • Versions: 12
  • Dependent Packages: 2
  • Dependent Repositories: 4
  • Downloads: 827 Last month
  • Docker Downloads: 11
Rankings
Dependent packages count: 2.1%
Docker downloads count: 3.5%
Downloads: 3.9%
Dependent repos count: 7.7%
Average: 9.0%
Stargazers count: 17.7%
Forks count: 19.2%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements-dev.txt pypi
  • pipinstallspyder-kernels * development
  • rst2pdf * development
  • sphinx_rtd_theme * development
requirements.txt pypi
  • matplotlib *
  • numpy *
  • pandas *
  • tqdm *
  • wget *
setup.py pypi
  • clusteval *
  • ismember *
  • numpy *
  • pandas *