timevis | ๐Ÿ“… Create interactive timeline visualizations in R | Data Visualization library

ย by ย  daattali R Version: 2.1.0 License: Non-SPDX

kandi X-RAY | timevis Summary

kandi X-RAY | timevis Summary

timevis is a R library typically used in Analytics, Data Visualization, JavaFX applications. timevis has no bugs, it has no vulnerabilities and it has low support. However timevis has a Non-SPDX License. You can download it from GitHub.

By Dean Attali ยท Demo. {timevis} lets you create rich and fully interactive timeline visualizations in R. Timelines can be included in Shiny apps and R markdown documents, or viewed from the R console and RStudio Viewer. {timevis} includes an extensive API to manipulate a timeline after creation, and supports getting data out of the visualization into R. This package is based on the visjs Timeline JavaScript library.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              timevis has a low active ecosystem.
              It has 578 star(s) with 156 fork(s). There are 34 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 2 open issues and 106 have been closed. On average issues are closed in 316 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of timevis is 2.1.0

            kandi-Quality Quality

              timevis has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              timevis has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              timevis releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              It has 267 lines of code, 0 functions and 3 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 timevis
            Get all kandi verified functions for this library.

            timevis Key Features

            No Key Features are available at this moment for timevis.

            timevis Examples and Code Snippets

            No Code Snippets are available at this moment for timevis.

            Community Discussions

            QUESTION

            How do we transform a dataset in R using pivot_longer with multiple columns
            Asked 2022-Mar-03 at 17:47

            I have reviewed many posts on SO (including Using pivot_longer with multiple paired columns in the wide dataset), but have not found a solution to what I need to do.

            having initial dataset:

            ...

            ANSWER

            Answered 2022-Mar-03 at 16:46

            This will get you started

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

            QUESTION

            Shiny -How to save to excel every change in renderTable?
            Asked 2021-Nov-01 at 08:37

            I use Timevis package. first of all I read an excel file with missions. In my code the user can see all the missions on a time line, and he can edit/add/remove any missions. after the user make a change I can see the update table below. I want to save to my excel file every update that the user make. this is my code:

            ...

            ANSWER

            Answered 2021-Oct-30 at 23:18

            You can use actionButton/ observe to call saveworkbook (package openxlsx) to save your changes. Technically you are not saving these changes, but replacing the file with an identical file containing the changes.

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

            QUESTION

            Creating multiple timelines in single shiny app
            Asked 2021-Sep-15 at 18:06

            I'm trying to create multiple timelines one after the other to be displayed in a single shiny app. For a minimal example, let's say I have a dataframe from which I create a timeline like this

            ...

            ANSWER

            Answered 2021-Sep-15 at 18:06

            This will create the timelines as desired and adds a content column that will display the 'name' of each timeline as Timeline {id}.

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

            QUESTION

            How to change the background color for each group in timeline using timevis in R
            Asked 2021-Sep-10 at 23:03

            I'm trying to color code the background of a timevis based timeline based on groups divided. I can see that it's possible to color-code the points according to groups, but I need to color-code the background. As you can see in below code, it will change the color of points accordingly.

            ...

            ANSWER

            Answered 2021-Sep-10 at 23:03

            We can use some advanced CSS selectors to do the job. So instead of specify the group color inside the dataframe, we do it in the CSS.

            Keep rows with the same color together and use , to separate the selector. Number inside .vis-group:nth-of-type(N) means the row number. It requires you to know which row a group will go to. If no special case, the first group will go to first row, second group second row, et al.

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

            QUESTION

            Using a colored timevis timeline in a Shiny app
            Asked 2020-Dec-19 at 17:32

            I'm using the package 'timevis' to create a timeline in my RShiny dashboard app. I want to visualize some planned deadlines of when to check machines for their maintenance. In the timeline, both executed checks and planned checks are visible. To visualize these different checks, I want to give it different colors (green for executed and red for planned). I succeeded to do this in a test environment, but when I copy the code in my dashboard, the colors are not visible (all blocks are just standard blue).

            This is my code: test:

            ...

            ANSWER

            Answered 2020-Dec-19 at 17:32

            As mentioned in the comments, it is very helpful when sample data is provided (as part of a minimal working example).

            Here I tried to recreate an example you can work from. You might want to take advantage of className to provide items with individual CSS styles. I added tags$style to your ui based on what you described for red and green.

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

            QUESTION

            R shiny: Timevis output in modal dialogue
            Asked 2020-Nov-20 at 12:27

            How to show a timevis output in a modal dialogue in r shiny. Following the example from reactivity in timevis package: passing selectinput variable to subgroup I have tried to show the timeline in a modal dialogue. Thanks for any help.

            The code:

            ...

            ANSWER

            Answered 2020-Nov-20 at 12:27

            Following this example, you can use bsModal from the shinyBS package. I'm not sure if you can use XOutput in the normal shiny modal.

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

            QUESTION

            reactivity in timevis package: passing selectinput variable to subgroup
            Asked 2020-Nov-07 at 11:42

            Using the timevis package (dean attali) in R I would like to plot the timeline by group individually with a selectinput widget in r shiny: Error in : Can't subset columns that don't exist. x Column 2 doesn't exist. Can someone help? Thank you

            My code:

            ...

            ANSWER

            Answered 2020-Nov-07 at 11:42

            So you want to either show a timeline with the contents of group 1 or 2? Then you need to filter your group column; you can't select the columns 1 or 2 because they don't exist, 1/2 are just the values within the group column.

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

            QUESTION

            R - How should I format a B.C.E. date in timevis?
            Asked 2020-Jul-16 at 12:54

            I need to show a series of events in a timeline. Some of this events are before common era. I'm using timevis in R.

            So far, I've tried the following code:

            ...

            ANSWER

            Answered 2020-Jul-16 at 08:11

            There was a discussion on github recently about this topic. Using the information from there, you need the following to make it work on RStudio and in an app:

            • format the dates as strings
            • for BCE dates, you need a minus as prefix and in total 6 digits for the year: "-002000-01-01"
            • for CE dates, you need in total 4 digits for the year: "0010-01-01"

            Example code that works for me in RStudio:

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

            QUESTION

            Rshiny Pass list of files to Javascript downloader
            Asked 2020-Jul-08 at 16:09

            I'm on the home stretch thanks to Stephane Laurent!

            I have an Rshiny app that generates a timeline based on a user selecting rows from a data table. The user can then download a zip file containing the table, the timeline, and hopefully the files associated with the rows selected in the table.

            I believe I need to pass the filenames from my Rshiny table to JS in order for JS to add the file URL's to a function for JSZip. The files are stored in my app directory under the www folder. so "https://server.me/myapp/Room.pdf" is how navigate to a file. (I've only done something like this with php in the past.)

            So in the code below, if a user clicked on the Big Room and Red Rover, then generated a timeline, and then downloaded. They would get a zip file containing timeline.png, timeline.csv, Room.pdf, and Activity.docx

            Bonus I would also like the ability to add specific files to all downloads. (I imagine that's fairly simple as I can just point it to the specific url "https://server.me/myapp/Thanks_for_visiting.pdf" without needing Rshiny to do anything.)

            Can I pass multiple "things: with session$sendCustomMessage ? Or do it twice? something like:

            ...

            ANSWER

            Answered 2020-Jul-08 at 16:09
            library(base64enc)
            
            js <- "
            function downloadZIP(x){
              var csv = Papa.unparse(x.table);
              var URIs = x.URIs;
              domtoimage.toPng(document.getElementById('appts'), {bgcolor: 'white'})
                .then(function (dataUrl) {
                  var zip = new JSZip();
                  var idx = dataUrl.indexOf('base64,') + 'base64,'.length;
                  var content = dataUrl.substring(idx);
                  zip.file('timeline.png', content, {base64: true})
                   .file('timeline.csv', btoa(csv), {base64: true});
                  for(let i=0; i < URIs.length; ++i){
                    zip.file(URIs[i].filename, URIs[i].uri, {base64: true});
                  }
                  zip.generateAsync({type:'base64'}).then(function (b64) {
                    var link = document.createElement('a');
                    link.download = 'mytimeline.zip';
                    link.href = 'data:application/zip;base64,' + b64;
                    link.click();
                  });
                });
            }
            $(document).on('shiny:connected', function(){
              Shiny.addCustomMessageHandler('download', downloadZIP);
            });"
            
              observeEvent(input$download, {
                filenames <- data[input$tbl1_rows_selected, "file_name"]
                files <- file.path(".", "www", filenames)
                URIs <- lapply(seq_along(files), function(i){
                  URI <- dataURI(file = files[i])
                  list(filename = filenames[i], uri = substr(URI, 14, nchar(URI)))
                })
                table <- fromJSON(toJSON(input$appts_data), simplifyDataFrame = FALSE)
                session$sendCustomMessage(
                  "download",
                  list(table = table, URIs = URIs)
                )
              })
            

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

            QUESTION

            Rshiny download button that gathers multiple files from various locations
            Asked 2020-Jul-07 at 22:35

            I am looking for info on having a download button in my app that pulls various files into a zip archive.

            My app displays a timeline and a datatable, and will have files associated with entries on the datatable. The files will be stored in a directory in the app, and I will have a column of filenames in the datatable.

            The idea is that when I click the download button, a zip archive will be created that contains a couple of standard files that I point to, a csv of the datatable, a png of the timeline, and any files that I have associated with the selected entries of the datatable.

            I haven't begun to deal with the files associated with the datatable, but that's my ultimate end state.

            Current Code

            ...

            ANSWER

            Answered 2020-Jul-07 at 22:35

            Here is a way using the JavaScript libraries

            • dom-to-image to export the timeline as a PNG image;

            • table2CSV to convert the table to a CSV string;

            • JSZip to zip.

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install timevis

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

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

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link