0% found this document useful (0 votes)
1 views

Vertopal.com Copy of Data Syringe Pump

The document outlines a data processing workflow using Python and Pandas to analyze flow rate data from a syringe pump. It includes steps for loading data from an Excel file, cleaning the data, calculating flow rates, and grouping the data into observation windows. The final output presents the grouped data with relevant statistics for each observation window.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Vertopal.com Copy of Data Syringe Pump

The document outlines a data processing workflow using Python and Pandas to analyze flow rate data from a syringe pump. It includes steps for loading data from an Excel file, cleaning the data, calculating flow rates, and grouping the data into observation windows. The final output presents the grouped data with relevant statistics for each observation window.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Pengolahan Data Sampel

import pandas as pd
from tabulate import tabulate

from google.colab import drive


import pandas as pd

# Mount Google Drive


drive.mount('/content/drive')

# Tentukan path file di Google Drive


file_path = '/content/drive/My
Drive/SyringePump/flow_rate_syringe_pump2.xlsx' # Ganti 'folder_path'
sesuai dengan lokasi file

# Load Data dari File Excel


df = pd.read_excel(file_path)

# Menampilkan beberapa baris pertama dari data


df.head()

Drive already mounted at /content/drive; to attempt to forcibly


remount, call drive.mount("/content/drive", force_remount=True).

