It's simple. We had a problem and built a solution.

After teaching an introductory data science and economics course using jupyter notebooks, we wanted to demo building a demand curve using student bids on products in a live notebook environment but there was no solution that allowed us to ask and utilize data in the same notebook.

So we built nbforms to allow instructors to use real-time class data for comprehensive analysis in a classroom setting.

What it does

nbforms is a Python package designed to allow forms to be submitted by users such that the data they submit is immediately available for use in the notebook by the entire group.

How we built it

nbforms was built as a two-part system. The first part is a client-side python package that uses ipywidgets to render user-specified forms from a configuration JSON file. The second part is a remote Ruby and Sinatra-based web application that instructors can deploy to Heroku for free. Data from notebooks is collected from submissions via HTTP requests and is stored, differentiating by a notebook identifier that the instructor specifies.

Challenges we ran into

ipywidgets-based widgets are cumbersome and stringing them together into an HTML form-esque configuration was challenging. We also had trouble figuring out ways for less technical instructors to be able to manage and maintain their nbforms server. This was later accomplished by building rake tasks into the server that simplified the process of managing the data stored there.

Accomplishments that we're proud of

nbforms will be deployed in the data science/economics course mentioned above, a course of about 100 students. It will also be deployed to collect feedback in Data 8X, the MOOC offering of UC Berkeley's foundational data science course offered through EdX.

nbforms is also being marketed at UC Berkeley for similar use cases in its data science curricula.

Built With

Share this project: