I have an app (mparanza.com) in which the user uploads a file, and then can produce many different types of charts. There is no user identification mechanism, and I would like to leave it that way since the data can be sensitive.
The parameters to produce a given chart are written to a dictionary. At present the dictionary is discarded once the user plots chart A and goes not to plot chart B (a second dictionary is generated and discarded)
I would like to find a way (session state) that the user can plot chart A B and C, the dictionaries of the three plots are somehow sticked together in a jason file that the user can save.
When the users uploads the json, the app runs all three plots (saving them to png) with the new data the user has uploaded.
I am sure this is something session state can take care of, but not sure where to start.
It is unclear what you need help with. Storing a dictionary in session_state? Sticking three dictionaries together? Converting beetween dictionaries and JSON? Allowing users to download and upload JSON?
Saving a dictionary made up of a set of dictionaries each corresponding to a run of the app (a plot). I need to save all the dictionaries that have been produced during a session by the user.
Of course the user will need to tell me in some way that she wants to save a certain number of plot configurations (dictionaries) that she can download if a dictionary of dictionaries and then reupload to run as a loop.
At present I understand how to save the dictionary of one plot, but not how to “keep” many successive dictionaries (each corresponding to the parameters of a different plot) together.
Sorry I hope now is clearer. I need to stich together the dictionaries of a set of successive plots done by a given user that so to say wants to configure a repeatable report made up of many charts.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.