Inspiration
I wasn’t able to vote but, I attended town meeting last year to start getting a sense of my new community of Nottingham, NH. One of the warrant articles requested the town to provide live updates to the expected tax impacts from the passed and remaining proposed articles. It was voted down, I think mostly because it was viewed as too difficult to provide in a meaningful manner for the town as a whole. I saw this as an opportunity.
I decided this would be a great way to learn about building interactive web applications in R using the tools provided by the Shiny package. It turned out to be a bit more difficult than I’d thought, but mostly because I was overly optimistic about how easy it would be to create and partly because I decided to add a few features I hadn’t thought of at the time.
Application Overview
What I came up with is the Nottingham, NH Town Meeting Tax App. The application uses 1) the warrant article descriptions and estimated tax impact per $1000 of appraised property value provided by the town of Nottingham and 2) a residents appraised property value. Using these two inputs the application calculates the possible tax impact for the owners of that property. One of the added features was providing a link to the town’s tax map so that residents can look up their appraised property value.
As warrant articles are passed or rejected, users can update the status of the warrant articles to obtain an updated calculation of the estimated tax impacts, measured in 4 categories:
- Total potential impact: estimated taxes resulting from the sum of passed articles and articles still up for a vote
- Remaining proposed impact: estimated taxes resulting from articles still up for a vote
- Passed tax impact: estimated taxes resulting from passed articles
- Rejected impact: estimated taxes resulting from rejected articles
Application Development
For those that might be interested in the code, it is available as a repository on my GitHub site here. The tricky pieces for me, as this was my first deployed application, were learning html tags and how to loop through input IDs. The html tags were used to insert hyperlinks, which is pretty straight forward, but was new to me. It uses the a() tag, which takes href=”address”, and “displayed text” as inputs. The more tricky part, which required a query to the very helpful R community, was looping through the article status inputs. Looping through the inputs enables the application to update the tax estimates without my rewriting code for each article. This was accomplished by creating a new list object with the input IDs: status_list<-lapply(1:nrow(arts), function(i) {input[[paste0(‘Art’,i)]]}) that contains the input IDs and referring to status_list[[i]] in the for loop.
Your Town
The application is fairly easy to adapt to other towns. The needed information to create a similar application for other towns is a list of warrant articles, and the estimated tax impacts for those articles. Get in touch if you want my help creating a town meeting tax application for your town.