The best option for the layout would be the sidebarLayout. The buttons should be positioned in a "settings panel" and then the main area of the app should display the data table. Since we five key actions in our app (view, edit, cancel, save, and refresh), we can use buttons as we want to trigger events on demand. Using the list of features, let's figure out how to structure the interface. This list gives us some basic features for our designing the interface. refresh: Once the changes have been saved, we will need to refresh the application so the changes can be reflected in the table.įor now, we will focus on these items.We might also want to archive previous versions in the event we need to undo changes. save: Most importantly, we will need an option that saves our data.For example, if a user enters the wrong information or decides not to edit data, then it would be useful to have a way to discard the changes and exit the editing mode. cancel: A cancel feature would be perfect for this application.editor: Since the data will be displayed as view only by default, it would be nice to have something that starts the editing mode.In your application, it might be a good idea to create user groups to control who can edit data. We probably do not want to encourage users to edit data right away, but have it as a feature. viewer: When the app loads, it would be nice to display the data in a table.For example, when we load the application, what do we want to see first? To start off, we should make a list of things we want the application to do. Use the link above to download the file and adjust the script as necessary. I did not include the full dataset as it's quite large. See the script data_0_source.R in the scripts/ folder for the code. I randomly pulled 100 rows from the file. In this example, we will using a subset of the NYC Dog Licensing Dataset. First, we build our UI and then write then server code to handle all of the features we want in our app. To get the shiny app running, we will develop our application step-by-step. In this tutorial, we will create a data editor shiny application using the rhandsonpackage. This would also eliminate the need for editing values using other tools and duplicating files. I created this example in response to a question that I had while working on a project: "How can I edit a dataset in a shiny app?"Įditing data in a shiny application would be pretty useful as the changes could automatically be reflected in the visualizations, text, or other elements. Have you ever wanted to edit data in a shiny app? Learn how to build a shiny app for editing data and saving changes to file, and then reloading the changes into your app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |