text_plain_output_1.png image_output_1.png
import pandas as pd

import plotly_express as px

df = pd.read_excel('../input/volve-production-data/Volve production data.xlsx')

df.isna().sum()

well_prod = df.groupby('NPD_WELL_BORE_NAME')['BORE_OIL_VOL'].sum()
well_prod

fig_o = px.pie(names = well_prod.index , values = well_prod.values , labels ={"names":"Well ", "values":"Total oil production (bbls)"},
            )
fig_o.update_traces(textposition='inside', textinfo='percent+label'
            ,hoverinfo ='percent+label',marker=dict(line=dict(color='#000000', width=2)))
fig_o.update_layout(
title_text = "Contribution of each well in oil production",legend_title_text="Wells",legend_title_font_size=15,
    title_x=.5 , title_font_size=20, paper_bgcolor="#0C2D42",font_color="#fff"
)
fig_o.show() 

well_prod_g = df.groupby('NPD_WELL_BORE_NAME')['BORE_GAS_VOL'].sum()
well_prod_g

fig_g = px.pie(names = well_prod_g.index , values = well_prod_g.values , labels ={"names":"Well ", "values":"Total oil production (bbls)"},
            )
fig_g.update_traces(textposition='inside', textinfo='percent+label'
            ,hoverinfo ='percent+label',marker=dict(line=dict(color='#000000', width=2)))
fig_g.update_layout(
title_text = "Contribution of each well in gas production",legend_title_text="Wells",legend_title_font_size=15,
    title_x=.5 , title_font_size=20, paper_bgcolor="#0C2D42",font_color="#fff"
)
fig_g.show() 

well_prod_w = df.groupby('NPD_WELL_BORE_NAME')['BORE_WAT_VOL'].sum()
well_prod_w

fig_w = px.pie(names=well_prod_w.index, values=well_prod_w.values, labels={'names': 'Well ', 'values': 'Total oil production (bbls)'})
fig_w.update_traces(textposition='inside', textinfo='percent+label', hoverinfo='percent+label', marker=dict(line=dict(color='#000000', width=2)))
fig_w.update_layout(title_text='Contribution of each well in water production', legend_title_text='Wells', legend_title_font_size=15, title_x=0.5, title_font_size=20, paper_bgcolor='#0C2D42', font_color='#fff')
fig_w.show()