Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General post-processing function for plots #31

Open
AngelaKTE opened this issue Jan 25, 2021 · 0 comments
Open

General post-processing function for plots #31

AngelaKTE opened this issue Jan 25, 2021 · 0 comments
Assignees
Labels
viz all issues refering to data visualization & results

Comments

@AngelaKTE
Copy link
Contributor

AngelaKTE commented Jan 25, 2021

Write a general function to transform dataframe zero to newdataframe for a specific plots.

Context:
When running the cadCAD we'll produce a dataframe ("dataframe zero") that will always have the same structure:

  • per timestep (=rows)
    columns:
  • a) token_a_balance...
  • b) token_b_balance ...etc
  • c) token_a_weight
  • d) token_b_weight...etc
  • e) token_a_denorm_weight
  • f) token_b_denorm_weight...etc
  • g) generated_fees
  • h) pool_shares
  • i) token_a_value
  • j) token_b_value...etc

After this step we'll create various plots, like comparing total TVL with liquidity (total number of tokens in the pool).

So the general procedure is:
take dataframe zero and create a newdataframe (e.g. named "c191) for simulation C1.9.1 in the notebook based on it:

  • compute TVL: take token_a_value+token_b_value...etc; and create a new column (TVL) to add TVL for every timestep(row)
  • compute liquidity: take token_a_balance+token_b_balance...etc; and create a new column(liq) to add liquidity for every timestep

and then plot a chart using newdataframe values:

Bildschirmfoto 2021-01-25 um 09 35 26

@AngelaKTE AngelaKTE added the viz all issues refering to data visualization & results label Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
viz all issues refering to data visualization & results
Projects
None yet
Development

No branches or pull requests

2 participants