abdullatifkaban's picture
Rename plots.json to src/plots.json
4e0f973 verified
{
"📊 Temel & Dagilim": {
"scatter": {
"label": "Scatter Plot",
"when_to_use": "İki sayısal değişken arasındaki ilişkiyi ve dağılımı incelemek için kullanılır.",
"inputs": ["x", "y"],
"options": {
"color": "tab:blue",
"size": 40,
"alpha": 0.7
},
"code_template": "ax.scatter({x}, {y}, c={color}, s={size}, alpha={alpha})"
},
"line": {
"label": "Line Plot",
"when_to_use": "Zamana veya sıralı bir değişkene bağlı değişimi göstermek için uygundur.",
"inputs": ["x", "y"],
"options": {
"color": "tab:red",
"linewidth": 2
},
"code_template": "ax.plot({x}, {y}, color={color}, linewidth={linewidth})"
},
"bar": {
"label": "Bar Plot",
"when_to_use": "Kategorilere göre sayısal değerleri karşılaştırmak için kullanılır.",
"inputs": ["x", "y"],
"options": {
"color": "tab:green"
},
"code_template": "ax.bar({x}, {y}, color={color})"
},
"barh": {
"label": "Horizontal Bar Plot",
"when_to_use": "Uzun kategori isimlerinde yatay karşılaştırma için tercih edilir.",
"inputs": ["x", "y"],
"options": {
"color": "tab:purple"
},
"code_template": "ax.barh({x}, {y}, color={color})"
},
"hist": {
"label": "Histogram",
"when_to_use": "Tek bir sayısal değişkenin dağılımını incelemek için kullanılır.",
"inputs": ["x"],
"options": {
"bins": 20,
"color": "tab:blue",
"alpha": 0.7
},
"code_template": "ax.hist({x}, bins={bins}, color={color}, alpha={alpha})"
},
"box": {
"label": "Boxplot",
"when_to_use": "Dağılım, medyan ve aykırı değerleri görmek için kullanılır.",
"inputs": ["y"],
"options": {},
"code_template": "ax.boxplot({y})"
},
"violin": {
"label": "Violin Plot",
"when_to_use": "Dağılımın yoğunluk yapısını detaylı görmek için kullanılır.",
"inputs": ["y"],
"options": {},
"code_template": "ax.violinplot({y})"
},
"hexbin": {
"label": "Hexbin Plot",
"when_to_use": "Yoğun veri noktalarında scatter yerine tercih edilir.",
"inputs": ["x", "y"],
"options": {
"gridsize": 30,
"cmap": "Blues"
},
"code_template": "ax.hexbin({x}, {y}, gridsize={gridsize}, cmap={cmap})"
}
},
"📈 Iliski & Yogunluk": {
"errorbar": {
"label": "Error Bar",
"when_to_use": "Ölçüm belirsizliği veya hata payı olan verilerde kullanılır.",
"inputs": ["x", "y"],
"options": {
"yerr": "None"
},
"code_template": "ax.errorbar({x}, {y}, yerr={yerr}, fmt='o')"
},
"stem": {
"label": "Stem Plot",
"when_to_use": "Ayrık veri noktalarının büyüklüğünü vurgulamak için kullanılır.",
"inputs": ["x", "y"],
"options": {},
"code_template": "ax.stem({x}, {y})"
},
"step": {
"label": "Step Plot",
"when_to_use": "Basamaklı değişimleri göstermek için uygundur.",
"inputs": ["x", "y"],
"options": {},
"code_template": "ax.step({x}, {y})"
},
"fill_between": {
"label": "Fill Between",
"when_to_use": "İki eğri veya sıfır ile alan doldurmak için kullanılır.",
"inputs": ["x", "y"],
"options": {
"alpha": 0.4
},
"code_template": "ax.fill_between({x}, {y}, alpha={alpha})"
}
},
"🧭 Zaman Serisi & Istatistik": {
"rolling_mean": {
"label": "Rolling Mean",
"when_to_use": "Zaman serilerinde trendi yumuşatarak görmek için kullanılır.",
"inputs": ["y"],
"options": {
"window": 5
},
"code_template": "ax.plot({y}.rolling(window={window}).mean())"
},
"lag_plot": {
"label": "Lag Plot",
"when_to_use": "Zaman serilerinde otokorelasyonu görsel olarak incelemek için kullanılır.",
"inputs": ["y"],
"options": {
"lag": 1
},
"code_template": "ax.scatter({y}.shift({lag})[ {lag}: ], {y}[ {lag}: ])"
}
},
"🎯 Kategorik & Ozel": {
"pie": {
"label": "Pie Chart",
"when_to_use": "Bir bütünün parçalara oranını göstermek için kullanılır.",
"inputs": ["y"],
"options": {
"startangle": 90,
"autopct": "%1.2f%%"
},
"code_template": "ss={y}.value_counts(); ax.pie(ss, labels=ss.index, autopct={autopct})"
},
"donut": {
"label": "Donut Chart",
"when_to_use": "Pie chart'ın daha modern ve okunabilir hâlidir.",
"inputs": ["x", "y"],
"options": {},
"code_template": "wedges, _ = ax.pie({y}, labels={x}); centre = plt.Circle((0,0),0.6,fc='white'); ax.add_artist(centre)"
}
},
"🧠 Korelasyon": {
"correlation_heatmap": {
"label": "Correlation Heatmap",
"when_to_use": "Sayısal değişkenler arasındaki korelasyon ilişkilerini görmek için kullanılır.",
"inputs": [],
"options": {
"cmap": "coolwarm"
},
"code_template": "corr = df.select_dtypes(include='number').corr(); im = ax.imshow(corr, cmap={cmap}); ax.set_xticks(range(len(corr.columns))); ax.set_yticks(range(len(corr.columns))); ax.set_xticklabels(corr.columns, rotation=90); ax.set_yticklabels(corr.columns); plt.colorbar(im, ax=ax)"
}
}
}