heatmaply | Interactive Heat Maps for R Using | Data Visualization library

 by   talgalili R Version: 0.13.0 License: No License

kandi X-RAY | heatmaply Summary

kandi X-RAY | heatmaply Summary

heatmaply is a R library typically used in Analytics, Data Visualization, Jupyter applications. heatmaply has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

A heatmap is a popular graphical method for visualizing high-dimensional data, in which a table of numbers are encoded as a grid of colored cells. The rows and columns of the matrix are ordered to highlight patterns and are often accompanied by dendrograms. Heatmaps are used in many fields for visualizing observations, correlations, missing values patterns, and more. Interactive heatmaps allow the inspection of specific value by hovering the mouse over a cell, as well as zooming into a region of the heatmap by dragging a rectangle around the relevant area. This work is based on the ggplot2 and plotly.js engine. It produces similar heatmaps as d3heatmap (or the static heatmap.2 from gplots), with the advantage of more features such as speed (plotly.js is able to handle larger size matrix), sidebar annotation, and the ability to zoom from the dendrogram.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              heatmaply has a low active ecosystem.
              It has 333 star(s) with 71 fork(s). There are 24 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 33 open issues and 200 have been closed. On average issues are closed in 142 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of heatmaply is 0.13.0

            kandi-Quality Quality

              heatmaply has 0 bugs and 0 code smells.

            kandi-Security Security

              heatmaply has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              heatmaply code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              heatmaply does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              heatmaply releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.
              It has 5145 lines of code, 0 functions and 47 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of heatmaply
            Get all kandi verified functions for this library.

            heatmaply Key Features

            No Key Features are available at this moment for heatmaply.

            heatmaply Examples and Code Snippets

            No Code Snippets are available at this moment for heatmaply.

            Community Discussions

            QUESTION

            How can I plot a heatmap with the heatmaply package in Shiny?
            Asked 2021-May-13 at 12:38

            I am trying to use the heatmaply package in order to plot a heatmap and it works well.

            On the other hand, when I try to do the same plot in Shiny it doesn't appear in the interface (when I click "run app"). However, when I close the window suddenly the plot appears in the R viewer. Is it possible that the heatmaply package doesn't work with Shiny?

            This is my code, when I plot it in R.

            ...

            ANSWER

            Answered 2021-May-13 at 12:38

            You can use plotlyOutput and renderPlotly :

            Source https://stackoverflow.com/questions/67518151

            QUESTION

            How to add custom text per column of a heatmap in R?
            Asked 2021-Mar-23 at 21:33

            I have a dataset where I am plotting a heatmap to compare 7 groups. I also have per group 2 columns of data that describe the group. I am trying to create an interactive plot that shows each group's information per its information columns.

            Here is an example of the data where 7 groups each have 2 columns of corresponding information:

            ...

            ANSWER

            Answered 2021-Mar-23 at 21:33
            labels_df <- 
              df %>% 
              select(ends_with("Score"), ends_with("Genes")) %>% 
              rownames_to_column() %>% 
              pivot_longer(-rowname) %>% 
              separate(name, c("Group", "var")) %>% 
              pivot_wider(c(rowname, Group), names_from = var, values_from = value) %>% 
              mutate(label = paste(
                "Gene Overlap:", Genes,
                "\nMean_GB_Score:", Score
              )) %>% 
              pivot_wider(rowname, names_from = Group, values_from = label)
            
            

            Source https://stackoverflow.com/questions/66771147

            QUESTION

            How to create an interactive heatmaply plot with custom text in R?
            Asked 2021-Mar-23 at 13:22

            I have a dataset where I am plotting a heatmap to compare 7 groups. I also have in the data 2 columns with information that I want to include as hover text in an interactive heat map.

            My data is 7 columns of groups I want to compare, and 2 columns of hover text information I want to add to my plot. The rows are log p-values that I am looking to compare the significance of between the groups.

            Currently I am trying to use heatmaply to plot this but I'm having trouble setting the custom text - is there a way to set columns of data into the custom_text of heatmaply()? I can't find any examples that do this specifically.

            Input example data:

            ...

            ANSWER

            Answered 2021-Mar-23 at 13:22

            In the description for custom_hovertext parameter you can read that it should be a matrix of the same dimensions as the input, i.e. a matrix with 5 rows and 7 columns.

            So first we would need to construct such matrix:

            Source https://stackoverflow.com/questions/66763623

            QUESTION

            R - using heatmaply for a 2d histogram / density
            Asked 2020-Sep-14 at 05:09

            I'm rather new to programming and the site so let me know if I screw up on this explanation.

            I have a rather long series of x, y coordinates representing a character in 2d space. Let's say that space is 200 x 400. I want to represent the amount of time the character is in each x, y coordinate by means of a pretty chloropleth.

            I want to use heatmaply for this because I think the output is pretty and I want my audience to be able to zoom in on the data. It isn't really meant to do density estimation (I think?) so I'm trying to work around it.

            I suppose the way to do this is to fill a 200x400 dataframe with counts of the number of occurrences of each x, y coordinate in the data at each x, y coordinate in the frame. Essentially, to build a 2d map out of the data frame and impose the counts upon it

            So, I suppose my questions are:

            1). How do I get the count of each unique x, y coordinate in my set

            2). How might I pass those counts easily to the matching x, y cell in my 200x400 dataframe full of zeroes?

            This seems like it should be easy but I can't seem to figure it out! I'm a novice to r and can't see the shape of what I need to do.

            ...

            ANSWER

            Answered 2020-Sep-14 at 05:09

            You can use the table function to get your matrix of counts.

            Source https://stackoverflow.com/questions/63877598

            QUESTION

            R: Heatmaply creates empty/ white space in viewer
            Asked 2020-Aug-14 at 15:13

            i tried to create a heatmap with my own data and kept only getting white space. I found this very basic instruction on how to work heatmaply based on the mtcars data. After restarting R (close Window and reopen, not build-in restart) I tried and still only received white space. Any ideas on how to resolve this issue? Thanks in advance!

            ...

            ANSWER

            Answered 2020-Aug-14 at 14:46

            have a look on this page. There are examples, including mtcars. There is a lot of explanation.

            https://cran.r-project.org/web/packages/heatmaply/vignettes/heatmaply.html

            KR

            Source https://stackoverflow.com/questions/63414777

            QUESTION

            Using heatmaply dendrogram sorting in pheatmap
            Asked 2020-Jul-15 at 23:05

            Is there a way of using the dendrogram clustering method used in the heatmaply package and to apply it to a heatmap produced by the pheatmap package? Basically the opposite to what was asked here: Clustering in pheatmap and heatmaply R packages

            I usually see better clustering of my data when I use heatmaply over pheatmap. However, I do not always want to use an interactive plot. The heatmaply::ggheatmap function does not work properly for me since I have have col_side_colors and the annotation gets in the way of the dendrogram. It just looks very messy. So I use pheatmap instead.

            Maybe someone can help with my question. Thanks!

            ...

            ANSWER

            Answered 2020-Jul-15 at 23:05
            library(pheatmap)
            library(heatmaply)
            library(seriation)
            library(dendextend)
            
            # A dataset    
            x <- scale(mtcars)
            
            # Interactive heatmap
            p <- heatmaply(x)
            print(p)
            
            # The dendrogram for rows
            dst <- dist(x)
            hc_row <- hclust(dst)
            row_dend <- as.dendrogram(hc_row)
            row_dend <- seriate_dendrogram(row_dend, dst, method="OLO")
            
            # The dendrogram for columns
            dst <- dist(t(x))
            hc_row <- hclust(dst)
            col_dend <- as.dendrogram(hc_row)
            col_dend <- seriate_dendrogram(col_dend, dst, method="OLO")
            col_dend <- rotate(col_dend, order = rev(labels(dst)[get_order(as.hclust(col_dend))]))
            
            # The pheatmap with the same clustering of heatmaply
            pheatmap(x, cluster_rows=as.hclust(row_dend), cluster_cols=as.hclust(col_dend))
            

            Source https://stackoverflow.com/questions/62915975

            QUESTION

            R heatmaply and pheatmap output
            Asked 2020-May-21 at 10:20

            I am using the R heatmaply package to produce interactive heatmaps. I like the software, but I would like to get from it the same color output I get using the pheatmap package. Therefore, I would like the two commands to produce the same ouput:

            ...

            ANSWER

            Answered 2020-May-21 at 10:07

            You can use formals() to get the default color argument of pheatmap().

            Source https://stackoverflow.com/questions/61931334

            QUESTION

            Use heatmaply to create heatmap with raw values/data without transformations?
            Asked 2020-Apr-25 at 03:27

            When creating a heatmap with heatmaply::heatmaply(), some transforms are performed on the raw data. This is evident in the following example where some of the iris dataset is provided, yet hovering over the heatmap shows some negative values (which weren't in the original data provided to heatmaply()), and the colorbar on the side also shows negative values as well.

            https://i.stack.imgur.com/Mt0vGm.png

            ...

            ANSWER

            Answered 2020-Apr-25 at 03:27

            Remove the scale argument - the default is "none". Or change it to "none".

            Source https://stackoverflow.com/questions/61420232

            QUESTION

            Make plotlyOutput dimension reactive
            Asked 2020-Apr-17 at 15:12

            I am plotting a matrix using heatmaply and plotly I want to make the plotylOutput height and width reactive to the size of the matrix

            If I use a reactive value in the plotlyOutput width argument I get the following error: Error in htmltools::validateCssUnit: CSS units must be a single-element numeric or character vector

            See below for a minimum version of my code:

            ...

            ANSWER

            Answered 2020-Apr-17 at 15:12

            I forgot brackets and did not need to use isolate

            Source https://stackoverflow.com/questions/61271057

            QUESTION

            Improve performance of ggplotly when plotting time-series heatmap
            Asked 2020-Mar-23 at 20:32

            I'm building an interactive time-series heatmap in R using Plotly and Shiny. As part of this process, I'm re-coding heatmap values from continuous to ordinal format - so I have a heatmap where six colours represent specific count categories, and those categories are created from aggregated count values. However, this causes a major performance issue with the speed of the creation of heatmap using ggplotly(). I've traced it to the tooltip() function from Plotly which renders interactive boxes. Labels data from my heatmap somehow overload this function in a way that it performs very slowly, even if I just add a single label component to the tooltip(). I'm using a processed subset of COVID-19 outbreak data from Johns Hopkins CSSE repository. Here is a simplified heatmap code, which also uses The Simpsons colour theme from ggsci:

            ...

            ANSWER

            Answered 2020-Mar-23 at 20:32

            If you rewrite it as "pure" plotly (without the ggplotly conversion), it will be much faster. Around 3000 times even. Here's the result of a very small benchmark:

            Source https://stackoverflow.com/questions/60763006

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install heatmaply

            To install the stable version on CRAN:.

            Support

            You are welcome to:.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/talgalili/heatmaply.git

          • CLI

            gh repo clone talgalili/heatmaply

          • sshUrl

            git@github.com:talgalili/heatmaply.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link