Shiny (web framework)

Shiny
Original author(s)Joe Cheng
Developer(s)RStudio Inc. (and current renamed company Posit PBC)
Initial releaseNovember 2012; 12 years ago (2012-11)
Stable release
1.9.1[1]
Repository
Written inR / Python
LicenseMIT License
Websiteshiny.rstudio.com

Shiny is a web framework for developing web applications (apps), originally in R and since 2022 in python. It is free and open source.[2] It was announced by Joe Cheng, CTO of Posit, formerly RStudio, in 2012.[3] One of the uses of Shiny has been in fast prototyping.[4]

In 2022, a separate implementation Shiny for Python was announced.[5] It is not meant to be a replacement, whereby both implementations will be developed concurrently and may never have all the features of each other. There is also Shinylive that allows running Shiny on the client (i.e., program code does not run on the server, reducing server load to just serving the code itself).[6]

Features

Shiny creates a reactive context wherein the user specifies, through input variables, the circumstances under which computations are re-executed, or graphs (often visualizations) re-rendered; this occurs almost instantaneously. The input variables are evaluated via a user interface which allows the simple creation of widgets such as text boxes, radio buttons, and drop-down lists.[3][7]

There are two main parts to a Shiny file, which may alternatively be stored in two separate files. One is designed to accommodate the user interface, the appearance of which is restricted by the default choices, though can be extended through various other R packages. The other is designed to accommodate the server computations and plot generating code, for which all the built-in facilities of R are available.[3]

Examples

A screenshot of the example app

This is an example of a basic application in R where:[8]

library(shiny) 

ui <- fluidPage(
  textInput("name", "What is your name?"),
  textOutput("greeting")
)

server <- function(input, output, session) {
  output$greeting <- renderText({paste0("Hello ", input$name)})
 } 

shinyApp(ui, server)

And the equivalent application written in python:[9]

from shiny import App, reactive, render, ui

app_ui = ui.page_fluid(
    ui.input_text("name", "What is your name?"),
    ui.output_text("greeting"),
)

def server(input, output, session):

    @render.text
    def greeting():
        return f"Hello {input.name()}"

app = App(app_ui, server)

And shiny express for python:[10]

from shiny.express import input, render, ui

ui.input_text("name", "What is your name?")

@render.text
def greeting():
    return f"Hello {input.name()}"

Deploying / Hosting Shiny

Deploying Shiny (R) can be achieved through several popular methods:

  • Shiny Server (Open Source): This option allows on-premises hosting for Shiny applications, giving users control over server configurations without licensing costs. It’s ideal for organizations that want direct server access and control.
  • faucet:[11][12] An open-source tool by ixpantia, faucet simplifies Shiny app deployment within organizations. It’s designed to streamline app deployment by integrating scaling, load balancing and monitoring directly and a configuration interface ready for working in containerized environments.
  • Posit Connect[13] (formerly RStudio Connect): A commercial, on-premises solution offering advanced features like user authentication, scheduled reporting, and support for multiple content types, including Shiny applications and R Markdown.
  • shinyapps.io:[14] A cloud-hosted service managed by Posit, providing easy deployment and scaling of Shiny apps without requiring server management. It’s user-friendly, ideal for small teams or solo developers. Hosting a Shiny app on a shinyapps.io server is free up to certain limits but paid tiers are relatively expensive compared to hosting on other cloud computing platforms.[3]

