Code Monkey home page Code Monkey logo

shiny-gallery's Introduction

shiny-gallery

This repository contains the source code for (some of the) user-contributed apps featured in the Shiny User Showcase.

shiny-gallery's People

Contributors

johncoene avatar kierisi avatar mine-cetinkaya-rundel avatar rpodcast avatar wch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shiny-gallery's Issues

Genome-Browser ShinyApp Deployment Error

https://gallery.shinyapps.io/genome_browser/
Could you help identify what might be missing? The error is below:

Listening on http://127.0.0.1:7659/
`summarise()` has grouped output by 'hgnc_symbol', 'gene_affected', 'mutated_from_allele', 'mutated_to_allele', 'mutation_type', 'consequence_type',
'chromosome', 'chromosome_start'. You can override using the `.groups` argument.
`summarise()` has grouped output by 'chromosome', 'chromosome_start', 'chromosome_end', 'gene_affected', 'mutation_type', 'mutated_from_allele',
'mutated_to_allele'. You can override using the `.groups` argument.
Warning: Error in $<-: Assigned data `value` must be compatible with existing data.
✖ Existing data has 0 rows.
✖ Assigned data has 132 rows.
ℹ Only vectors of size 1 are recycled.
Caused by error in `vectbl_recycle_rhs_rows()`:
! Can't recycle input of size 132 to size 0.
  135: <Anonymous>
  134: signalCondition
  133: signal_abort
  132: abort
  131: tibble_abort
  130: abort_assign_incompatible_size
  129: <Anonymous>
  128: signalCondition
  127: signal_abort
  126: abort
  125: stop_vctrs
  124: stop_recycle_incompatible_size
  123: vec_recycle
  121: vectbl_recycle_rhs_rows
  120: tbl_subassign
  119: $<-.tbl_df
  115: <reactive:struct_plot_data> [/Users/<user>/Documents/sandbox/genome_browser/server.R#179]
   99: data
   82: add_scale_from_prop
   81: register_scales_from_props
   80: add_mark
   79: layer_paths
   78: add_mark
   77: layer_text
   76: %in%
   75: register_reactive
   74: handle_hover
   73: add_tooltip [/Users/<user>/Documents/sandbox/genome_browser/server.R#410]
   72: %in%
   71: register_reactive
   70: handle_click
   69: add_tooltip [/Users/<user>/Documents/sandbox/genome_browser/server.R#410]
   68: %in%
   67: register_reactive
   66: handle_click
   65: append_ggvis
   64: add_scale
   63: scale_ordinal
   62: append_ggvis
   61: add_scale
   60: scale_ordinal
   59: append_ggvis
   58: add_scale
   57: scale_nominal
   56: append_ggvis
   55: add_scale
   54: scale_nominal
   53: append_ggvis
   52: add_scale
   51: scale_nominal
   50: append_ggvis
   49: hide_axis
   48: append_ggvis
   47: hide_axis
   46: append_ggvis
   45: hide_legend
   44: merge_vectors
   43: add_options
   42: set_options
   41: shiny::is.reactive
   40: bind_shiny
   39: %>%
   38: server [/Users/<user>/Documents/sandbox/genome_browser/server.R#417]
    1: runApp
Error in `$<-`(`*tmp*`, annotation, value = c("CTX", "CTX", "CTX", "CTX",  :
  Assigned data `value` must be compatible with existing data.
✖ Existing data has 0 rows.
✖ Assigned data has 132 rows.
ℹ Only vectors of size 1 are recycled.
Caused by error in `vectbl_recycle_rhs_rows()`:
! Can't recycle input of size 132 to size 0.
Selecting by count

Thanks,
Coax

How to render a clickable link inside `ui.output_data_frame`

I would like to include a clickable link in the cell of ui.output_data_frame. I have tried a few iterations but cannot find anything that works.

  1. Raw text
import pandas as pd
from shiny import App, render, ui


app_ui = ui.page_fluid(
    ui.output_data_frame("data_output")
)


def server(input, output, session):
    # Load the data
    data = pd.DataFrame({
        "id": [1, 2, 3],
        "url": ['https://google.com', 'https://duckduckgo.com', 'https://bing.com']
    })

    @output
    @render.data_frame
    def data_output():
        df = data.copy()
        return df


app = App(app_ui, server)

Screenshot 2023-12-20 at 15 14 48@2x

  1. Use ui.a
    @output
    @render.data_frame
    def data_output():
        df = data.copy()
        df['url'] = df['url'].apply(lambda x: ui.a(x))
        return df

Screenshot 2023-12-20 at 15 16 28@2x

    @output
    @render.data_frame
    def data_output():
        df = data.copy()
        df['url'] = df['url'].apply(lambda x: f'<a href"{x}">click me</a>')
        return df

Screenshot 2023-12-20 at 15 17 31@2x

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.