# piccolbo/altair_recipes

### Showing 14 of 15 total issues

#### Function `autoplot` has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open

``````def autoplot(data, columns=None, group_by=None, height=600, width=800):
"""Automatically choose and produce a statistical graphics based on up to three columns of data."""

assert group_by is None, "long data not supported yet"
vars_n = len(columns)``````
Found in altair_recipes/autoplot.py - About 6 hrs to fix

# Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

### A method's cognitive complexity is based on a few simple rules:

• Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
• Code is considered more complex for each "break in the linear flow of the code"
• Code is considered more complex when "flow breaking structures are nested"

### Further reading

#### Function `autoplot` has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open

``````def autoplot(data, columns=None, group_by=None, height=600, width=800):
"""Automatically choose and produce a statistical graphics based on up to three columns of data."""

assert group_by is None, "long data not supported yet"
vars_n = len(columns)``````
Found in altair_recipes/autoplot.py - About 1 hr to fix

#### Function `multiscatterplot` has 8 arguments (exceeds 4 allowed). Consider refactoring. Open

``def multiscatterplot(``
Found in altair_recipes/scatterplot.py - About 1 hr to fix

#### Function `heatmap` has 8 arguments (exceeds 4 allowed). Consider refactoring. Open

``def heatmap(``
Found in altair_recipes/heatmap.py - About 1 hr to fix

#### Function `scatterplot` has 8 arguments (exceeds 4 allowed). Consider refactoring. Open

``def scatterplot(``
Found in altair_recipes/scatterplot.py - About 1 hr to fix

#### Function `smoother` has 7 arguments (exceeds 4 allowed). Consider refactoring. Open

``def smoother(``
Found in altair_recipes/smoother.py - About 50 mins to fix

#### Function `stripplot` has 7 arguments (exceeds 4 allowed). Consider refactoring. Open

``def stripplot(``
Found in altair_recipes/stripplot.py - About 50 mins to fix

#### Function `barchart` has 6 arguments (exceeds 4 allowed). Consider refactoring. Open

``def barchart(data, x=0, y=1, color=False, height=600, width=800):``
Found in altair_recipes/barchart.py - About 45 mins to fix

#### Function `boxplot` has 6 arguments (exceeds 4 allowed). Consider refactoring. Open

``def boxplot(data, columns=None, group_by=None, color=False, height=600, width=800):``
Found in altair_recipes/boxplot.py - About 45 mins to fix

#### Function `qqplot` has 5 arguments (exceeds 4 allowed). Consider refactoring. Open

``def qqplot(data, x=0, y=1, height=600, width=800):``
Found in altair_recipes/qqplot.py - About 35 mins to fix

#### Function `autocorrelation` has 5 arguments (exceeds 4 allowed). Consider refactoring. Open

``def autocorrelation(data, column=0, max_lag=None, height=600, width=800):``
Found in altair_recipes/autocorrelation.py - About 35 mins to fix

#### Function `autoplot` has 5 arguments (exceeds 4 allowed). Consider refactoring. Open

``def autoplot(data, columns=None, group_by=None, height=600, width=800):``
Found in altair_recipes/autoplot.py - About 35 mins to fix

#### Function `layered_histogram` has 5 arguments (exceeds 4 allowed). Consider refactoring. Open

``def layered_histogram(data, columns=None, group_by=None, height=600, width=800):``
Found in altair_recipes/histogram.py - About 35 mins to fix

#### Function `scatterplot` has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open

``````def scatterplot(
data, x=0, y=1, color=None, opacity=1, tooltip=None, height=600, width=800
):
"""Generate a scatterplot."""
if color is not None:``````
Found in altair_recipes/scatterplot.py - About 35 mins to fix

# Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

### A method's cognitive complexity is based on a few simple rules:

• Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
• Code is considered more complex for each "break in the linear flow of the code"
• Code is considered more complex when "flow breaking structures are nested"