Jackodb / Visualization

Visualization using DASH/Plot.ly
0 stars 0 forks source link

New data format for dynamic charting #10

Open Jackodb opened 5 years ago

Jackodb commented 5 years ago

It would be a good idea if I would make a dict object in the following format:

{price: order size, price: order size, ...}

this way, you can easily add new orders to a specific price point (bar) by searching for the specific price in the dict and add the order to the corresponding order size

Jackodb commented 5 years ago

This should do it:

mountain_dict = {}
current_dict = {}
for x,y,z in zip(df.Price,df.Mountain_neutral_view,df.Current):
    mountain_dict[x]=y
    current_dict[x]=z
Jackodb commented 5 years ago

https://www.pythonforbeginners.com/dictionary/how-to-use-dictionaries-in-python/

Jackodb commented 5 years ago

When converting input from user to float, you get the following error because a None value gets parsed automatically, although no value has been deliberately parsed: TypeError: float() argument must be a string or a number, not 'NoneType'

This doesn't really matter since data comes from Bitshares instance, not user input.

Jackodb commented 5 years ago

The order sizes get refreshed every time you add new data or refresh the browser. So if you first add 10 and then 20 to an order size of 10, it will not be 40 but 30. How to fix?

Jackodb commented 5 years ago

https://towardsdatascience.com/10-python-pandas-tricks-that-make-your-work-more-efficient-2e8e483808ba

Jackodb commented 5 years ago

Data doesn't update every time a value gets added because data doesn't get saved locally every time new data is parsed by the user. I think this is nothing to worry about since data is extracted from Bitshares.

Jackodb commented 5 years ago

There needs to be a way to distinguish current orders from initial orders but how? What property does order in for order in Account.openorders have that can be used to do the above?

Jackodb commented 5 years ago

Wait for https://github.com/Codaone/DEXBot/issues/636 to be done.