ProjectDrawdown / global-research-platform

Drawdown Global Research Platform - UI
Other
20 stars 19 forks source link

As a user I can see the results of calculations using uploaded Adoption and TAM data #56

Open eethann opened 2 years ago

eethann commented 2 years ago

This is the complement to #5 and #53. Once we have an API endpoint to create new resource entities, how are those used in the calculations.

First step is to research the options for passing adoption and TAM data dynamically to the calculate functions, instead of using the data loaded from the Solutions API CSVs at init.

brodavi commented 2 years ago

So in the setup_calculations function in service/api/calculate.py line 240, we're just importing an entire solution object before sending it along to be calculated at a later step. I think we should just be able to add our own VMA, TAM, adoption and custom adoption data at that point, similar to how we're doing advanced controls inputs. It's pretty messy, but I think it should work. I don't see any other way to do it, given the current implementation.

brodavi commented 2 years ago

what do you think @eethann @sutjin

sutjin commented 2 years ago

Notes after discussion:

So in the platform side, our changes would be passing in a unique name/id that the solutions can do a GET call.