<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/my-first-shiny-app-control-charts/"></div></div><div><a data-url="https://www.r-bloggers.com/my-first-shiny-app-control-charts/" data-counturl="https://www.r-bloggers.com/my-first-shiny-app-control-charts/" data-count="horizontal" data-text="My first Shiny App: control charts" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://firsttimeprogrammer.blogspot.com/2016/09/my-first-shiny-app-control-charts.html"> The Beginner Programmer</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>After having carefully followed the online <a target="_blank" href="http://shiny.rstudio.com/tutorial/">official Shiny tutorial</a>, I decided to make a quick try at making my very first Shiny App. I should say that I found myself very well with the explanation given and Shiny was definitely one of the libraries that took the less time for me to start using it. Of course I’m still not a master of Shiny by no means, but I feel more confident on how to use it and on what can be done with it.</p>
<p><a target="_blank" href="https://i0.wp.com/lh3.googleusercontent.com/-4SaQyBlZGs0/V-Y6jImWEpI/AAAAAAAABu0/v_Xrxsir1ZQ/s1600-h/Image%2525201%25255B3%25255D.jpg?ssl=1"><img title="Image 1" alt="Image 1" src="https://i1.wp.com/lh3.googleusercontent.com/-QXWGJuypOoI/V-Y6jwk2qAI/AAAAAAAABu4/DT4CgvWL9Do/Image%2525201_thumb%25255B1%25255D.jpg?resize=456%2C217&ssl=1" border="0" data-recalc-dims="1"></a></p>
<p>I’m working on an R project related to <strong>control charts</strong> and I was hinted to get to know Shiny, since it is very likely that the project will involve an interactive interface and Shiny fits the bill perfectly for this assignment. For this reason I took an afternoon for getting familiar with Shiny and build this App. Enough talk, let’s get to the App.</p>
<p> <a name="more"></a><br>
<h2></h2>
<h2>App description</h2>
<p>The App is designed with one objective only: let me learn <strong>Shiny</strong> :D. I think this is quite obvious to the expert developer, however, the main idea is to allow the user to upload a .csv file of ungrouped observations, select the control chart to plot, group size, variable to plot, and then display the control chart and the results of the calculation as a data table.</p>
<h2>Input data structure</h2>
<p>The input file must be a .csv. So far I have not allowed other formats. The .csv can contain as many variables as you like, there is no limit, but bear in mind that Shiny (the free version at least) limits the size of files that can be uploaded to 5 MB. The file should have no row names, however, in case row names are present, do not reserve a free spot (“ ”) in the columns name row at the beginning of the file and everything should work fine. The data should be a series of consecutive measurements at a given constant frequency. For instance, if you took 2 measures of a certain variable y each day for 3 days, your data should be in the following format:</p>
<p>day_id,y_measurement<br>1,1000<br>1,1001<br>2,1002<br>2, 1003<br>3,1004<br>3,1005</p>
<p>Of course, the day_id variable is not necessary. In this case the group size would be 2. For more information and an example of the allowed .csv format please check the <a target="_blank" href="https://github.com/mick001/control_charts_shiny/blob/master/README.md">readme</a>.</p>
<h2>Available charts</h2>
<p>Only charts for quantitative variables are available. So far, the <strong>xbar-s</strong> and <strong>s</strong> charts are the only two supported. You can choose how many $\sigma$ you would like your control limits to be wide, 3 is the default but you can choose a higher or lower margin. The parameters of the control chart are showed in a table below the graph for further inspection.</p>
<h2>Where to find the App</h2>
<p>The App is available <a target="_blank" href="https://michy-apps.shinyapps.io/control_charts/">here</a>. By default, the mtcars dataset is used, although it is not the exact fit it is needed just for show until you upload your data.</p>
<p>The application seems to run smoothly and overall I’m quite happy with how it turned out. This was just a test application for myself, so I did not take that much care of the graphical side of the application. Any comment is welcomed, thank you.</p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="https://www.r-bloggers.com/my-first-shiny-app-control-charts/"></div></div><div><a data-url="https://www.r-bloggers.com/my-first-shiny-app-control-charts/" data-counturl="https://www.r-bloggers.com/my-first-shiny-app-control-charts/" data-count="vertical" data-text="My first Shiny App: control charts" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://firsttimeprogrammer.blogspot.com/2016/09/my-first-shiny-app-control-charts.html"> The Beginner Programmer</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/c_F48EQkRbU"></a></div>