'How to Share a Jupyter Notebook with a CSV Input

I am building a heat map for my company from a generated csv. After a lot of reading I built it using jupyter notebooks (online) using the gmaps API. I've never done anything like this before and jupyter/python/gmaps made it easy to accommodate my requirements (allows for zooming, hovering over a point displays data, easy data cleaning).

Now I've reached the point where I need to share what I have built (with non-programmers). Right now the user can hit a button and a csv generates, I then take that csv and manually place it in my jupyter notebook folder, my code reads it in via pandas and generates the heatmap. I've seen a lot of resources pointing to github, nbviewer, Colaboratory and others but can't seem to find anything that allows user input. Ideally users would be able to click the button and a heatmap would appear (online or not). Security is also an issue so I am not able to make this project public.

Is there a way to make jupyter notebooks (with gmaps) into an executable that allows input? Or another way to securely share my project that automates the csv upload? Am I looking at this from completely the wrong angle and need to change my technology?

Thank you very much in advanced! I am new to this kind of project and appreciate any help :)

More Info: Windows 10, General environment: visual studio 2019 C#, Current project: python 3



Solution 1:[1]

There is a framework called Mercury that can be used to convert Jupyter Notebook to interactive web app.

The use-case that you described can be very easily solved:

  1. Add raw cell with YAML config:
---
title: Upload file demo
description: Show how to upload a file in notebook with Mercury
show-code: False
params:
    filename:
        input: file
        maxFileSize: 1MB
        label: Please upload CSV file
---
  1. The above YAML will generate file upload widget.
  2. The uploaded file can be accessed in the notebook by variable filename which will store the path to new uploaded files.

The example notebook: enter image description here

The application generated with Mercury: enter image description here

Disclaimer: I'm the author of Mercury.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 pplonski