November Updates
November went by so quickly. It has been half of the month. For this past month, I have done more work with Shiny App and Texas Politics project.
Shiny App Project
Advisor: Stacy Vlasits
Description: For this project, I continued to work on implementing features for the application built in Shiny App. The client requested two more features to be added: working with URL input and working with CSV files.
In tackling these two challenges, I isolate the function that handle the data uploads. The answer is that it is in page 2 and then, I looked at how to handle URL input and turn that into a table format. When I looked at the function that handles uploads of the data, I actually find a solution that works for both URL input and CSV input. I just need to dynamically change the extension accordingly to whatever the format of the file uploads. For example, the CSV would have csv extension and TSV would have tsv extension. Moreover, for handling URL string, I just need to extract the base of the string to get the extension.
A function like this solves both problem at the same time:
# Get file extension from either uploaded file or URL
ext <- if(!is.null(input$file1)){
tools::file_ext(input$file1$name)
}else if (!is.null(input$urlInput) && input$urlInput != “”){
# extract extension from URL
tools::file_ext(basename(input$urlInput))
}else{
“csv”
}
Texas Politics
Advisors: Chris Pittman
Description: For this project, I only get the overview of what the project is about. I did not start to look closely into the solutions. From the outset, it seems like the project involves a place for storing all of the updated elements including charts and blogs. Also, the project incorporates a change in the database with a boolean value “updated me” so that the blog, chart will be included into that place. The idea behind is that every year, there would be blogs, charts and other elements that get to be updated. Currently, there is one guy that have all these information but to streamline the process, we can leverage technology to keep track of all these information. It helps to onboard new people quickly to the updated part of the project.