{"summary":"{\n \"name\": \"df\",\n \"rows\": 33,\n \"fields\": [\n


{\n \"column\": \"Setting\",\n \"properties\": {\n
\"dtype\": \"string\",\n \"num_unique_values\": 33,\n
\"samples\": [\n 30,\n 14,\n 25\
n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam\",\n \"properties\": {\n \"dtype\": \"string\",\n
\"num_unique_values\": 33,\n \"samples\": [\n 4.456,\n
2.075,\n 3.704\n ],\n \"semantic_type\": \"\",\
n \"description\": \"\"\n }\n },\n {\n
\"column\": \"50 ml/jam\",\n \"properties\": {\n
\"dtype\": \"string\",\n \"num_unique_values\": 33,\n
\"samples\": [\n 22.783,\n 10.703,\n
19.019\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam\",\n \"properties\": {\n \"dtype\": \"string\",\n
\"num_unique_values\": 33,\n \"samples\": [\n 45.682,\
n 21.288,\n 38.058\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"df"}
#Pastikan Nama Kolom Konsisten
df.columns = ['Setting Waktu (Menit)', '10 ml/jam Berat (gram)',
'50 ml/jam Berat (gram)', '100 ml/jam Berat (gram)']

df.columns = df.columns.str.strip()

# Pastikan Data Bersih


# Mengonversi data ke float, mengisi data kosong atau salah format
dengan NaN
for col in df.columns:
df[col] = pd.to_numeric(df[col], errors='coerce')

df = df.dropna().reset_index(drop=True)

#Fungsi Perhitungan Flow Rate


def calculate_flow_rate(data, weight_column, time_column="Setting
Waktu (Menit)"):
"""Menghitung flow rate berdasarkan perubahan berat dan waktu."""
weights = data[weight_column].values
times = data[time_column].values
flow_rates = [None] # Flow rate pertama tidak bisa dihitung
(butuh delta)

for i in range(1, len(weights)):


delta_weight = weights[i] - weights[i - 1]
delta_time = times[i] - times[i - 1]
flow_rate = 60 * (delta_weight) / (delta_time * 0.998) #
Rumus yang diberikan
flow_rates.append(flow_rate)

return flow_rates

# Menambahkan Kolom Flow Rate untuk Setiap Pengaturan


df["10 ml/jam Flow Rate"] = calculate_flow_rate(df, "10 ml/jam Berat
(gram)")
df["50 ml/jam Flow Rate"] = calculate_flow_rate(df, "50 ml/jam Berat
(gram)")
df["100 ml/jam Flow Rate"] = calculate_flow_rate(df, "100 ml/jam Berat
(gram)")

# Menampilkan DataFrame dengan format yang lebih rapi


pd.set_option('display.max_columns', None) # Menampilkan semua kolom
pd.set_option('display.width', None) # Menyesuaikan lebar tampilan
pd.set_option('display.max_rows', None) # Menampilkan semua baris

df

{"summary":"{\n \"name\": \"df\",\n \"rows\": 32,\n \"fields\": [\n


{\n \"column\": \"Setting Waktu (Menit)\",\n \"properties\":
{\n \"dtype\": \"number\",\n \"std\": 9.38083151964686,\
n \"min\": 0.0,\n \"max\": 31.0,\n
\"num_unique_values\": 32,\n \"samples\": [\n 29.0,\n
15.0,\n 24.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 1.395887325829449,\n \"min\":
0.0,\n \"max\": 4.608,\n \"num_unique_values\": 32,\n
\"samples\": [\n 4.302,\n 2.23,\n 3.549\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
7.110598987333582,\n \"min\": 0.0,\n \"max\": 23.562,\n
\"num_unique_values\": 32,\n \"samples\": [\n 22.015,\
n 11.489,\n 18.24\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
14.288036790039005,\n \"min\": 0.0,\n \"max\": 47.197,\n
\"num_unique_values\": 32,\n \"samples\": [\n 44.165,\
n 22.803,\n 36.535\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.47858842887464087,\n \"min\": 8.176352705410828,\n
\"max\": 9.43887775551102,\n \"num_unique_values\": 21,\n
\"samples\": [\n 8.236472945891784,\n
8.23647294589181,\n 9.318637274549113\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.7363502253002483,\n \"min\": 41.00200400801606,\n
\"max\": 49.95991983967939,\n \"num_unique_values\": 28,\n
\"samples\": [\n 44.66933867735468,\n
46.65330661322644,\n 45.99198396793591\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.6884351154022401,\n \"min\": 90.18036072144288,\n
\"max\": 92.94589178356709,\n \"num_unique_values\": 26,\n
\"samples\": [\n 90.36072144288578,\n
92.58517034068132,\n 90.84168336673346\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"df"}

Tx = 32 # Periode analisis dalam menit


P = 2 # Durasi observasi window dalam menit (diperbarui menjadi
P=11)
S = 2
def hitung_observasi_window(Tx, P,S):
"""Hitung jumlah observasi window maksimum."""
return ((Tx - P) // S) + 1

m = hitung_observasi_window(Tx, P,S)

# Kelompokkan Data Berdasarkan Observasi Window


def group_by_observation_window(data, duration):
"""Kelompokkan data berdasarkan durasi observasi window."""
bins = range(0, int(data['Setting Waktu (Menit)'].max()) +
duration, duration)
grouped = data.groupby(pd.cut(data['Setting Waktu (Menit)'],
bins=bins, include_lowest=True, right=False))
return grouped

grouped_data = group_by_observation_window(df, P) # Gunakan P sebagai


lebar bin

# Menampilkan Data Terkelompok Berdasarkan Observasi Window


print("\nData Terkelompok Berdasarkan Observasi Window:")
for name, group in grouped_data:
if not group.empty: # Skip empty groups
print(f"\nObservasi Window {name}:")
display(group) # Menampilkan grup menggunakan Pandas
else:
print(f"\nObservasi Window {name}: (No data available)")

Data Terkelompok Berdasarkan Observasi Window:

Observasi Window [0, 2):

<ipython-input-232-10e7fc22a450>:14: FutureWarning: The default of


observed=False is deprecated and will be changed to True in a future
version of pandas. Pass observed=False to retain current behavior or
observed=True to adopt the future default and silence this warning.
grouped = data.groupby(pd.cut(data['Setting Waktu (Menit)'],
bins=bins, include_lowest=True, right=False))

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 0.0,\n \"max\": 1.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 1.0,\n
0.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.09687362902255703,\n \"min\":
0.0,\n \"max\": 0.137,\n \"num_unique_values\": 2,\n
\"samples\": [\n 0.137,\n 0.0\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5515432893255071,\n \"min\": 0.0,\n \"max\": 0.78,\n
\"num_unique_values\": 2,\n \"samples\": [\n 0.78,\n
0.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 1.0684383463728733,\n \"min\":
0.0,\n \"max\": 1.511,\n \"num_unique_values\": 2,\n
\"samples\": [\n 1.511,\n 0.0\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
null,\n \"min\": 8.236472945891784,\n \"max\":
8.236472945891784,\n \"num_unique_values\": 1,\n
\"samples\": [\n 8.236472945891784\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
null,\n \"min\": 46.893787575150306,\n \"max\":
46.893787575150306,\n \"num_unique_values\": 1,\n
\"samples\": [\n 46.893787575150306\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
null,\n \"min\": 90.84168336673346,\n \"max\":
90.84168336673346,\n \"num_unique_values\": 1,\n
\"samples\": [\n 90.84168336673346\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [2, 4):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 2.0,\n \"max\": 3.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 3.0,\n
2.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.09687362902255703,\n \"min\":
0.294,\n \"max\": 0.431,\n \"num_unique_values\": 2,\n
\"samples\": [\n 0.431,\n 0.294\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5494219689819475,\n \"min\": 1.54,\n \"max\": 2.317,\n
\"num_unique_values\": 2,\n \"samples\": [\n 2.317,\n
1.54\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 1.0832875887777909,\n \"min\":
3.016,\n \"max\": 4.548,\n \"num_unique_values\": 2,\n
\"samples\": [\n 4.548,\n 3.016\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.8502285946130822,\n \"min\": 8.236472945891784,\n
\"max\": 9.43887775551102,\n \"num_unique_values\": 2,\n
\"samples\": [\n 8.236472945891784,\n
9.43887775551102\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"50
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.7226943054211193,\n \"min\":
45.69138276553107,\n \"max\": 46.71342685370742,\n
\"num_unique_values\": 2,\n \"samples\": [\n
46.71342685370742,\n 45.69138276553107\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.147808602727661,\n \"min\": 90.4809619238477,\n
\"max\": 92.10420841683367,\n \"num_unique_values\": 2,\n
\"samples\": [\n 92.10420841683367,\n
90.4809619238477\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n }\n ]\
n}","type":"dataframe","variable_name":"group"}

Observasi Window [4, 6):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 4.0,\n \"max\": 5.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 5.0,\n
4.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.09758073580374357,\n \"min\":
0.585,\n \"max\": 0.723,\n \"num_unique_values\": 2,\n
\"samples\": [\n 0.723,\n 0.585\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.535986940139403,\n \"min\": 3.074,\n \"max\": 3.832,\n
\"num_unique_values\": 2,\n \"samples\": [\n 3.832,\n
3.074\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 1.0740952006223656,\n \"min\":
6.074,\n \"max\": 7.593,\n \"num_unique_values\": 2,\n
\"samples\": [\n 7.593,\n 6.074\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.6801828756904648,\n \"min\": 8.296593186372746,\n
\"max\": 9.258517034068134,\n \"num_unique_values\": 2,\n
\"samples\": [\n 8.296593186372746,\n
9.258517034068134\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"50
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.04251142973066974,\n \"min\":
45.51102204408816,\n \"max\": 45.57114228456914,\n
\"num_unique_values\": 2,\n \"samples\": [\n
45.57114228456914,\n 45.51102204408816\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.2975800081145576,\n \"min\": 91.32264529058118,\n
\"max\": 91.74348697394788,\n \"num_unique_values\": 2,\n
\"samples\": [\n 91.32264529058118,\n
91.74348697394788\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n }\n ]\
n}","type":"dataframe","variable_name":"group"}

Observasi Window [6, 8):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 6.0,\n \"max\": 7.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 7.0,\n
6.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.10889444430272825,\n \"min\":
0.877,\n \"max\": 1.031,\n \"num_unique_values\": 2,\n
\"samples\": [\n 1.031,\n 0.877\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5119453095790599,\n \"min\": 4.663,\n \"max\": 5.387,\
n \"num_unique_values\": 2,\n \"samples\": [\n
5.387,\n 4.663\n ],\n \"semantic_type\": \"\",\
n \"description\": \"\"\n }\n },\n {\n
\"column\": \"100 ml/jam Berat (gram)\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 1.0825804819966047,\n
\"min\": 9.116,\n \"max\": 10.647,\n
\"num_unique_values\": 2,\n \"samples\": [\n 10.647,\n
9.116\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 5.0242958677880805e-15,\n
\"min\": 9.25851703406813,\n \"max\": 9.258517034068138,\n
\"num_unique_values\": 2,\n \"samples\": [\n
9.25851703406813,\n 9.258517034068138\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
4.548722981180045,\n \"min\": 43.52705410821639,\n
\"max\": 49.95991983967939,\n \"num_unique_values\": 2,\n
\"samples\": [\n 43.52705410821639,\n
49.95991983967939\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.34009143784527757,\n \"min\":
91.56312625250499,\n \"max\": 92.04408817635274,\n
\"num_unique_values\": 2,\n \"samples\": [\n
92.04408817635274,\n 91.56312625250499\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [8, 10):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 8.0,\n \"max\": 9.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 9.0,\n
8.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.10818733752154179,\n \"min\":
1.168,\n \"max\": 1.321,\n \"num_unique_values\": 2,\n
\"samples\": [\n 1.321,\n 1.168\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5409366876077093,\n \"min\": 6.156,\n \"max\": 6.921,\
n \"num_unique_values\": 2,\n \"samples\": [\n
6.921,\n 6.156\n ],\n \"semantic_type\": \"\",\
n \"description\": \"\"\n }\n },\n {\n
\"column\": \"100 ml/jam Berat (gram)\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 1.062781492123381,\n
\"min\": 12.193,\n \"max\": 13.696,\n
\"num_unique_values\": 2,\n \"samples\": [\n 13.696,\n
12.193\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.6801828756904672,\n \"min\":
8.236472945891784,\n \"max\": 9.198396793587175,\n
\"num_unique_values\": 2,\n \"samples\": [\n
9.198396793587175,\n 8.236472945891784\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.17004571892259357,\n \"min\": 45.99198396793591,\n
\"max\": 46.232464929859724,\n \"num_unique_values\": 2,\n
\"samples\": [\n 45.99198396793591,\n
46.232464929859724\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 1.8279914784180957,\n \"min\":
90.36072144288578,\n \"max\": 92.94589178356709,\n
\"num_unique_values\": 2,\n \"samples\": [\n
90.36072144288578,\n 92.94589178356709\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [10, 12):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 10.0,\n \"max\": 11.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 11.0,\n
10.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.10960155108391473,\n \"min\":
1.475,\n \"max\": 1.63,\n \"num_unique_values\": 2,\n
\"samples\": [\n 1.63,\n 1.475\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5656854249492386,\n \"min\": 7.664,\n \"max\": 8.464,\
n \"num_unique_values\": 2,\n \"samples\": [\n
8.464,\n 7.664\n ],\n \"semantic_type\": \"\",\
n \"description\": \"\"\n }\n },\n {\n
\"column\": \"100 ml/jam Berat (gram)\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 1.0825804819966034,\n
\"min\": 15.212,\n \"max\": 16.743,\n
\"num_unique_values\": 2,\n \"samples\": [\n 16.743,\n
15.212\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.0425114297306396,\n \"min\":
9.258517034068145,\n \"max\": 9.318637274549086,\n
\"num_unique_values\": 2,\n \"samples\": [\n
9.318637274549086,\n 9.258517034068145\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.4231514946473363,\n \"min\": 44.66933867735468,\n
\"max\": 48.09619238476958,\n \"num_unique_values\": 2,\n
\"samples\": [\n 48.09619238476958,\n
44.66933867735468\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.6376714459597548,\n \"min\":
91.14228456913828,\n \"max\": 92.04408817635263,\n
\"num_unique_values\": 2,\n \"samples\": [\n
92.04408817635263,\n 91.14228456913828\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [12, 14):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 12.0,\n \"max\": 13.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 13.0,\n
12.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.10960155108391488,\n \"min\":
1.766,\n \"max\": 1.921,\n \"num_unique_values\": 2,\n
\"samples\": [\n 1.921,\n 1.766\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5218448045156717,\n \"min\": 9.224,\n \"max\": 9.962,\
n \"num_unique_values\": 2,\n \"samples\": [\n
9.962,\n 9.224\n ],\n \"semantic_type\": \"\",\
n \"description\": \"\"\n }\n },\n {\n
\"column\": \"100 ml/jam Berat (gram)\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 1.0825804819966058,\n
\"min\": 18.243,\n \"max\": 19.774,\n
\"num_unique_values\": 2,\n \"samples\": [\n 19.774,\n
18.243\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.807717164882425,\n \"min\":
8.176352705410828,\n \"max\": 9.318637274549099,\n
\"num_unique_values\": 2,\n \"samples\": [\n
9.318637274549099,\n 8.176352705410828\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.9352514540744028,\n \"min\": 44.368737474949874,\n
\"max\": 45.69138276553105,\n \"num_unique_values\": 2,\n
\"samples\": [\n 44.368737474949874,\n
45.69138276553105\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 1.3178543216503804,\n \"min\":
90.18036072144288,\n \"max\": 92.04408817635284,\n
\"num_unique_values\": 2,\n \"samples\": [\n
92.04408817635284,\n 90.18036072144288\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [14, 16):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 14.0,\n \"max\": 15.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 15.0,\n
14.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.10960155108391473,\n \"min\":
2.075,\n \"max\": 2.23,\n \"num_unique_values\": 2,\n
\"samples\": [\n 2.23,\n 2.075\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5557859300126273,\n \"min\": 10.703,\n \"max\":
11.489,\n \"num_unique_values\": 2,\n \"samples\": [\n
11.489,\n 10.703\n ],\n \"semantic_type\":
\"\",\n \"description\": \"\"\n }\n },\n {\n
\"column\": \"100 ml/jam Berat (gram)\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 1.0712667734976198,\n
\"min\": 21.288,\n \"max\": 22.803,\n
\"num_unique_values\": 2,\n \"samples\": [\n 22.803,\n
21.288\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.0425114297306396,\n \"min\":
9.258517034068145,\n \"max\": 9.318637274549086,\n
\"num_unique_values\": 2,\n \"samples\": [\n
9.318637274549086,\n 9.258517034068145\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.9130143378795106,\n \"min\": 44.54909819639276,\n
\"max\": 47.25450901803615,\n \"num_unique_values\": 2,\n
\"samples\": [\n 47.25450901803615,\n
44.54909819639276\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.04251142973069989,\n \"min\":
91.02204408817632,\n \"max\": 91.08216432865734,\n
\"num_unique_values\": 2,\n \"samples\": [\n
91.08216432865734,\n 91.02204408817632\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [16, 18):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 16.0,\n \"max\": 17.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 17.0,\n
16.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.10818733752154179,\n \"min\":
2.367,\n \"max\": 2.52,\n \"num_unique_values\": 2,\n
\"samples\": [\n 2.52,\n 2.367\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.4822468247692257,\n \"min\": 12.298,\n \"max\":
12.98,\n \"num_unique_values\": 2,\n \"samples\": [\n
12.98,\n 12.298\n ],\n \"semantic_type\":
\"\",\n \"description\": \"\"\n }\n },\n {\n
\"column\": \"100 ml/jam Berat (gram)\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 1.0889444430272825,\n
\"min\": 24.337,\n \"max\": 25.877,\n
\"num_unique_values\": 2,\n \"samples\": [\n 25.877,\n
24.337\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.6801828756904672,\n \"min\":
8.236472945891784,\n \"max\": 9.198396793587175,\n
\"num_unique_values\": 2,\n \"samples\": [\n
9.198396793587175,\n 8.236472945891784\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
5.398951575793028,\n \"min\": 41.00200400801606,\n
\"max\": 48.63727454909815,\n \"num_unique_values\": 2,\n
\"samples\": [\n 41.00200400801606,\n
48.63727454909815\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.2550685783839381,\n \"min\":
92.22444889779553,\n \"max\": 92.58517034068132,\n
\"num_unique_values\": 2,\n \"samples\": [\n
92.58517034068132,\n 92.22444889779553\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [18, 20):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 18.0,\n \"max\": 19.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 19.0,\n
18.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.10889444430272825,\n \"min\":
2.658,\n \"max\": 2.812,\n \"num_unique_values\": 2,\n
\"samples\": [\n 2.812,\n 2.658\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5480077554195746,\n \"min\": 13.74,\n \"max\":
14.515,\n \"num_unique_values\": 2,\n \"samples\": [\n
14.515,\n 13.74\n ],\n \"semantic_type\":
\"\",\n \"description\": \"\"\n }\n },\n {\n
\"column\": \"100 ml/jam Berat (gram)\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 1.078337841309484,\n
\"min\": 27.393,\n \"max\": 28.918,\n
\"num_unique_values\": 2,\n \"samples\": [\n 28.918,\n
27.393\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.6801828756904672,\n \"min\":
8.29659318637274,\n \"max\": 9.25851703406813,\n
\"num_unique_values\": 2,\n \"samples\": [\n
9.25851703406813,\n 8.29659318637274\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.6376714459598352,\n \"min\": 45.69138276553105,\n
\"max\": 46.593186372745514,\n \"num_unique_values\": 2,\n
\"samples\": [\n 46.593186372745514,\n
45.69138276553105\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.3826028675757564,\n \"min\":
91.14228456913838,\n \"max\": 91.68336673346685,\n
\"num_unique_values\": 2,\n \"samples\": [\n
91.68336673346685,\n 91.14228456913838\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [20, 22):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 20.0,\n \"max\": 21.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 21.0,\n
20.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.10748023074035501,\n \"min\":
2.966,\n \"max\": 3.118,\n \"num_unique_values\": 2,\n
\"samples\": [\n 3.118,\n 2.966\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5381082604829621,\n \"min\": 15.22,\n \"max\":
15.981,\n \"num_unique_values\": 2,\n \"samples\": [\n
15.981,\n 15.22\n ],\n \"semantic_type\":
\"\",\n \"description\": \"\"\n }\n },\n {\n
\"column\": \"100 ml/jam Berat (gram)\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 1.0670241328105006,\n
\"min\": 30.442,\n \"max\": 31.951,\n
\"num_unique_values\": 2,\n \"samples\": [\n 31.951,\n
30.442\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.08502285946133697,\n \"min\":
9.138276553106193,\n \"max\": 9.258517034068158,\n
\"num_unique_values\": 2,\n \"samples\": [\n
9.138276553106193,\n 9.258517034068158\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.3806400649165966,\n \"min\": 42.384769539078164,\n
\"max\": 45.75150300601198,\n \"num_unique_values\": 2,\n
\"samples\": [\n 45.75150300601198,\n
42.384769539078164\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.6376714459598352,\n \"min\":
90.72144288577157,\n \"max\": 91.62324649298603,\n
\"num_unique_values\": 2,\n \"samples\": [\n
90.72144288577157,\n 91.62324649298603\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [22, 24):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 22.0,\n \"max\": 23.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 23.0,\n
22.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.10889444430272825,\n \"min\":
3.258,\n \"max\": 3.412,\n \"num_unique_values\": 2,\n
\"samples\": [\n 3.412,\n 3.258\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5225519112968592,\n \"min\": 16.743,\n \"max\":
17.482,\n \"num_unique_values\": 2,\n \"samples\": [\n
17.482,\n 16.743\n ],\n \"semantic_type\":
\"\",\n \"description\": \"\"\n }\n },\n {\n
\"column\": \"100 ml/jam Berat (gram)\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 1.0776307345282992,\n
\"min\": 33.497,\n \"max\": 35.021,\n
\"num_unique_values\": 2,\n \"samples\": [\n 35.021,\n
33.497\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.5951600162291492,\n \"min\":
8.416833667334677,\n \"max\": 9.25851703406813,\n
\"num_unique_values\": 2,\n \"samples\": [\n
9.25851703406813,\n 8.416833667334677\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.977762883804957,\n \"min\": 44.42885771543091,\n
\"max\": 45.81162324649291,\n \"num_unique_values\": 2,\n
\"samples\": [\n 44.42885771543091,\n
45.81162324649291\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.9352514540743224,\n \"min\":
91.62324649298603,\n \"max\": 92.94589178356709,\n
\"num_unique_values\": 2,\n \"samples\": [\n
91.62324649298603,\n 92.94589178356709\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [24, 26):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 24.0,\n \"max\": 25.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 25.0,\n
24.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.10960155108391505,\n \"min\":
3.549,\n \"max\": 3.704,\n \"num_unique_values\": 2,\n
\"samples\": [\n 3.704,\n 3.549\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5508361825443204,\n \"min\": 18.24,\n \"max\":
19.019,\n \"num_unique_values\": 2,\n \"samples\": [\n
19.019,\n 18.24\n ],\n \"semantic_type\":
\"\",\n \"description\": \"\"\n }\n },\n {\n
\"column\": \"100 ml/jam Berat (gram)\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 1.0769236277471141,\n
\"min\": 36.535,\n \"max\": 38.058,\n
\"num_unique_values\": 2,\n \"samples\": [\n 38.058,\n
36.535\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.7652057351517854,\n \"min\":
8.236472945891784,\n \"max\": 9.318637274549113,\n
\"num_unique_values\": 2,\n \"samples\": [\n
9.318637274549113,\n 8.236472945891784\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.8927400243437732,\n \"min\": 45.571142284569085,\n
\"max\": 46.833667334669336,\n \"num_unique_values\": 2,\n
\"samples\": [\n 46.833667334669336,\n
45.571142284569085\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.38260286757619855,\n \"min\":
91.0220440881761,\n \"max\": 91.5631262525052,\n
\"num_unique_values\": 2,\n \"samples\": [\n
91.5631262525052,\n 91.0220440881761\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [26, 28):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 26.0,\n \"max\": 27.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 27.0,\n
26.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.10889444430272793,\n \"min\":
3.858,\n \"max\": 4.012,\n \"num_unique_values\": 2,\n
\"samples\": [\n 4.012,\n 3.858\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5239661248592314,\n \"min\": 19.763,\n \"max\":
20.504,\n \"num_unique_values\": 2,\n \"samples\": [\n
20.504,\n 19.763\n ],\n \"semantic_type\":
\"\",\n \"description\": \"\"\n }\n },\n {\n
\"column\": \"100 ml/jam Berat (gram)\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 1.0740952006223645,\n
\"min\": 39.584,\n \"max\": 41.103,\n
\"num_unique_values\": 2,\n \"samples\": [\n 41.103,\n
39.584\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 1.888293221827313e-14,\n \"min\":
9.258517034068104,\n \"max\": 9.25851703406813,\n
\"num_unique_values\": 2,\n \"samples\": [\n
9.258517034068104,\n 9.25851703406813\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.12753428919211976,\n \"min\": 44.54909819639276,\n
\"max\": 44.72945891783587,\n \"num_unique_values\": 2,\n
\"samples\": [\n 44.54909819639276,\n
44.72945891783587\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.2975800081147887,\n \"min\":
91.32264529058106,\n \"max\": 91.7434869739481,\n
\"num_unique_values\": 2,\n \"samples\": [\n
91.32264529058106,\n 91.7434869739481\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [28, 30):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 28.0,\n \"max\": 29.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 29.0,\n
28.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.10818733752154149,\n \"min\":
4.149,\n \"max\": 4.302,\n \"num_unique_values\": 2,\n
\"samples\": [\n 4.302,\n 4.149\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.519723484172112,\n \"min\": 21.28,\n \"max\": 22.015,\
n \"num_unique_values\": 2,\n \"samples\": [\n
22.015,\n 21.28\n ],\n \"semantic_type\":
\"\",\n \"description\": \"\"\n }\n },\n {\n
\"column\": \"100 ml/jam Berat (gram)\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 1.0825804819966034,\n
\"min\": 42.634,\n \"max\": 44.165,\n
\"num_unique_values\": 2,\n \"samples\": [\n 44.165,\n
42.634\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.6801828756904296,\n \"min\":
8.23647294589181,\n \"max\": 9.198396793587149,\n
\"num_unique_values\": 2,\n \"samples\": [\n
9.198396793587149,\n 8.23647294589181\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.7429686189568365,\n \"min\": 44.18837675350698,\n
\"max\": 46.65330661322644,\n \"num_unique_values\": 2,\n
\"samples\": [\n 44.18837675350698,\n
46.65330661322644\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.0,\n \"min\":
92.04408817635263,\n \"max\": 92.04408817635263,\n
\"num_unique_values\": 1,\n \"samples\": [\n
92.04408817635263\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n }\n ]\
n}","type":"dataframe","variable_name":"group"}
Observasi Window [30, 32):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 30.0,\n \"max\": 31.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 31.0,\n
30.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.10748023074035469,\n \"min\":
4.456,\n \"max\": 4.608,\n \"num_unique_values\": 2,\n
\"samples\": [\n 4.608,\n 4.456\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5508361825443204,\n \"min\": 22.783,\n \"max\":
23.562,\n \"num_unique_values\": 2,\n \"samples\": [\n
23.562,\n 22.783\n ],\n \"semantic_type\":
\"\",\n \"description\": \"\"\n }\n },\n {\n
\"column\": \"100 ml/jam Berat (gram)\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 1.0712667734976198,\n
\"min\": 45.682,\n \"max\": 47.197,\n
\"num_unique_values\": 2,\n \"samples\": [\n 47.197,\n
45.682\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.08502285946137467,\n \"min\":
9.138276553106166,\n \"max\": 9.258517034068184,\n
\"num_unique_values\": 2,\n \"samples\": [\n
9.138276553106166,\n 9.258517034068184\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.4676257270371662,\n \"min\": 46.1723446893788,\n
\"max\": 46.833667334669336,\n \"num_unique_values\": 2,\n
\"samples\": [\n 46.833667334669336,\n
46.1723446893788\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.08502285946141988,\n \"min\":
91.08216432865734,\n \"max\": 91.20240480961942,\n
\"num_unique_values\": 2,\n \"samples\": [\n
91.08216432865734,\n 91.20240480961942\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Tx = 32 # Periode analisis dalam menit


