@@ -19,11 +19,11 @@ missing data visualization and imputation
1919Goals
2020--------
2121
22- Povide an easy to use yet thorough assessment of missing values in one's dataset:
22+ To provide an easy to use yet thorough assessment of missing values in one's dataset:
2323
24- - in addition to the blackholes plot bellow,
25- - show the variable-to-variable, subject-to-subject co-missingness, and
26- - quantify the TYPE of missingness etc
24+ - in addition to the blackholes plot bellow,
25+ - show the variable-to-variable, subject-to-subject co-missingness, and
26+ - quantify the TYPE of missingness etc
2727
2828
2929Note
@@ -62,3 +62,35 @@ Installation
6262
6363 pip install -U missingdata
6464
65+
66+
67+ Usage
68+ ------------
69+
70+ Let's say you have all the data in a pandas `DataFrame `, where subject IDs are in a ``sub_ids `` column
71+ and variable names are in a ``var_names `` column, and they belong to groups identified by ``sub_class `` and ``var_group ``,
72+ you can use the following code produce the ``blackholes `` plot:
73+
74+ .. code-block :: python
75+
76+ from missingdata import blackholes
77+
78+ blackholes(data_frame, label_rows_with = ' sub_ids' , label_cols_with = ' var_names' )
79+
80+
81+
82+ If you were interested in seeing subjects/variables with least amount of missing data, you can control miss perc window
83+ with ``filter_spec_samples `` and ``filter_spec_variables `` by passing a tuple of two floats e.g. (0, 0.1) which
84+ will filter away those with more than 10% of missing data.
85+
86+ .. code-block :: python
87+
88+ from missingdata import blackholes
89+
90+ blackholes(data_frame, label_rows_with = ' sub_ids' , label_cols_with = ' var_names' )
91+
92+
93+ The other parameters for the function are self-explanatory.
94+
95+ Please open an `issue <https://github.com/raamana/missingdata/issues/new >`_
96+ if you find something confusing, or have feedback to improve, or identify a bug. **Thanks **.
0 commit comments