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.

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay