Вопрос | Ответ |
---|---|
Как загрузить данные? | Создать датасет, предварительно подключив БД |
Как нарисовать график? | Выбрать датасет, тип графика, выбрать что отображается на осях |
Принцип | Плохо | Хорошо |
---|---|---|
Фокус на цели, а не иструменте | Как расположить пилюли в Tableau? | Как нарисовать график? |
Использовать универсальные термины | DAX для скользящего среднего | Формула для скользящего среднего |
Отделить задачу от реализации | Как подключить несколько таблиц в Tableau? | Как загрузить данные? |
Тип | Полезность | Удовлетворённость |
---|---|---|
Решение задачи | 5 | 1 |
Макро-визуал | 4 | 2 |
UX | 3 | 3 |
Выбор визуализаций | 2 | 4 |
Микро-визуал (UI) | 1 | 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def plot_pmf(data, ylabel='pmf', xlabel='defaults'): | |
# Compute bin edges: bins | |
bins = np.arange(min(data), max(data) + 1.5) - 0.5 | |
# Generate histogram | |
_ = plt.hist(data, bins=bins, normed=True) | |
# Label axes | |
_ = plt.ylabel(ylabel) | |
_ = plt.xlabel(xlabel) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pearson_r(x, y): | |
"""Compute Pearson correlation coefficient between two arrays.""" | |
# Compute correlation matrix: corr_mat | |
corr_mat = np.corrcoef(x, y) | |
# Return entry [0,1] | |
return corr_mat[0,1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ecdf(column: list[int]): | |
"""Compute ECDF for a one-dimensional array of measurements.""" | |
# Number of data points: n | |
n = len(column) | |
# x-data for the ECDF: x | |
x = np.sort(column) | |
# y-data for the ECDF: y | |
y = np.arange(1, 1 + n) / n |