Here is a selection of apps that I have built as part of my job a research analyst. Anvil has made a massive difference in how I get my job done.
The research portal is the central hub we use to connect staff to all (most) other resources offered by our department. It contains a curated list of files and applications, a chat window, and a search bar.
The portal uses a flavor of Role-Based Access Control that includes so-called “Attributes” (RBAC-A). More detail can be found in the following papers. I am not an expert in database design but I tried my best to learn about and follow these general guidelines.
Adding Attributes to Role-Based Access Control
The NIST Model for Role-Based Access Control: Towards A Unified Standard
Role Engineering: Methods and standards
To give you a sense of the structure of the DataTables, here are a few pictures that show the relationship between resources and users and how their access is controlled (via the access control table).
access control table
A common pattern in my apps is the use of decorators in server functions to check for authentication and allowed roles/attributes. For example:
I’ve been fairly happy with this mechanism as I can modify the allowed roles/attributes in one place.
Mental Health Referral Application
This is a multi-page application that manages mental health referral records. It allows records to be entered, managed, and visualized. Here is an example of the application using fake data.
Grammar of Graphics Game
For those in my organization who are learning to make charts with code, I built a training app that helps folks understand a concept called “Grammar of Graphics”. Specifically, the application connects English statements about how data should be visualized, to the corresponding code and chart.
This is a graphical query builder that allows staff to select student records that satisfy some pattern or criteria. Users can save their queries and also view and use baked-in examples. One hope is that this will help staff to learn the value of a well-defined research question.
Shareable demo of Data Explorer:
School Visit Tracker
This is another form-type of application that I am showing only because it has a few neat features:
The form itself is shared between three staff members associated with each school (superintendent, Principal, VP). The UI changes based on those roles.
You can see that there are many fillable components. When the form is saved (either through button clicks or auto-save), all of the components in the content panel are passed to a global module which processes all of the text extraction (or other relevant data) as well as the placement into the database. Since this is a mult-page application, that global module is used for each page, reducing code duplication (i.e., the forms themselves do not interact with the database).
This application gives a live and interactive view of consecutive and habitual absences for any school for which the user has access to (though their role and attributes). Notice that school-level measures can be clicked to reveal student-level details.
This is a perfect example of something that Anvil makes so easy. This app only took one day to put together. It is simply a set of filters that are used together to present an interactive chart. The chart reflects the percentage of accumulated student credits over time. When new criteria are chosen, new charts get added to the screen, making different views of the data easy for folks to compare. Here’s a GIF with some fake data:
Anvil has fundamentally changed how I do my job and how staff here interact with their data. Thank you Anvil developers for such a wonderful product!