References

  1. ^ "Shiny: Web Application Framework for R". 1 August 2024.
  2. ^ Doi, Jimmy; Potter, Gail; Wong, Jimmy; Alcaraz, Irvin; Chi, Peter (2016). "Web Application Teaching Tools for Statistics Using R and Shiny". Technology Innovations in Statistics Education. 9 (1). doi:10.5070/T591027492.
  3. ^ a b c d Kasprzak, Peter; Mitchell, Lachlan; Kravchuk, Olena; Timmins, Andy (2020). "Six Years of Shiny in Research - Collaborative Development of Web Tools in R" (PDF). The R Journal. 12 (2): 20–42. doi:10.32614/RJ-2021-004. S2CID 231709443. Retrieved 12 March 2022.
  4. ^ Li, Yu (2020). "Towards fast prototyping of cloud-based environmental decision support systems for environmental scientists using R Shiny and Docker". Environmental Modelling & Software. 132: 104797. doi:10.1016/j.envsoft.2020.104797. hdl:20.500.11850/431312. S2CID 221823072.
  5. ^ Machlis, Sharon (2022-07-27). "RStudio unveils Shiny for Python". InfoWorld. Retrieved 2024-05-17.
  6. ^ "Shiny for Python - Shinylive: Shiny + WebAssembly". shiny.rstudio.com. Retrieved 2023-01-30.
  7. ^ Kaufman, Aaron R. (30 April 2020). "Implementing novel, flexible, and powerful survey designs in R Shiny". PLOS ONE. 15 (4): e0232424. Bibcode:2020PLoSO..1532424K. doi:10.1371/journal.pone.0232424. PMC 7192460. PMID 32353057.
  8. ^ Wickham, Hadley. "Your first Shiny app". Mastering Shiny. Retrieved 25 October 2024.
  9. ^ "Shiny for Python - Express vs. Core". Retrieved 28 October 2024.
  10. ^ "Shiny for Python - Overview". Retrieved 25 October 2024.
  11. ^ ixpantia/faucet, ixpantia, 2024-11-01, retrieved 2024-11-01
  12. ^ "How to Run R Shiny in Docker: A Step-by-Step Guide". www.ixpantia.com. 2024-10-08. Retrieved 2024-11-01.
  13. ^ "Posit". Posit. Retrieved 2024-11-01.
  14. ^ "shinyapps.io". www.shinyapps.io. Retrieved 2022-05-24.

Read other articles:

العلاقات الشمال مقدونية الكولومبية شمال مقدونيا كولومبيا   شمال مقدونيا   كولومبيا تعديل مصدري - تعديل   العلاقات الشمال مقدونية الكولومبية هي العلاقات الثنائية التي تجمع بين شمال مقدونيا وكولومبيا.[1][2][3][4][5] مقارنة بين البلدين هذه مقارن�...

 

 

Bank holding into and from which money can be placed or withdrawn Deposits redirects here. For other uses, see Deposit (disambiguation). The examples and perspective in this article may not represent a worldwide view of the subject. You may improve this article, discuss the issue on the talk page, or create a new article, as appropriate. (April 2016) (Learn how and when to remove this template message) Part of a series on financial servicesBanking Types of banks Advising Banq Bulge bracket Ce...

 

 

Запрос «Землеподобная планета»[d] перенаправляется сюда. На эту тему нужно создать отдельную статью. Сравнительные размеры планет земной группы Планеты земно́й гру́ппы — четыре планеты Солнечной системы: Меркурий, Венера, Земля и Марс[1]. Расположены во внутрен�...

Macadamia Klasifikasi ilmiah Kerajaan: Plantae (tanpa takson): Angiospermae (tanpa takson): Eudikotil Ordo: Proteales Famili: Proteaceae Genus: MacadamiaF.Muell. Spesies Macadamia claudiensis Macadamia grandis Macadamia hildebrandii Macadamia integrifolia Macadamia jansenii Macadamia ternifolia Macadamia bavana Macadamia tetraphylla Macadamia whelanii Macadamia adalah genus dari delapan spesies tumbuhan dari familia Proteaceae, tersebar di Australia timur (7 spesies), dan Sulawesi. Di Jawa T...

 

 

First Lady of MozambiqueIncumbentIsaura Nyusisince 15 January 2015ResidencePalácio da Ponta VermelhaInaugural holderGraça MachelFormation25 June 1975 First Lady of Mozambique (Portuguese: Primeira-Dama de Moçambique[1]) is the title held by the wife of the president of Mozambique.[1] There have been just four first ladies since Mozambique's independence in 1975. The country's current first lady is Isaura Nyusi, wife of President Filipe Nyusi, who has held the position ...

 

 

