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.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more