DEV Community

d
d

Posted on

Plotting out SORA

Image description

Let's generate a graph using SORA 3M and SORA 1M data. First download the dataset, it should come in the form of a csv.
Then proceed to clean the dataLet's generate a graph using SORA 3M and SORA 1M data.

First download the dataset, it should come in the form of a csv.
Then proceed to clean the data

import pandas as pd

df = pd.read_csv("sora.csv")
df = df[df["Compount SORA - 1 month"] != '-']
df = df[df["Compount SORA - 3month"] != '-']
df = df.drop(columns=["SORA Value Date", "year", "month"])
df.to_csv("sora (edited).csv", index=False)
Enter fullscreen mode Exit fullscreen mode

Then plot out the data

import pandas as pd
import plotly.graph_objects as go

df['Compound SORA - 3 month'] = pd.to_numeric(df['Compound SORA - 3 month'], errors="coerce")

fig = go.Figure()

fig.add_trace(
    go.Scatter(
        x=df['SORA Publication Date'],
        y=df['Compound SORA - 3 month'],
        marker=dict(color="Blue", symbol="circle", size=2),
        name="SORA - 3M"
    )
)

fig.add_trace(
    go.Scatter(
        x=df['SORA Publication Date'],
        y=df['Compound SORA - 1 month'],
        marker=dict(color="Black", symbol="circle", size=1),
        name="SORA - 1M"
    )
)
Enter fullscreen mode Exit fullscreen mode

This should then give you the result

Image description

The original version of this article was published on medium.

Top comments (0)