Country in Southeast Europe This article is about the modern country. For other uses, see Macedonia (disambiguation). Republic of North MacedoniaРепублика Северна Македонија (Macedonian)Republika e Maqedonisë së Veriut (Albanian) Flag National emblem Anthem: Денес над Македонија (Macedonian)Today over MacedoniaLocation of North Macedonia (green)in Europe (dark grey)  –  [Legend]Capitaland larg...

Ne doit pas être confondu avec Ghostface. Ghostface Killah Ghostface Killah en 2010.Informations générales Surnom Ghostface Tony Starks Nom de naissance Dennis Coles Naissance 9 mai 1970 (53 ans)Staten Island, New York, États-Unis Activité principale Rappeurauteur-compositeurproducteur délégué Genre musical Hip-hoprap East Coastrap hardcoregangsta rap Années actives Depuis 1992 Labels Tommy Boy EntertainmentStarks EnterprisesSoul Temple (actuellement)Razor SharpEpicDef Jam (anc...

 

 

ХристианствоБиблия Ветхий Завет Новый Завет Евангелие Десять заповедей Нагорная проповедь Апокрифы Бог, Троица Бог Отец Иисус Христос Святой Дух История христианства Апостолы Хронология христианства Раннее христианство Гностическое христианство Вселенские соборы Н...

 

 

American politician For other people with the same name, see James Harvey (disambiguation). Senator Harvey redirects here. For other uses, see Senator Harvey (disambiguation). James M. HarveyUnited States Senatorfrom KansasIn officeFebruary 12, 1874 – March 3, 1877Preceded byRobert CrozierSucceeded byPreston B. Plumb5th Governor of KansasIn officeJanuary 11, 1869 – January 13, 1873LieutenantCharles Vernon EskridgePeter Percival ElderPreceded byNehemiah GreenSucceeded...

State park in Pennsylvania, US Colton Point State ParkIUCN category III (natural monument or feature)CCC-built overlook looking south into the Pine Creek Gorge in Colton Point State ParkLocation of Colton Point State Park in PennsylvaniaShow map of PennsylvaniaColton Point State Park (the United States)Show map of the United StatesLocationShippen, Tioga, Pennsylvania, United StatesCoordinates41°41′59″N 77°27′53″W / 41.69972°N 77.46472°W / 41.69972; -77.4647...

 

 

この項目には、一部のコンピュータや閲覧ソフトで表示できない文字が含まれています(詳細)。 数字の大字(だいじ)は、漢数字の一種。通常用いる単純な字形の漢数字(小字)の代わりに同じ音の別の漢字を用いるものである。 概要 壱万円日本銀行券(「壱」が大字) 弐千円日本銀行券(「弐」が大字) 漢数字には「一」「二」「三」と続く小字と、「壱」「�...

 

 

谢赫·穆吉布·拉赫曼Sheikh Mujibur Rahmanশেখ মুজিবুর রহমান第1任孟加拉總統任期1971年4月11日—1972年1月12日总理塔杰丁·艾哈迈德前任首任继任Nazrul Islam (Acting)任期1975年1月25日—1975年8月15日总理Muhammad Mansur Ali前任Mohammad Mohammadullah继任孔达卡尔·穆什塔克·艾哈迈德第2任孟加拉總理任期1972年1月12日—1972年1月24日总统阿布·赛义德·乔杜里Mohammad Mohammadullah前任Tajud...

Military uprising in Barcelona in 1936 Barcelona's 19 July military risingPart of the Spanish coup of 1936Soldiers and Assault Guards entrenched in a buildingDate19 July 1936LocationBarcelona, Catalonia, SpainResult Republican victoryBelligerents Spanish Republic Generalitat of Catalonia CNT/FAI Nationalist SpainCommanders and leaders Buenaventura Durruti Francisco Ascaso † General Francisco Llano de la Encomienda Colonel Antonio Escobar Huertas President Lluís Companys Captain Fr...

 

 

Class of murder Honour Killing redirects here. For the film, see Honour Killing (film). See also: Dueling Part of a series onHomicide Murder Note: Varies by jurisdiction Assassination Child murder Consensual homicide Contract killing Crime of passion Depraved-heart murder Felony murder rule Foeticide Honor killing Human cannibalism Child cannibalism Human sacrifice Child sacrifice Internet homicide Lonely hearts killer Lust murder Lynching Mass murder Mass shooting Mass stabbing Misdemeanor m...

 

 

American soccer player Chris Wingert Personal informationFull name Chris WingertDate of birth (1982-06-16) June 16, 1982 (age 42)Place of birth Babylon, New York, United StatesHeight 5 ft 11 in (1.80 m)Position(s) DefenderCollege careerYears Team Apps (Gls)2000–2003 St. John's Red Storm Senior career*Years Team Apps (Gls)2003 Brooklyn Knights 12 (1)2004–2005 Columbus Crew 49 (0)2006–2007 Colorado Rapids 16 (0)2007–2014 Real Salt Lake 204 (1)2015–2016 New York Cit...

American track and field athlete Ray EwryEwry at the 1908 OlympicsPersonal informationFull nameRaymond Clarence EwryBorn(1873-10-14)October 14, 1873Lafayette, Indiana, U.S.DiedSeptember 29, 1937(1937-09-29) (aged 63)Long Island, New York, U.S.Alma materPurdue UniversityHeight6 ft 1 in (1.85 m)Weight174 lb (79 kg)SportSportAthleticsEvent(s)standing high, long, and triple jumpClubPurdue Boilermakers, West Lafayette, Indiana;NYAC, New YorkAchievements and ...

 

 

漢平東越之戰漢朝南擴的一部分前2世紀漢朝的擴張日期前111年秋季-前110年1月地点武夷山脈结果 閩越亡國领土变更 閩越納入漢朝領土参战方 閩越(武帝) 西漢 閩越(繇王)指挥官与领导者 餘善 †騶力多军  韓說楊僕王溫舒严甲吳陽刘福 居股 敖 兵力 700(吴阳部) 漢平東越之戰是西漢漢武帝時期发生在东南方的一場戰役。戰爭初期,闽越(又称东越)...

 

 

Approssimazione della funzione onda quadra attraverso i primi quattro termini della corrispondente trasformata di Fourier In matematica, in particolare in analisi armonica, la serie di Fourier è una rappresentazione di una funzione periodica mediante una combinazione lineare di funzioni sinusoidali. Questo tipo di decomposizione è alla base dell'analisi di Fourier. Indice 1 Storia 2 Definizione 2.1 Forma rettangolare 2.2 Forma complessa 2.3 Forma polare 3 Convergenza delle serie di Fourier ...

Ne doit pas être confondu avec Sancti hieronymi ordo ou Congrégation des pauvres ermites de Saint Jérôme. Ordre de Saint-Jérôme Ordre de droit pontifical Approbation pontificale 18 octobre 1373par Grégoire XI Institut Ordre monastique Type contemplatif Règle règle de saint Augustin But Prière Structure et histoire Fondation 1370Lupiana Fondateur Pierre Fernandez Pecha Abréviation O.S.H Autres noms Hiéronymites Patron saint Jérôme de Stridon Site web (es) site web Liste des ordr...

 

 

Marsekal Udara Sir Stephen John Hillier, GCB, CBE DFC (lahir 1962) adalah pensiunan perwira senior Angkatan Udara Kerajaan, yang menjabat sebagai Kepala Staf Udara dari 2016 hingga 2019. Ia dianugerahi Distinguished Flying Cross atas tindakannya di Gulf pada tahun 1999 dan dianugerahi Medali Bintang Perunggu Amerika Serikat atas jasanya dalam Perang Irak. Ia kemudian menjabat sebagai Komandan Perwira Udara Grup No. 2, Direktur Keunggulan Penerangan Kementerian Pertahanan, Wakil Kepala Staf Pe...