Python Code and Output

Individual Line Chart for all Adani Group companies

fig1 = px.line(df,x = df['date'], y =df['open'], color= 'company', facet_col="company", facet_col_wrap=2) fig1.show()

Line Chart for all Adani Group companies

fig2 = px.line(df,x = df['date'], y =df['open'], color= 'company', line_group='company', hover_name='company', line_shape="spline", render_mode="svg") fig2.update_xaxes( rangeslider_visible=True, rangeselector=dict( buttons=list([ dict(count=5, label="5d", step="day", stepmode="backward"), dict(count=1, label="1m", step="month", stepmode="backward"), dict(count=6, label="6m", step="month", stepmode="backward"), dict(count=1, label="YTD", step="year", stepmode="todate"), dict(count=1, label="1y", step="year", stepmode="backward"), dict(count=5, label="5y", step="year", stepmode="backward"), dict(step="all") ]) ) ) fig2.update_layout(title_text='Line Chart') fig2.update_layout(xaxis_rangeslider_visible=False) fig2.show()

Area graph for all Adani Group companies

fig3 = px.area(df,x = df['date'], y =df['open'], color= 'company', line_group='company') fig3.update_layout(title_text='Area graph') fig3.show()

Individual Histogram for all Adani Group companies

fig4 = px.histogram(df,x = df['date'], y =df['open'], color= 'company',histfunc="avg", facet_col="company", facet_col_wrap=2) fig4.show()

Histogram for all Adani Group companies

fig5 = px.histogram(df, x="date", y="close", color='company', barmode='group',histfunc="avg", height=400) fig5.update_layout(title_text='Histogram') fig5.show()

Average closing price for all Adani Group companies

fig6 = px.histogram(df, x="date", y="close", color='company', barmode='group',histfunc="avg", height=400) fig6.update_layout(title_text='Histogram') fig6.show()

fig7 = px.histogram(df, x="company", y="close",
             color='company', barmode='group',histfunc="max")
fig7.update_layout(title_text='Max Close Price')

fig7.show()

fig8 = px.histogram(df, x="company", y="close",
             color='company', barmode='group',histfunc="min")
fig8.update_layout(title_text='Min Close Price')

fig8.show()

Candle Stick Visualisation for ACC cements

import plotly.graph_objects as go fig9 = go.Figure(data=[go.Candlestick(x=df_acc['date'], open=df_acc['open'], high=df_acc['high'], low=df_acc['low'], close=df_acc['close'])]) fig9.update_xaxes( rangeslider_visible=True, rangeselector=dict( buttons=list([ dict(count=1, label="1m", step="month", stepmode="backward"), dict(count=6, label="6m", step="month", stepmode="backward"), dict(count=1, label="YTD", step="year", stepmode="todate"), dict(count=1, label="1y", step="year", stepmode="backward"), dict(step="all") ]) ) ) fig9.update_layout(xaxis_rangeslider_visible=False) fig9.update_layout(title_text='Candle stick') fig9.show()

Line chart for ACC cements for time-series analysis

import plotly.express as px fig10 = px.line(df_acc, x=df_acc['date'], y=df_acc['close']) fig10.update_layout(title_text='Line chart for ACC') fig10.show()

Line chart for ACC cements with Selectors

fig11 = px.line(df_acc, x='date', y='high', title='Line chart for ACC with selectors') fig11.update_xaxes( rangeslider_visible=True, rangeselector=dict( buttons=list([ dict(count=5, label="5d", step="day", stepmode="backward"), dict(count=1, label="1m", step="month", stepmode="backward"), dict(count=6, label="6m", step="month", stepmode="backward"), dict(count=1, label="YTD", step="year", stepmode="todate"), dict(count=1, label="1y", step="year", stepmode="backward"), dict(count=5, label="5y", step="year", stepmode="backward"), dict(step="all") ]) ) ) fig11.update_layout(xaxis_rangeslider_visible=False) fig11.show()

Area graph for ACC cements

fig12 = px.area(df_acc,x = df_acc['date'], y = df_acc['open'], facet_col_wrap=2) fig12 = px.area(df_ambuja,x = df_ambuja['date'], y = df_ambuja['open'], facet_col_wrap=2) fig12.update_layout(title_text='Area graph for ACC') fig12.show()

Area chart for ACC and Ambuja

fig13 = px.area(vertical_concat,x = vertical_concat['date'], y =vertical_concat['open'], facet_col_wrap=2) fig13.update_layout(title_text='Area chart for ACC and Ambuja') fig13.show()

Line chart for ACC and Ambuja

fig14 = px.line(vertical_concat,x = vertical_concat['date'], y =vertical_concat['open'], facet_col="company", facet_col_wrap=2) fig14.update_layout(title_text='Line chart for ACC and Ambuja') fig14.show()

Line chart for ACC and Ambuja with selectors

fig15 = px.line(vertical_concat,x = vertical_concat['date'], y =vertical_concat['open'], color=vertical_concat['company'], line_group=vertical_concat['company'], hover_name=vertical_concat['company'], line_shape="spline", render_mode="svg") fig15.update_xaxes( rangeslider_visible=True, rangeselector=dict( buttons=list([ dict(count=5, label="5d", step="day", stepmode="backward"), dict(count=1, label="1m", step="month", stepmode="backward"), dict(count=6, label="6m", step="month", stepmode="backward"), dict(count=1, label="YTD", step="year", stepmode="todate"), dict(count=1, label="1y", step="year", stepmode="backward"), dict(count=5, label="5y", step="year", stepmode="backward"), dict(step="all") ]) ) ) fig15.update_layout(xaxis_rangeslider_visible=False) fig15.update_layout(title_text='Line chart for ACC and Ambuja with selectors') fig15.show()

Individual line chart for ACC and Ambuja

fig16 = px.line(vertical_concat,x = vertical_concat['date'], y =vertical_concat['open'], color= 'company', facet_col="company", facet_col_wrap=2 ) fig16.show()

Histogram on date axes

fig17 = px.histogram(df_acc, x=df_acc["date"], y=df_acc["close"], histfunc="avg", title="Histogram on Date Axes") fig17.update_traces(xbins_size="M1") fig17.update_xaxes(showgrid=True, ticklabelmode="period", dtick="M1", tickformat="%b %Y") fig17.update_layout(bargap=0.1) fig17.add_trace(go.Scatter(mode="markers", x=df_acc["date"], y=df_acc["close"], name="daily")) fig17.update_xaxes( rangeslider_visible=True, rangeselector=dict( buttons=list([ dict(count=5, label="5d", step="day", stepmode="backward"), dict(count=1, label="1m", step="month", stepmode="backward"), dict(count=6, label="6m", step="month", stepmode="backward"), dict(count=1, label="YTD", step="year", stepmode="todate"), dict(count=1, label="1y", step="year", stepmode="backward"), dict(count=5, label="5y", step="year", stepmode="backward"), dict(step="all") ]) ) ) fig17.show()

Area chart for ACC and Ambuja

fig18 = px.area(vertical_concat,x = vertical_concat['date'], y =vertical_concat['open'], color= 'company', line_group='company') fig18.show()