P = 5 # Durasi observasi window dalam menit (diperbarui menjadi
P=11)
S = 2
def hitung_observasi_window(Tx, P,S):
"""Hitung jumlah observasi window maksimum."""
return ((Tx - P) // S) + 1

m = hitung_observasi_window(Tx, P,S)

# Kelompokkan Data Berdasarkan Observasi Window


def group_by_observation_window(data, duration):
"""Kelompokkan data berdasarkan durasi observasi window."""
bins = range(0, int(data['Setting Waktu (Menit)'].max()) +
duration, duration)
grouped = data.groupby(pd.cut(data['Setting Waktu (Menit)'],
bins=bins, include_lowest=True, right=False))
return grouped

grouped_data = group_by_observation_window(df, P) # Gunakan P sebagai


lebar bin

from tabulate import tabulate

# Menampilkan Data Terkelompok Berdasarkan Observasi Window


print("\nData Terkelompok Berdasarkan Observasi Window:")
for name, group in grouped_data:
if not group.empty: # Skip empty groups
print(f"\nObservasi Window {name}:")
display(group) # Menampilkan grup dengan format tabel Pandas
else:
print(f"\nObservasi Window {name}: (No data available)")

Data Terkelompok Berdasarkan Observasi Window:

Observasi Window [0, 5):

<ipython-input-233-2a4b2e4d9725>:14: FutureWarning: The default of


observed=False is deprecated and will be changed to True in a future
version of pandas. Pass observed=False to retain current behavior or
observed=True to adopt the future default and silence this warning.
grouped = data.groupby(pd.cut(data['Setting Waktu (Menit)'],
bins=bins, include_lowest=True, right=False))

{"summary":"{\n \"name\": \"group\",\n \"rows\": 5,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.5811388300841898,\n \"min\": 0.0,\n \"max\": 4.0,\n
\"num_unique_values\": 5,\n \"samples\": [\n 1.0,\n
4.0,\n 2.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.23153250311781282,\n \"min\":
0.0,\n \"max\": 0.585,\n \"num_unique_values\": 5,\n
\"samples\": [\n 0.137,\n 0.585,\n 0.294\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.2151194179997291,\n \"min\": 0.0,\n \"max\": 3.074,\n
\"num_unique_values\": 5,\n \"samples\": [\n 0.78,\n
3.074,\n 1.54\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 2.4009746354345354,\n \"min\":
0.0,\n \"max\": 6.074,\n \"num_unique_values\": 5,\n
\"samples\": [\n 1.511,\n 6.074,\n 3.016\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.6463508385919885,\n \"min\": 8.236472945891784,\n
\"max\": 9.43887775551102,\n \"num_unique_values\": 3,\n
\"samples\": [\n 8.236472945891784,\n
9.43887775551102,\n 9.258517034068134\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7019751458171213,\n \"min\": 45.51102204408816,\n
\"max\": 46.893787575150306,\n \"num_unique_values\": 4,\n
\"samples\": [\n 45.69138276553107,\n
45.51102204408816,\n 46.893787575150306\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7580873875502072,\n \"min\": 90.4809619238477,\n
\"max\": 92.10420841683367,\n \"num_unique_values\": 4,\n
\"samples\": [\n 90.4809619238477,\n
91.74348697394788,\n 90.84168336673346\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [5, 10):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 5,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.5811388300841898,\n \"min\": 5.0,\n \"max\": 9.0,\n
\"num_unique_values\": 5,\n \"samples\": [\n 6.0,\n
9.0,\n 7.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.2351616465327626,\n \"min\":
0.723,\n \"max\": 1.321,\n \"num_unique_values\": 5,\n
\"samples\": [\n 0.877,\n 1.321,\n 1.031\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.2131161115078803,\n \"min\": 3.832,\n \"max\": 6.921,\
n \"num_unique_values\": 5,\n \"samples\": [\n
4.663,\n 6.921,\n 5.387\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.4164733600848987,\n \"min\": 7.593,\n \"max\":
13.696,\n \"num_unique_values\": 5,\n \"samples\": [\n
9.116,\n 13.696,\n 10.647\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5333448124140323,\n \"min\": 8.236472945891784,\n
\"max\": 9.258517034068138,\n \"num_unique_values\": 5,\n
\"samples\": [\n 9.258517034068138,\n
9.198396793587175,\n 9.25851703406813\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.329455676664246,\n \"min\": 43.52705410821639,\n
\"max\": 49.95991983967939,\n \"num_unique_values\": 5,\n
\"samples\": [\n 49.95991983967939,\n
45.99198396793591,\n 43.52705410821639\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.9502041571204849,\n \"min\": 90.36072144288578,\n
\"max\": 92.94589178356709,\n \"num_unique_values\": 5,\n
\"samples\": [\n 91.56312625250499,\n
90.36072144288578,\n 92.04408817635274\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [10, 15):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 5,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.5811388300841898,\n \"min\": 10.0,\n \"max\": 14.0,\n
\"num_unique_values\": 5,\n \"samples\": [\n 11.0,\n
14.0,\n 12.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.23580139948694118,\n \"min\":
1.475,\n \"max\": 2.075,\n \"num_unique_values\": 5,\n
\"samples\": [\n 1.63,\n 2.075,\n 1.766\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.1980362264973456,\n \"min\": 7.664,\n \"max\":
10.703,\n \"num_unique_values\": 5,\n \"samples\": [\n
8.464,\n 10.703,\n 9.224\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.4006531402932834,\n \"min\": 15.212,\n \"max\":
21.288,\n \"num_unique_values\": 5,\n \"samples\": [\n
16.743,\n 21.288,\n 18.243\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.4983093976377233,\n \"min\": 8.176352705410828,\n
\"max\": 9.318637274549099,\n \"num_unique_values\": 4,\n
\"samples\": [\n 9.318637274549086,\n
9.318637274549099,\n 9.258517034068145\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.553035100835037,\n \"min\": 44.368737474949874,\n
\"max\": 48.09619238476958,\n \"num_unique_values\": 5,\n
\"samples\": [\n 48.09619238476958,\n
44.54909819639276,\n 45.69138276553105\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7845633796117147,\n \"min\": 90.18036072144288,\n
\"max\": 92.04408817635284,\n \"num_unique_values\": 5,\n
\"samples\": [\n 92.04408817635263,\n
91.02204408817632,\n 90.18036072144288\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [15, 20):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 5,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.5811388300841898,\n \"min\": 15.0,\n \"max\": 19.0,\n
\"num_unique_values\": 5,\n \"samples\": [\n 16.0,\n
19.0,\n 17.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.23009954367620977,\n \"min\":
2.23,\n \"max\": 2.812,\n \"num_unique_values\": 5,\n
\"samples\": [\n 2.367,\n 2.812,\n 2.52\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.185227109038601,\n \"min\": 11.489,\n \"max\":
14.515,\n \"num_unique_values\": 5,\n \"samples\": [\n
12.298,\n 14.515,\n 12.98\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.4169383111697327,\n \"min\": 22.803,\n \"max\":
28.918,\n \"num_unique_values\": 5,\n \"samples\": [\n
24.337,\n 28.918,\n 25.877\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5454068984388789,\n \"min\": 8.236472945891784,\n
\"max\": 9.318637274549086,\n \"num_unique_values\": 5,\n
\"samples\": [\n 8.236472945891784,\n
9.25851703406813,\n 9.198396793587175\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.907794223792777,\n \"min\": 41.00200400801606,\n
\"max\": 48.63727454909815,\n \"num_unique_values\": 5,\n
\"samples\": [\n 48.63727454909815,\n
46.593186372745514,\n 41.00200400801606\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.6599548617264013,\n \"min\": 91.08216432865734,\n
\"max\": 92.58517034068132,\n \"num_unique_values\": 5,\n
\"samples\": [\n 92.22444889779553,\n
91.68336673346685,\n 92.58517034068132\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [20, 25):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 5,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.5811388300841898,\n \"min\": 20.0,\n \"max\": 24.0,\n
\"num_unique_values\": 5,\n \"samples\": [\n 21.0,\n
24.0,\n 22.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.230882654177398,\n \"min\":
2.966,\n \"max\": 3.549,\n \"num_unique_values\": 5,\n
\"samples\": [\n 3.118,\n 3.549,\n 3.258\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.1923530098087556,\n \"min\": 15.22,\n \"max\": 18.24,\
n \"num_unique_values\": 5,\n \"samples\": [\n
15.981,\n 18.24,\n 16.743\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.41220111101873,\n \"min\": 30.442,\n \"max\": 36.535,\
n \"num_unique_values\": 5,\n \"samples\": [\n
31.951,\n 36.535,\n 33.497\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.49503460160895035,\n \"min\": 8.236472945891784,\n
\"max\": 9.258517034068158,\n \"num_unique_values\": 5,\n
\"samples\": [\n 9.138276553106193,\n
8.236472945891784,\n 8.416833667334677\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.4572183940128902,\n \"min\": 42.384769539078164,\n
\"max\": 45.81162324649291,\n \"num_unique_values\": 5,\n
\"samples\": [\n 45.75150300601198,\n
45.571142284569085,\n 45.81162324649291\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.8540460532463411,\n \"min\": 90.72144288577157,\n
\"max\": 92.94589178356709,\n \"num_unique_values\": 4,\n
\"samples\": [\n 90.72144288577157,\n
91.0220440881761,\n 91.62324649298603\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [25, 30):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 5,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.5811388300841898,\n \"min\": 25.0,\n \"max\": 29.0,\n
\"num_unique_values\": 5,\n \"samples\": [\n 26.0,\n
29.0,\n 27.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.23516164653276245,\n \"min\":
3.704,\n \"max\": 4.302,\n \"num_unique_values\": 5,\n
\"samples\": [\n 3.858,\n 4.302,\n 4.012\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.1873140696546982,\n \"min\": 19.019,\n \"max\":
22.015,\n \"num_unique_values\": 5,\n \"samples\": [\n
19.763,\n 22.015,\n 20.504\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.4134530656302386,\n \"min\": 38.058,\n \"max\":
44.165,\n \"num_unique_values\": 5,\n \"samples\": [\n
39.584,\n 44.165,\n 41.103\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.45904470947063114,\n \"min\": 8.23647294589181,\n
\"max\": 9.318637274549113,\n \"num_unique_values\": 5,\n
\"samples\": [\n 9.25851703406813,\n
9.198396793587149,\n 9.258517034068104\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.2517432553300631,\n \"min\": 44.18837675350698,\n
\"max\": 46.833667334669336,\n \"num_unique_values\": 5,\n
\"samples\": [\n 44.72945891783587,\n
44.18837675350698,\n 44.54909819639276\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.3123939332288252,\n \"min\": 91.32264529058106,\n
\"max\": 92.04408817635263,\n \"num_unique_values\": 4,\n
\"samples\": [\n 91.7434869739481,\n
92.04408817635263,\n 91.5631262525052\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [30, 35):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 2,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7071067811865476,\n \"min\": 30.0,\n \"max\": 31.0,\n
\"num_unique_values\": 2,\n \"samples\": [\n 31.0,\n
30.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.10748023074035469,\n \"min\":
4.456,\n \"max\": 4.608,\n \"num_unique_values\": 2,\n
\"samples\": [\n 4.608,\n 4.456\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5508361825443204,\n \"min\": 22.783,\n \"max\":
23.562,\n \"num_unique_values\": 2,\n \"samples\": [\n
23.562,\n 22.783\n ],\n \"semantic_type\":
\"\",\n \"description\": \"\"\n }\n },\n {\n
\"column\": \"100 ml/jam Berat (gram)\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 1.0712667734976198,\n
\"min\": 45.682,\n \"max\": 47.197,\n
\"num_unique_values\": 2,\n \"samples\": [\n 47.197,\n
45.682\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.08502285946137467,\n \"min\":
9.138276553106166,\n \"max\": 9.258517034068184,\n
\"num_unique_values\": 2,\n \"samples\": [\n
9.138276553106166,\n 9.258517034068184\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.4676257270371662,\n \"min\": 46.1723446893788,\n
\"max\": 46.833667334669336,\n \"num_unique_values\": 2,\n
\"samples\": [\n 46.833667334669336,\n
46.1723446893788\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.08502285946141988,\n \"min\":
91.08216432865734,\n \"max\": 91.20240480961942,\n
\"num_unique_values\": 2,\n \"samples\": [\n
91.08216432865734,\n 91.20240480961942\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Tx = 32 # Periode analisis dalam menit


P = 11 # Durasi observasi window dalam menit (diperbarui menjadi
P=11)
S = 2
def hitung_observasi_window(Tx, P,S):
"""Hitung jumlah observasi window maksimum."""
return ((Tx - P) // S) + 1

m = hitung_observasi_window(Tx, P,S)

# Kelompokkan Data Berdasarkan Observasi Window


def group_by_observation_window(data, duration):
"""Kelompokkan data berdasarkan durasi observasi window."""
bins = range(0, int(data['Setting Waktu (Menit)'].max()) +
duration, duration)
grouped = data.groupby(pd.cut(data['Setting Waktu (Menit)'],
bins=bins, include_lowest=True, right=False))
return grouped

grouped_data = group_by_observation_window(df, P) # Gunakan P sebagai


lebar bin

# Menampilkan Data Terkelompok Berdasarkan Observasi Window


print("\nData Terkelompok Berdasarkan Observasi Window:")
for name, group in grouped_data:
if not group.empty: # Lewati grup kosong
print(f"\nObservasi Window {name}:")
display(group) # Menampilkan tabel interaktif
else:
print(f"\nObservasi Window {name}: (No data available)")

Data Terkelompok Berdasarkan Observasi Window:

Observasi Window [0, 11):

<ipython-input-234-2bffa563b24a>:14: FutureWarning: The default of


observed=False is deprecated and will be changed to True in a future
version of pandas. Pass observed=False to retain current behavior or
observed=True to adopt the future default and silence this warning.
grouped = data.groupby(pd.cut(data['Setting Waktu (Menit)'],
bins=bins, include_lowest=True, right=False))

{"summary":"{\n \"name\": \"group\",\n \"rows\": 11,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
3.3166247903554,\n \"min\": 0.0,\n \"max\": 10.0,\n
\"num_unique_values\": 11,\n \"samples\": [\n 5.0,\n
0.0,\n 9.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.48923071337467244,\n \"min\":
0.0,\n \"max\": 1.475,\n \"num_unique_values\": 11,\n
\"samples\": [\n 0.723,\n 0.0,\n 1.321\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.5466581381738838,\n \"min\": 0.0,\n \"max\": 7.664,\n
\"num_unique_values\": 11,\n \"samples\": [\n 3.832,\n
0.0,\n 6.921\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 5.052467483589307,\n \"min\":
0.0,\n \"max\": 15.212,\n \"num_unique_values\": 11,\n
\"samples\": [\n 7.593,\n 0.0,\n 13.696\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5341724623351439,\n \"min\": 8.236472945891784,\n
\"max\": 9.43887775551102,\n \"num_unique_values\": 8,\n
\"samples\": [\n 9.43887775551102,\n
9.25851703406813,\n 8.236472945891784\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.6795930600171285,\n \"min\": 43.52705410821639,\n
\"max\": 49.95991983967939,\n \"num_unique_values\": 10,\n
\"samples\": [\n 45.99198396793591,\n
45.69138276553107,\n 49.95991983967939\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.7974844083747747,\n \"min\": 90.36072144288578,\n
\"max\": 92.94589178356709,\n \"num_unique_values\": 10,\n
\"samples\": [\n 90.36072144288578,\n
90.4809619238477,\n 91.56312625250499\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [11, 22):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 11,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
3.3166247903554,\n \"min\": 11.0,\n \"max\": 21.0,\n
\"num_unique_values\": 11,\n \"samples\": [\n 16.0,\n
11.0,\n 20.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.4935761892002637,\n \"min\":
1.63,\n \"max\": 3.118,\n \"num_unique_values\": 11,\n
\"samples\": [\n 2.367,\n 1.63,\n 2.966\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.496433128212403,\n \"min\": 8.464,\n \"max\": 15.981,\
n \"num_unique_values\": 11,\n \"samples\": [\n
12.298,\n 8.464,\n 15.22\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
5.051892383507933,\n \"min\": 16.743,\n \"max\":
31.951,\n \"num_unique_values\": 11,\n \"samples\": [\n
24.337,\n 16.743,\n 30.442\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.48116683556210266,\n \"min\": 8.176352705410828,\n
\"max\": 9.318637274549099,\n \"num_unique_values\": 10,\n
\"samples\": [\n 9.258517034068158,\n
8.176352705410828,\n 9.198396793587175\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.304175107830512,\n \"min\": 41.00200400801606,\n
\"max\": 48.63727454909815,\n \"num_unique_values\": 10,\n
\"samples\": [\n 42.384769539078164,\n
45.69138276553105,\n 48.63727454909815\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.722489675986955,\n \"min\": 90.18036072144288,\n
\"max\": 92.58517034068132,\n \"num_unique_values\": 11,\n
\"samples\": [\n 92.22444889779553,\n
92.04408817635263,\n 91.62324649298603\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Observasi Window [22, 33):

{"summary":"{\n \"name\": \"group\",\n \"rows\": 10,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
3.0276503540974917,\n \"min\": 22.0,\n \"max\": 31.0,\n
\"num_unique_values\": 10,\n \"samples\": [\n 30.0,\n
23.0,\n 27.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.4534744388239172,\n \"min\":
3.258,\n \"max\": 4.608,\n \"num_unique_values\": 10,\n
\"samples\": [\n 4.456,\n 3.412,\n 4.012\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.2914475992263066,\n \"min\": 16.743,\n \"max\":
23.562,\n \"num_unique_values\": 10,\n \"samples\": [\n
22.783,\n 17.482,\n 20.504\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
4.611646613617407,\n \"min\": 33.497,\n \"max\":
47.197,\n \"num_unique_values\": 10,\n \"samples\": [\n
45.682,\n 35.021,\n 41.103\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.46135729191267144,\n \"min\": 8.236472945891784,\n
\"max\": 9.318637274549113,\n \"num_unique_values\": 9,\n
\"samples\": [\n 9.258517034068184,\n
9.25851703406813,\n 8.23647294589181\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.04071514821626,\n \"min\": 44.18837675350698,\n
\"max\": 46.833667334669336,\n \"num_unique_values\": 9,\n
\"samples\": [\n 44.18837675350698,\n
44.42885771543091,\n 44.54909819639276\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5802632808289769,\n \"min\": 91.0220440881761,\n
\"max\": 92.94589178356709,\n \"num_unique_values\": 9,\n
\"samples\": [\n 91.20240480961942,\n
91.62324649298603,\n 91.32264529058106\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Tx = 32 # Periode analisis dalam menit


P = 31 # Durasi observasi window dalam menit (diperbarui menjadi
P=11)
S = 2
def hitung_observasi_window(Tx, P,S):
"""Hitung jumlah observasi window maksimum."""
return ((Tx - P) // S) + 1

m = hitung_observasi_window(Tx, P,S)

# Kelompokkan Data Berdasarkan Observasi Window


def group_by_observation_window(data, duration):
"""Kelompokkan data berdasarkan durasi observasi window."""
bins = range(0, int(data['Setting Waktu (Menit)'].max()) +
duration, duration)
grouped = data.groupby(pd.cut(data['Setting Waktu (Menit)'],
bins=bins, include_lowest=True, right=False))
return grouped

grouped_data = group_by_observation_window(df, P) # Gunakan P sebagai


lebar bin
# Menampilkan Data Terkelompok Berdasarkan Observasi Window
print("\nData Terkelompok Berdasarkan Observasi Window:")
for name, group in grouped_data:
if not group.empty: # Lewati grup kosong
print(f"\nObservasi Window {name}:")
display(group) # Menggunakan display() untuk tampilan tabel
yang lebih rapi
else:
print(f"\nObservasi Window {name}: (No data available)")

Data Terkelompok Berdasarkan Observasi Window:

Observasi Window [0, 31):

<ipython-input-235-3b9be6e3bea7>:14: FutureWarning: The default of


observed=False is deprecated and will be changed to True in a future
version of pandas. Pass observed=False to retain current behavior or
observed=True to adopt the future default and silence this warning.
grouped = data.groupby(pd.cut(data['Setting Waktu (Menit)'],
bins=bins, include_lowest=True, right=False))

{"summary":"{\n \"name\": \"group\",\n \"rows\": 31,\n \"fields\":


[\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
9.092121131323903,\n \"min\": 0.0,\n \"max\": 30.0,\n
\"num_unique_values\": 31,\n \"samples\": [\n 27.0,\n
15.0,\n 23.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 1.3524911058479643,\n \"min\":
0.0,\n \"max\": 4.456,\n \"num_unique_values\": 31,\n
\"samples\": [\n 4.012,\n 2.23,\n 3.412\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
6.892274014766365,\n \"min\": 0.0,\n \"max\": 22.783,\n
\"num_unique_values\": 31,\n \"samples\": [\n 20.504,\
n 11.489,\n 17.482\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
13.848316535085193,\n \"min\": 0.0,\n \"max\": 45.682,\n
\"num_unique_values\": 31,\n \"samples\": [\n 41.103,\
n 22.803,\n 35.021\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.48527880941578244,\n \"min\": 8.176352705410828,\n
\"max\": 9.43887775551102,\n \"num_unique_values\": 20,\n
\"samples\": [\n 8.236472945891784,\n
8.23647294589181,\n 9.318637274549113\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.75291084369759,\n \"min\": 41.00200400801606,\n
\"max\": 49.95991983967939,\n \"num_unique_values\": 28,\n
\"samples\": [\n 44.66933867735468,\n
46.65330661322644,\n 45.99198396793591\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.6950341188613156,\n \"min\": 90.18036072144288,\n
\"max\": 92.94589178356709,\n \"num_unique_values\": 26,\n
\"samples\": [\n 90.36072144288578,\n
92.58517034068132,\n 90.84168336673346\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"group"}

Menghitung Error
# Menghitung Kesalahan Aliran Persentase
r_10ml = 10.0
r_50ml = 50.0
r_100ml = 100.0

df['10 ml/jam Error (%)'] = df['10 ml/jam Flow Rate'].apply(


lambda Q: 100 * (Q - r_10ml) / r_10ml if Q is not None else None)
df['50 ml/jam Error (%)'] = df['50 ml/jam Flow Rate'].apply(
lambda Q: 100 * (Q - r_50ml) / r_50ml if Q is not None else None)
df['100 ml/jam Error (%)'] = df['100 ml/jam Flow Rate'].apply(
lambda Q: 100 * (Q - r_100ml) / r_100ml if Q is not None else
None)

#Menyimpan hasil Ep min dan Ep max untuk setiap P


ep_results = {}

# Define errors_columns here with the relevant column names


errors_columns = ['10 ml/jam Error (%)', '50 ml/jam Error (%)', '100
ml/jam Error (%)']
P_values = [2, 5, 11, 31] # Define P_values

for P in P_values:
grouped_data = group_by_observation_window(df, P)

ep_min_values = {col: [] for col in errors_columns}


ep_max_values = {col: [] for col in errors_columns}

for name, group in grouped_data:


if not group.empty:
for col in errors_columns:
ep_min_values[col].append(group[col].min())
ep_max_values[col].append(group[col].max())
else:
for col in errors_columns:
ep_min_values[col].append(None)
ep_max_values[col].append(None)

ep_results[P] = {
'Ep Min': ep_min_values,
'Ep Max': ep_max_values,
}

# Menampilkan Hasil Ep Min dan Ep Max untuk Setiap Observasi Window


print("\nEp Min dan Ep Max untuk Setiap Observasi Window:")
for P in P_values:
print(f"\nObservasi Window: {P} Menit")
for col in errors_columns:
print(f"{col}:")
# Menggabungkan data 'Ep Min' dan 'Ep Max' ke dalam DataFrame
ep_data = pd.DataFrame({
'Ep Min': ep_results[P]['Ep Min'][col],
'Ep Max': ep_results[P]['Ep Max'][col]
})
display(ep_data) # Menampilkan data dengan display()

<ipython-input-235-3b9be6e3bea7>:14: FutureWarning: The default of


observed=False is deprecated and will be changed to True in a future
version of pandas. Pass observed=False to retain current behavior or
observed=True to adopt the future default and silence this warning.
grouped = data.groupby(pd.cut(data['Setting Waktu (Menit)'],
bins=bins, include_lowest=True, right=False))

Ep Min dan Ep Max untuk Setiap Observasi Window:

Observasi Window: 2 Menit


10 ml/jam Error (%):

{"summary":"{\n \"name\": \"ep_data\",\n \"rows\": 16,\n


\"fields\": [\n {\n \"column\": \"Ep Min\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
4.82899404194018,\n \"min\": -18.23647294589172,\n
\"max\": -7.414829659318549,\n \"num_unique_values\": 11,\n
\"samples\": [\n -17.03406813627261,\n -
17.635270541082164,\n -17.635270541081898\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"Ep Max\",\n \"properties\":
{\n \"dtype\": \"number\",\n \"std\":
2.6636161556603275,\n \"min\": -17.635270541082164,\n
\"max\": -5.611222444889794,\n \"num_unique_values\": 12,\n
\"samples\": [\n -8.016032064128513,\n -
6.81362725450887,\n -17.635270541082164\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"ep_data"}

50 ml/jam Error (%):

{"summary":"{\n \"name\": \"ep_data\",\n \"rows\": 16,\n


\"fields\": [\n {\n \"column\": \"Ep Min\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.9635477608538947,\n \"min\": -17.995991983967883,\n
\"max\": -6.2124248496993895,\n \"num_unique_values\": 15,\n
\"samples\": [\n -8.617234468937895,\n -
11.142284569138182,\n -6.2124248496993895\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"Ep Max\",\n \"properties\":
{\n \"dtype\": \"number\",\n \"std\":
2.5683377991936274,\n \"min\": -10.541082164328259,\n
\"max\": -0.08016032064122669,\n \"num_unique_values\": 15,\n
\"samples\": [\n -6.8136272545089716,\n -
8.376753507014186,\n -6.2124248496993895\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"ep_data"}

100 ml/jam Error (%):

{"summary":"{\n \"name\": \"ep_data\",\n \"rows\": 16,\n


\"fields\": [\n {\n \"column\": \"Ep Min\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.5615023404884139,\n \"min\": -9.81963927855712,\n
\"max\": -7.775551102204474,\n \"num_unique_values\": 16,\n
\"samples\": [\n -9.158316633266537,\n -
9.519038076152299,\n -8.857715430861717\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"Ep Max\",\n \"properties\":
{\n \"dtype\": \"number\",\n \"std\": 0.59676468380674,\
n \"min\": -9.158316633266537,\n \"max\": -
7.054108216432907,\n \"num_unique_values\": 14,\n
\"samples\": [\n -8.316633266533145,\n -
8.4368737474948,\n -9.158316633266537\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"ep_data"}
Observasi Window: 5 Menit
10 ml/jam Error (%):

{"summary":"{\n \"name\": \"ep_data\",\n \"rows\": 7,\n \"fields\":


[\n {\n \"column\": \"Ep Min\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 3.4536448776779793,\n
\"min\": -18.23647294589172,\n \"max\": -8.617234468938335,\n
\"num_unique_values\": 4,\n \"samples\": [\n -
18.23647294589172,\n -8.617234468938335,\n -
17.635270541082164\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"Ep
Max\",\n \"properties\": {\n \"dtype\": \"number\",\n
\"std\": 0.6427124054005212,\n \"min\": -7.41482965931862,\n
\"max\": -5.611222444889794,\n \"num_unique_values\": 7,\n
\"samples\": [\n -5.611222444889794,\n -
7.41482965931862,\n -6.81362725450887\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"ep_data"}

50 ml/jam Error (%):

{"summary":"{\n \"name\": \"ep_data\",\n \"rows\": 7,\n \"fields\":


[\n {\n \"column\": \"Ep Min\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 3.5489133417629177,\n
\"min\": -17.995991983967883,\n \"max\": -7.655310621242406,\n
\"num_unique_values\": 7,\n \"samples\": [\n -
8.977955911823685,\n -12.94589178356722,\n -
11.623246492986041\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"Ep
Max\",\n \"properties\": {\n \"dtype\": \"number\",\n
\"std\": 2.800043553293463,\n \"min\": -8.376753507014186,\n
\"max\": -0.08016032064122669,\n \"num_unique_values\": 6,\n
\"samples\": [\n -6.2124248496993895,\n -
0.08016032064122669,\n -6.332665330661327\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"ep_data"}

100 ml/jam Error (%):

{"summary":"{\n \"name\": \"ep_data\",\n \"rows\": 7,\n \"fields\":


[\n {\n \"column\": \"Ep Min\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 0.42773786166653227,\n
\"min\": -9.81963927855712,\n \"max\": -8.677354709418935,\n
\"num_unique_values\": 6,\n \"samples\": [\n -
9.519038076152299,\n -9.639278557114224,\n -
8.677354709418935\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"Ep
Max\",\n \"properties\": {\n \"dtype\": \"number\",\n
\"std\": 0.6167472171546471,\n \"min\": -8.797595190380576,\n
\"max\": -7.054108216432907,\n \"num_unique_values\": 6,\n
\"samples\": [\n -7.895791583166329,\n -
7.054108216432907,\n -8.797595190380576\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"ep_data"}

Observasi Window: 11 Menit


10 ml/jam Error (%):

{"summary":"{\n \"name\": \"ep_data\",\n \"rows\": 3,\n \"fields\":


[\n {\n \"column\": \"Ep Min\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 0.3471043702542472,\n
\"min\": -18.23647294589172,\n \"max\": -17.635270541082164,\n
\"num_unique_values\": 2,\n \"samples\": [\n -
18.23647294589172,\n -17.635270541082164\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"Ep Max\",\n \"properties\":
{\n \"dtype\": \"number\",\n \"std\":
0.6942087405085154,\n \"min\": -6.813627254509012,\n
\"max\": -5.611222444889794,\n \"num_unique_values\": 3,\n
\"samples\": [\n -5.611222444889794,\n -
6.813627254509012\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n }\n ]\
n}","type":"dataframe","variable_name":"ep_data"}

50 ml/jam Error (%):

{"summary":"{\n \"name\": \"ep_data\",\n \"rows\": 3,\n \"fields\":


[\n {\n \"column\": \"Ep Min\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 3.363152977282201,\n
\"min\": -17.995991983967883,\n \"max\": -11.623246492986041,\n
\"num_unique_values\": 3,\n \"samples\": [\n -
12.94589178356722,\n -17.995991983967883,\n -
11.623246492986041\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"Ep
Max\",\n \"properties\": {\n \"dtype\": \"number\",\n
\"std\": 3.1385606333390053,\n \"min\": -6.332665330661327,\n
\"max\": -0.08016032064122669,\n \"num_unique_values\": 3,\n
\"samples\": [\n -0.08016032064122669,\n -
2.725450901803697,\n -6.332665330661327\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"ep_data"}

100 ml/jam Error (%):

{"summary":"{\n \"name\": \"ep_data\",\n \"rows\": 3,\n \"fields\":


[\n {\n \"column\": \"Ep Min\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": 0.4431531941380555,\n
\"min\": -9.81963927855712,\n \"max\": -8.977955911823898,\n
\"num_unique_values\": 3,\n \"samples\": [\n -
9.639278557114224,\n -9.81963927855712,\n -
8.977955911823898\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"Ep
Max\",\n \"properties\": {\n \"dtype\": \"number\",\n
\"std\": 0.20826262215257346,\n \"min\": -7.414829659318684,\n
\"max\": -7.054108216432907,\n \"num_unique_values\": 2,\n
\"samples\": [\n -7.414829659318684,\n -
7.054108216432907\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n }\n ]\
n}","type":"dataframe","variable_name":"ep_data"}

Observasi Window: 31 Menit


10 ml/jam Error (%):

{"summary":"{\n \"name\": \"ep_data\",\n \"rows\": 1,\n \"fields\":


[\n {\n \"column\": \"Ep Min\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": null,\n \"min\": -
18.23647294589172,\n \"max\": -18.23647294589172,\n
\"num_unique_values\": 1,\n \"samples\": [\n -
18.23647294589172\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"Ep
Max\",\n \"properties\": {\n \"dtype\": \"number\",\n
\"std\": null,\n \"min\": -5.611222444889794,\n \"max\":
-5.611222444889794,\n \"num_unique_values\": 1,\n
\"samples\": [\n -5.611222444889794\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"ep_data"}

50 ml/jam Error (%):

{"summary":"{\n \"name\": \"ep_data\",\n \"rows\": 1,\n \"fields\":


[\n {\n \"column\": \"Ep Min\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": null,\n \"min\": -
17.995991983967883,\n \"max\": -17.995991983967883,\n
\"num_unique_values\": 1,\n \"samples\": [\n -
17.995991983967883\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"Ep
Max\",\n \"properties\": {\n \"dtype\": \"number\",\n
\"std\": null,\n \"min\": -0.08016032064122669,\n
\"max\": -0.08016032064122669,\n \"num_unique_values\": 1,\n
\"samples\": [\n -0.08016032064122669\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"ep_data"}

100 ml/jam Error (%):

{"summary":"{\n \"name\": \"ep_data\",\n \"rows\": 1,\n \"fields\":


[\n {\n \"column\": \"Ep Min\",\n \"properties\": {\n
\"dtype\": \"number\",\n \"std\": null,\n \"min\": -
9.81963927855712,\n \"max\": -9.81963927855712,\n
\"num_unique_values\": 1,\n \"samples\": [\n -
9.81963927855712\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"Ep
Max\",\n \"properties\": {\n \"dtype\": \"number\",\n
\"std\": null,\n \"min\": -7.054108216432907,\n \"max\":
-7.054108216432907,\n \"num_unique_values\": 1,\n
\"samples\": [\n -7.054108216432907\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"ep_data"}

import matplotlib.pyplot as plt


import numpy as np

# Data hasil perhitungan Ep Min dan Ep Max


P_values = [2, 5, 11, 31] # Durasi observasi window dalam menit

# Data Ep Min dan Ep Max untuk masing-masing laju aliran


ep_min_10 = [-17.6353, -17.6353, -17.0341, -7.41483, -17.6353, -
7.41483, -18.2365, -7.41483, -17.6353, -17.0341, -8.61723, -15.8317, -
17.6353, -7.41483, -17.6353, -8.61723]
ep_max_10 = [-5.61122, -7.41483, -7.41483, -7.41483, -8.01603, -
6.81363, -6.81363, -6.81363, -8.01603, -7.41483, -7.41483, -7.41483, -
6.81363, -7.41483, -8.01603, -7.41483]

ep_min_50 = [-6.21242, -8.61723, -8.97796, -12.9459, -8.01603, -


10.6613, -11.2625, -10.9018, -17.996, -8.61723, -15.2305, -11.1423, -
8.85772, -10.9018, -11.6232, -7.65531]
ep_max_50 = [-6.21242, -6.57315, -8.85772, -0.0801603, -7.53507, -
3.80762, -8.61723, -5.49098, -2.72545, -6.81363, -8.49699, -8.37675, -
6.33267, -10.5411, -6.69339, -6.33267]

ep_min_100 = [-9.15832, -9.51904, -8.67735, -8.43687, -9.63928, -


8.85772, -9.81964, -8.97796, -7.77555, -8.85772, -9.27856, -8.37675, -
8.97796, -8.67735, -7.95591, -8.91784]
ep_max_100 = [-9.15832, -7.89579, -8.25651, -7.95591, -7.05411, -
7.95591, -7.95591, -8.91784, -7.41483, -8.31663, -8.37675, -7.05411, -
8.43687, -8.25651, -7.95591, -8.7976]

# Rata-rata kesalahan keseluruhan (A) untuk masing-masing laju aliran


A_10 = np.mean(ep_min_10 + ep_max_10)
A_50 = np.mean(ep_min_50 + ep_max_50)
A_100 = np.mean(ep_min_100 + ep_max_100)

# Laju yang ditetapkan (r)


r_values = [10, 50, 100]

# Membuat kurva terompet untuk masing-masing laju aliran


for i, (ep_min, ep_max, A_value, r_value) in enumerate(zip(
[ep_min_10, ep_min_50, ep_min_100],
[ep_max_10, ep_max_50, ep_max_100],
[A_10, A_50, A_100],
r_values
)):
plt.figure(figsize=(8, 6))

# Plot garis Ep Min dan Ep Max


plt.plot(P_values, ep_min[:len(P_values)], marker='o',
linestyle='--', color='blue', label=f'Ep Min (r={r_value} mL/jam)')
plt.plot(P_values, ep_max[:len(P_values)], marker='o',
linestyle='--', color='red', label=f'Ep Max (r={r_value} mL/jam)')

# Plot garis rata-rata kesalahan keseluruhan (A)


plt.axhline(y=A_value, color='green', linestyle='-',
label=f'Kesalahan Keseluruhan A (r={r_value} mL/jam)')

# Plot garis horizontal laju yang ditetapkan (r)


plt.axhline(y=0, color='grey', linestyle='--', label=f'Laju yang
Ditetapkan r={r_value} mL/jam')

# Set skala Y
plt.ylim(-15, 15) # Set Y-axis limits from -15% to +15%

# Set ticks pada sumbu Y


plt.yticks(np.arange(-15, 16, 5)) # Set Y-axis ticks from -15% to
+15% with a step of 5%

# Tambahkan detail grafik


plt.title(f'Kurva Terompet Kesalahan Aliran Persentase
(r={r_value} mL/jam)')
plt.xlabel('Observasi Window (Menit)')
plt.ylabel('Kesalahan Aliran Persentase (%)')
plt.xticks(np.arange(0, 31)) # Set X-axis ticks from 0 to 30
minutes

plt.legend()
plt.grid()
plt.show()
#Analisis Statistika

import pandas as pd
import numpy as np
from tabulate import tabulate
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import stats

from IPython.display import display


import pandas as pd

def deskripsi_statistik(df, column):


"""Menghitung deskripsi statistik untuk kolom tertentu."""
return {
'Rata-rata': df[column].mean(),
'Median': df[column].median(),
'Standar Deviasi': df[column].std(),
'Rentang': df[column].max() - df[column].min(),
'Min': df[column].min(),
'Max': df[column].max()
}

# Menghitung deskripsi statistik untuk setiap flow rate dan error


statistik_flow_rate_10ml = deskripsi_statistik(df, '10 ml/jam Flow
Rate')
statistik_flow_rate_50ml = deskripsi_statistik(df, '50 ml/jam Flow
Rate')
statistik_flow_rate_100ml = deskripsi_statistik(df, '100 ml/jam Flow
Rate')

statistik_error_10ml = deskripsi_statistik(df, '10 ml/jam Error (%)')


statistik_error_50ml = deskripsi_statistik(df, '50 ml/jam Error (%)')
statistik_error_100ml = deskripsi_statistik(df, '100 ml/jam Error
(%)')

# Mengonversi statistik ke dalam DataFrame untuk ditampilkan dengan


rapi
df_statistik_flow_rate = pd.DataFrame({
'10 ml/jam': statistik_flow_rate_10ml,
'50 ml/jam': statistik_flow_rate_50ml,
'100 ml/jam': statistik_flow_rate_100ml
})

df_statistik_error = pd.DataFrame({
'10 ml/jam': statistik_error_10ml,
'50 ml/jam': statistik_error_50ml,
'100 ml/jam': statistik_error_100ml
})

# Menampilkan hasil deskripsi statistik menggunakan display()


print("\nDeskripsi Statistik Flow Rate:")
display(df_statistik_flow_rate)

print("\nDeskripsi Statistik Kesalahan Aliran Persentase:")


display(df_statistik_error)

Deskripsi Statistik Flow Rate:

{"summary":"{\n \"name\": \"df_statistik_flow_rate\",\n \"rows\":


6,\n \"fields\": [\n {\n \"column\": \"10 ml/jam\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
4.2031496529117875,\n \"min\": 0.47858842887464087,\n
\"max\": 9.43887775551102,\n \"num_unique_values\": 6,\n
\"samples\": [\n 8.936582843105564,\n
9.258517034068104,\n 9.43887775551102\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
21.09622637407689,\n \"min\": 1.7363502253002483,\n
\"max\": 49.95991983967939,\n \"num_unique_values\": 6,\n
\"samples\": [\n 45.69526149072339,\n
45.69138276553107,\n 49.95991983967939\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
46.40007285936895,\n \"min\": 0.6884351154022401,\n
\"max\": 92.94589178356709,\n \"num_unique_values\": 6,\n
\"samples\": [\n 91.53209645096646,\n
91.5631262525052,\n 92.94589178356709\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\
n}","type":"dataframe","variable_name":"df_statistik_flow_rate"}

Deskripsi Statistik Kesalahan Aliran Persentase:

{"summary":"{\n \"name\": \"df_statistik_error\",\n \"rows\": 6,\n


\"fields\": [\n {\n \"column\": \"10 ml/jam\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
11.086008439671497,\n \"min\": -18.23647294589172,\n
\"max\": 12.625250501001926,\n \"num_unique_values\": 6,\n
\"samples\": [\n -10.63417156894435,\n -
7.414829659318957,\n -5.611222444889794\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
12.433909649472653,\n \"min\": -17.995991983967883,\n
\"max\": 17.915831663326657,\n \"num_unique_values\": 6,\n
\"samples\": [\n -8.609477018553228,\n -
8.617234468937866,\n -0.08016032064122669\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
5.365276318671464,\n \"min\": -9.81963927855712,\n
\"max\": 2.7655310621242117,\n \"num_unique_values\": 6,\n
\"samples\": [\n -8.467903549033547,\n -
8.4368737474948,\n -7.054108216432907\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\
n}","type":"dataframe","variable_name":"df_statistik_error"}

# Visualisasi Data
plt.figure(figsize=(12, 6))

plt.subplot(1, 2, 1)
sns.boxplot(data=df[['10 ml/jam Flow Rate', '50 ml/jam Flow Rate',
'100 ml/jam Flow Rate']])
plt.title('Boxplot Flow Rate')
plt.ylabel('Flow Rate (mL/JAM)')

plt.subplot(1, 2, 2)
sns.boxplot(data=df[['10 ml/jam Error (%)', '50 ml/jam Error (%)',
'100 ml/jam Error (%)']])
plt.title('Boxplot Kesalahan Aliran Persentase')
plt.ylabel('Kesalahan Aliran Persentase (%)')

plt.tight_layout()
plt.show()

from scipy import stats


from IPython.display import display
import pandas as pd
#Uji Normalitas dengan Shapiro-Wilk
def uji_normalitas(data):
"""Melakukan uji normalitas dengan Shapiro-Wilk."""
stat, p_value = stats.shapiro(data)
return stat, p_value

normalitas_results = {
"10 ml/jam Flow Rate": uji_normalitas(df['10 ml/jam Flow
Rate'].dropna()),
"50 ml/jam Flow Rate": uji_normalitas(df['50 ml/jam Flow
Rate'].dropna()),
"100 ml/jam Flow Rate": uji_normalitas(df['100 ml/jam Flow
Rate'].dropna()),
"10 ml/jam Error (%)": uji_normalitas(df['10 ml/jam Error
(%)'].dropna()),
"50 ml/jam Error (%)": uji_normalitas(df['50 ml/jam Error
(%)'].dropna()),
"100 ml/jam Error (%)": uji_normalitas(df['100 ml/jam Error
(%)'].dropna())
}

# Konversi hasil ke dalam DataFrame


df_normalitas = pd.DataFrame(normalitas_results).T
df_normalitas.index.name = 'Variabel'

# Menampilkan hasil uji normalitas menggunakan display()


print("\nHasil Uji Normalitas Shapiro-Wilk:")
display(df_normalitas)

Hasil Uji Normalitas Shapiro-Wilk:

{"summary":"{\n \"name\": \"df_normalitas\",\n \"rows\": 6,\n


\"fields\": [\n {\n \"column\": \"Variabel\",\n
\"properties\": {\n \"dtype\": \"string\",\n
\"num_unique_values\": 6,\n \"samples\": [\n \"10
ml/jam Flow Rate\",\n \"50 ml/jam Flow Rate\",\n
\"100 ml/jam Error (%)\"\n ],\n \"semantic_type\":
\"\",\n \"description\": \"\"\n }\n },\n {\n
\"column\": 0,\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.14008012792162625,\n \"min\":
0.6992231592141449,\n \"max\": 0.9767957766030197,\n
\"num_unique_values\": 4,\n \"samples\": [\n
0.9637044954611428,\n 0.9637044954611423,\n
0.6992231592141449\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": 1,\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.32157649262897936,\n \"min\": 1.1319424961510655e-06,\n
\"max\": 0.7190465227478587,\n \"num_unique_values\": 4,\n
\"samples\": [\n 0.3643401292987125,\n
0.36434012929870385,\n 1.1319424961510655e-06\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"df_normalitas"}

# Menghitung matriks korelasi antara Flow Rate dan Kesalahan Aliran


Persentase
correlation_matrix = df[['10 ml/jam Flow Rate', '10 ml/jam Error (%)',
'50 ml/jam Flow Rate', '50 ml/jam Error (%)',
'100 ml/jam Flow Rate', '100 ml/jam Error
(%)']].corr()

# Menampilkan matriks korelasi menggunakan display()


print("\nMatriks Korelasi:")
display(correlation_matrix)
Matriks Korelasi:

{"summary":"{\n \"name\": \"correlation_matrix\",\n \"rows\": 6,\n


\"fields\": [\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.6148952687415971,\n \"min\": -0.24897994352168182,\n
\"max\": 1.0,\n \"num_unique_values\": 5,\n \"samples\":
[\n -0.24897994352168182,\n -0.12238307646649435,\n
-0.24897994352168118\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Error (%)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.6148952687415973,\n \"min\": -
0.24897994352168196,\n \"max\": 1.0,\n
\"num_unique_values\": 5,\n \"samples\": [\n -
0.24897994352168196,\n -0.12238307646649452,\n -
0.24897994352168146\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"50
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.6117724087778224,\n \"min\": -
0.24897994352168196,\n \"max\": 1.0000000000000002,\n
\"num_unique_values\": 6,\n \"samples\": [\n -
0.24897994352168182,\n -0.24897994352168196,\n -
0.10774184815891093\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"50
ml/jam Error (%)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.6117724087778221,\n \"min\": -
0.24897994352168146,\n \"max\": 1.0000000000000002,\n
\"num_unique_values\": 6,\n \"samples\": [\n -
0.24897994352168118,\n -0.24897994352168146,\n -
0.10774184815891082\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Flow Rate\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.5758530064831088,\n \"min\": -
0.12238307646649807,\n \"max\": 1.0,\n
\"num_unique_values\": 6,\n \"samples\": [\n -
0.12238307646649792,\n -0.12238307646649807,\n
0.9999999999999997\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"100
ml/jam Error (%)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 0.575853006483109,\n \"min\": -
0.12238307646649452,\n \"max\": 1.0,\n
\"num_unique_values\": 6,\n \"samples\": [\n -
0.12238307646649435,\n -0.12238307646649452,\n 1.0\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n }\n ]\
n}","type":"dataframe","variable_name":"correlation_matrix"}

# Visualisasi Korelasi dengan Heatmap


plt.figure(figsize=(8, 6))
sns.heatmap(correlation_matrix, annot=True, fmt=".2f",
cmap='coolwarm', square=True)
plt.title('Matriks Korelasi')
plt.show()

# Kesimpulan Deskriptif dari Hasil Perhitungan

def kesimpulan_deskriptif():
print("\nKesimpulan Deskriptif:")

# Calculate the average percentage flow error for each setting.


# Note: B_10ml_overall, B_50ml_overall, B_100ml_overall were not
calculated
# before, so we add this calculation here
B_10ml_overall = df['10 ml/jam Error (%)'].mean()
B_50ml_overall = df['50 ml/jam Error (%)'].mean()
B_100ml_overall = df['100 ml/jam Error (%)'].mean()

# Print average percentage flow error.


print(f"Rata-rata kesalahan aliran persentase untuk pengaturan:")
print(f"- 10 mL/JAM: {B_10ml_overall:.2f}%")
print(f"- 50 mL/JAM: {B_50ml_overall:.2f}%")
print(f"- 100 mL/JAM: {B_100ml_overall:.2f}%\n")

# Print average flow rate.


print("Rata-rata flow rate:")
print(f"- Rata-rata flow rate untuk pengaturan:")
print(f"- 10 mL/JAM: {statistik_flow_rate_10ml['Rata-rata']:.2f}
mL/JAM")
print(f"- 50 mL/JAM: {statistik_flow_rate_50ml['Rata-rata']:.2f}
mL/JAM")
print(f"- 100 mL/JAM: {statistik_flow_rate_100ml['Rata-rata']:.2f}
mL/JAM\n")

# Print normality analysis.


for key in normalitas_results.keys():
stat, p_value = normalitas_results[key]
if p_value < 0.05:
print(f"{key} tidak terdistribusi normal (p-
value={p_value:.3f}).")
else:
print(f"{key} terdistribusi normal (p-
value={p_value:.3f}).")

kesimpulan_deskriptif()

Kesimpulan Deskriptif:
Rata-rata kesalahan aliran persentase untuk pengaturan:
- 10 mL/JAM: -10.63%
- 50 mL/JAM: -8.61%
- 100 mL/JAM: -8.47%

Rata-rata flow rate:


- Rata-rata flow rate untuk pengaturan:
- 10 mL/JAM: 8.94 mL/JAM
- 50 mL/JAM: 45.70 mL/JAM
- 100 mL/JAM: 91.53 mL/JAM

10 ml/jam Flow Rate tidak terdistribusi normal (p-value=0.000).


50 ml/jam Flow Rate terdistribusi normal (p-value=0.364).
100 ml/jam Flow Rate terdistribusi normal (p-value=0.719).
10 ml/jam Error (%) tidak terdistribusi normal (p-value=0.000).
50 ml/jam Error (%) terdistribusi normal (p-value=0.364).
100 ml/jam Error (%) terdistribusi normal (p-value=0.719).
Sistem bekerja optimal pada flow rate tinggi (100 mL/jam) dan cukup baik pada flow rate sedang
(50 mL/jam), tetapi kurang akurat dan tidak dapat diandalkan pada flow rate rendah (10 mL/jam).

import matplotlib.pyplot as plt


import seaborn as sns
import scipy.stats as stats

# Visualisasi histogram dan Q-Q plot untuk setiap dataset


for column in [
'10 ml/jam Flow Rate',
'50 ml/jam Flow Rate',
'100 ml/jam Flow Rate',
'10 ml/jam Error (%)',
'50 ml/jam Error (%)',
'100 ml/jam Error (%)'
]:
data = df[column].dropna()

# Membuat histogram
plt.figure(figsize=(12, 6))
plt.subplot(1, 2, 1)
sns.histplot(data, kde=True, bins=20, color='skyblue')
plt.title(f'Histogram: {column}')
plt.xlabel('Value')
plt.ylabel('Frequency')

# Membuat Q-Q plot


plt.subplot(1, 2, 2)
stats.probplot(data, dist="norm", plot=plt)
plt.title(f'Q-Q Plot: {column}')

plt.tight_layout()
plt.show()
import numpy as np
import pandas as pd
from statsmodels.tsa.arima.model import ARIMA
from tabulate import tabulate
from IPython.display import display

# Fungsi untuk Forecasting Berat Menggunakan ARIMA


def forecast_weight(data_for_forecasting, steps=30):
model = ARIMA(data_for_forecasting, order=(5, 1, 0)) # Model
ARIMA untuk data deret waktu
model_fit = model.fit()
forecast = model_fit.forecast(steps=steps)
return forecast

# Ambil data untuk 10 ml/jam, 50 ml/jam, dan 100 ml/jam


weight_columns = ["10 ml/jam Berat (gram)", "50 ml/jam Berat (gram)",
"100 ml/jam Berat (gram)"]

# Prediksi berat untuk menit 32-61


forecast_steps = 30 # Jumlah langkah prediksi
forecast_time = np.arange(df['Setting Waktu (Menit)'].iloc[-1] + 1,
df['Setting Waktu (Menit)'].iloc[-1] + 1 + forecast_steps)

predicted_weights = {}

# Prediksi berat untuk setiap kolom


for col in weight_columns:
weight_data = df[col]

# Memprediksi Berat Menggunakan ARIMA


forecasted_weight = forecast_weight(weight_data,
steps=forecast_steps)
predicted_weights[col] = forecasted_weight

# Gabungkan Data Asli dan Prediksi


full_time = np.concatenate([df['Setting Waktu (Menit)'],
forecast_time])

# Menambahkan data untuk berat asli dan prediksi


full_data = {
'Setting Waktu (Menit)': full_time,
'10 ml/jam Berat (gram)': np.concatenate([df['10 ml/jam Berat
(gram)'], predicted_weights["10 ml/jam Berat (gram)"]]),
'50 ml/jam Berat (gram)': np.concatenate([df['50 ml/jam Berat
(gram)'], predicted_weights["50 ml/jam Berat (gram)"]]),
'100 ml/jam Berat (gram)': np.concatenate([df['100 ml/jam Berat
(gram)'], predicted_weights["100 ml/jam Berat (gram)"]]),
}

# Pastikan semua array dalam full_data memiliki panjang yang sama


lengths = [len(v) for v in full_data.values()]
if len(set(lengths)) > 1:
raise ValueError(f"Panjang array tidak konsisten, panjang array
yang ada: {lengths}")

# Membuat DataFrame dari data lengkap (hanya berat)


forecast_df = pd.DataFrame(full_data)

# Menampilkan Tabel Lengkap (hanya berat) menggunakan display


display(f"\nTabel Lengkap dengan Berat (Data Asli & Prediksi):")
display(forecast_df)
/usr/local/lib/python3.11/dist-packages/statsmodels/tsa/statespace/
sarimax.py:966: UserWarning: Non-stationary starting autoregressive
parameters found. Using zeros as starting parameters.
warn('Non-stationary starting autoregressive parameters'
/usr/local/lib/python3.11/dist-packages/statsmodels/base/model.py:607:
ConvergenceWarning: Maximum Likelihood optimization failed to
converge. Check mle_retvals
warnings.warn("Maximum Likelihood optimization failed to "
/usr/local/lib/python3.11/dist-packages/statsmodels/base/model.py:607:
ConvergenceWarning: Maximum Likelihood optimization failed to
converge. Check mle_retvals
warnings.warn("Maximum Likelihood optimization failed to "

{"type":"string"}

{"summary":"{\n \"name\": \"forecast_df\",\n \"rows\": 62,\n


\"fields\": [\n {\n \"column\": \"Setting Waktu (Menit)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
18.041618552668716,\n \"min\": 0.0,\n \"max\": 61.0,\n
\"num_unique_values\": 62,\n \"samples\": [\n 50.0,\n
56.0,\n 0.0\n ],\n \"semantic_type\": \"\",\n
\"description\": \"\"\n }\n },\n {\n \"column\": \"10
ml/jam Berat (gram)\",\n \"properties\": {\n \"dtype\":
\"number\",\n \"std\": 2.6915274665519897,\n \"min\":
0.0,\n \"max\": 9.081005852900892,\n
\"num_unique_values\": 62,\n \"samples\": [\n
7.444672490504208,\n 8.337963940337982,\n 0.0\n
],\n \"semantic_type\": \"\",\n \"description\": \"\"\n
}\n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
13.67888952728837,\n \"min\": 0.0,\n \"max\":
46.33200617786839,\n \"num_unique_values\": 62,\n
\"samples\": [\n 37.97957772668967,\n
42.535556500913174,\n 0.0\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
27.470048004247047,\n \"min\": 0.0,\n \"max\":
92.85480354141163,\n \"num_unique_values\": 62,\n
\"samples\": [\n 76.11709206042529,\n
85.24699993704809,\n 0.0\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\n}","type":"dataframe","variable_name":"forecast_df"}

import numpy as np
import pandas as pd
from tabulate import tabulate
from IPython.display import display

# Fungsi untuk menghitung flow rate berdasarkan rumus yang diberikan


def calculate_flow_rate_corrected(weight_data):
flow_rate = 60 * (np.diff(weight_data)) / 0.998 # Rumus flow rate
dengan faktor koreksi
return flow_rate

# Menghitung flow rate untuk setiap kolom berat (10 ml/jam, 50 ml/jam,
100 ml/jam)
flow_rate_data_corrected = {}

for col in weight_columns:


weight_data = full_data[col]
flow_rate = calculate_flow_rate_corrected(weight_data)

# Menambahkan NaN di awal untuk menjaga panjang array


flow_rate_with_nan = np.concatenate([np.array([np.nan]),
flow_rate])
flow_rate_data_corrected[col] = flow_rate_with_nan

# Menambahkan Flow Rate ke dalam full_data


full_data['10 ml/jam Flow Rate'] = flow_rate_data_corrected["10 ml/jam
Berat (gram)"]
full_data['50 ml/jam Flow Rate'] = flow_rate_data_corrected["50 ml/jam
Berat (gram)"]
full_data['100 ml/jam Flow Rate'] = flow_rate_data_corrected["100
ml/jam Berat (gram)"]

# Membuat DataFrame dari data lengkap (berat dan flow rate)


flow_rate_df_corrected = pd.DataFrame(full_data)

# Menampilkan Tabel Lengkap dengan Berat dan Flow Rate yang telah
dikoreksi menggunakan display
display(f"\nTabel Lengkap dengan Berat dan Flow Rate (dikoreksi):")
display(flow_rate_df_corrected)

{"type":"string"}

{"summary":"{\n \"name\": \"flow_rate_df_corrected\",\n \"rows\":


62,\n \"fields\": [\n {\n \"column\": \"Setting Waktu
(Menit)\",\n \"properties\": {\n \"dtype\": \"number\",\n
\"std\": 18.041618552668716,\n \"min\": 0.0,\n \"max\":
61.0,\n \"num_unique_values\": 62,\n \"samples\": [\n
50.0,\n 56.0,\n 0.0\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"10 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
2.6915274665519897,\n \"min\": 0.0,\n \"max\":
9.081005852900892,\n \"num_unique_values\": 62,\n
\"samples\": [\n 7.444672490504208,\n
8.337963940337982,\n 0.0\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
13.67888952728837,\n \"min\": 0.0,\n \"max\":
46.33200617786839,\n \"num_unique_values\": 62,\n
\"samples\": [\n 37.97957772668967,\n
42.535556500913174,\n 0.0\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Berat (gram)\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
27.470048004247047,\n \"min\": 0.0,\n \"max\":
92.85480354141163,\n \"num_unique_values\": 62,\n
\"samples\": [\n 76.11709206042529,\n
85.24699993704809,\n 0.0\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"10 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.3420523991106059,\n \"min\": 8.176352705410828,\n
\"max\": 9.43887775551102,\n \"num_unique_values\": 51,\n
\"samples\": [\n 8.950017878163095,\n
8.961905049414597,\n 8.938869058358001\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"50 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
1.2451836972728836,\n \"min\": 41.00200400801606,\n
\"max\": 49.95991983967939,\n \"num_unique_values\": 58,\n
\"samples\": [\n 46.893787575150306,\n
49.95991983967939,\n 45.74332424972396\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n },\n {\n \"column\": \"100 ml/jam Flow Rate\",\n
\"properties\": {\n \"dtype\": \"number\",\n \"std\":
0.48955800665616567,\n \"min\": 90.18036072144288,\n
\"max\": 92.94589178356709,\n \"num_unique_values\": 56,\n
\"samples\": [\n 90.84168336673346,\n
91.56312625250499,\n 91.4418259742365\n ],\n
\"semantic_type\": \"\",\n \"description\": \"\"\n }\
n }\n ]\
n}","type":"dataframe","variable_name":"flow_rate_df_corrected"}

import matplotlib.pyplot as plt


import numpy as np

# Menghitung Flow Rate untuk setiap setting waktu (menggunakan rumus)


def calculate_flow_rate(berat):
# Pastikan berat memiliki lebih dari 1 data
if len(berat) > 1:
flow_rate = 60 * (berat[1:] - berat[:-1]) / 0.998
# Menambahkan NaN untuk titik pertama yang tidak dapat
dihitung
flow_rate = np.concatenate([[np.nan], flow_rate])
return flow_rate
else:
return np.array([np.nan] * len(berat))

# Menghitung flow rate untuk setiap kolom berat


flow_rate_10ml = calculate_flow_rate(full_data['10 ml/jam Berat
(gram)'])
flow_rate_50ml = calculate_flow_rate(full_data['50 ml/jam Berat
(gram)'])
flow_rate_100ml = calculate_flow_rate(full_data['100 ml/jam Berat
(gram)'])

# Membuat plot untuk berat dan flow rate


plt.figure(figsize=(12, 6))

# Subplot untuk Berat


plt.subplot(2, 1, 1) # 2 baris, 1 kolom, subplot pertama
plt.plot(full_data['Setting Waktu (Menit)'], full_data['10 ml/jam
Berat (gram)'], label='10 ml/jam Berat (gram)', color='blue',
marker='o')
plt.plot(full_data['Setting Waktu (Menit)'], full_data['50 ml/jam
Berat (gram)'], label='50 ml/jam Berat (gram)', color='green',
marker='x')
plt.plot(full_data['Setting Waktu (Menit)'], full_data['100 ml/jam
Berat (gram)'], label='100 ml/jam Berat (gram)', color='red',
marker='s')
plt.title('Prediksi Berat (gram) untuk Setiap Setting Waktu')
plt.xlabel('Waktu (Menit)')
plt.ylabel('Berat (gram)')
plt.legend()

# Subplot untuk Flow Rate


plt.subplot(2, 1, 2) # 2 baris, 1 kolom, subplot kedua
plt.plot(full_data['Setting Waktu (Menit)'], flow_rate_10ml, label='10
ml/jam Flow Rate', color='blue', marker='o')
plt.plot(full_data['Setting Waktu (Menit)'], flow_rate_50ml, label='50
ml/jam Flow Rate', color='green', marker='x')
plt.plot(full_data['Setting Waktu (Menit)'], flow_rate_100ml,
label='100 ml/jam Flow Rate', color='red', marker='s')
plt.title('Flow Rate untuk Setiap Setting Waktu')
plt.xlabel('Waktu (Menit)')
plt.ylabel('Flow Rate (ml/menit)')
plt.legend()

# Menampilkan grafik
plt.tight_layout()
plt.show()

You might also like