2: Visualize Data, Bar Charts, Histograms, Boxplots, Scatterplots, Line Graphs, Overplotting, Customize

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/65

encourage image

There's no tags or description

Looks like no tags are added yet.

66 Terms

1
New cards

geom_bar()

a function in ggplot2 used to create bar charts

2
New cards

y-axis in geom_bar()

you should not supply a y aesthetic when you use a geom_bar(). ggplot will count how many times x value appears in the data, then display the counts on the y axis

3
New cards

count()

a function in ggplot2 that counts the number of occurrences of each value in a vector or variable

4
New cards

geom_col()

a function in ggplot2 used to create bar charts where the heights of the bars represent values in the data, rather than counts

5
New cards

Aesthetics

the visual properties of a plot in ggplot2, such as color, size, shape, and transparency, that can be mapped to data variables and used to enhance data visualization

6
New cards

color =

assigns color to the outline of a plot element

7
New cards

fill =

assigns color to the interior of a plot element

8
New cards

width =

assigns the thickness of a plot element's outline such as lines or bars

9
New cards

Position Adjustments

manipulates the placement of data points or bars in a plot to improve clarity and avoid overlap

10
New cards

fill = clarity

assigns transparency to the interior of a plot element, improving visual distinction

11
New cards

position = “dodge”

a position adjustment that separates overlapping bars in a bar chart to make them visually distinct

12
New cards

clarity(stacked)

a method that stacks plot elements while adjusting their transparency to enhance visibility and distinguish between categories

13
New cards

position = “stack”

a position adjustment that stacks overlapping elements on top of each other in a plot, allowing for combined visual representation of categories

14
New cards

position = “fill”

a position adjustment that scales overlapping elements in a bar chart to fill the same height, allowing for proportionate comparison of categories

15
New cards

position = “identity”

a bad position adjustment that retains the original data values of overlapping elements in a plot without stacking or scaling, allowing for a straightforward representation of each category

16
New cards

why is it position = “identity” bad?

it does not provide a clear visual comparison of overlapping elements, as the original data values remain unchanged and can lead to misleading interpretations

17
New cards

Facets

a way to create multiple subplots based on a factor or variable, allowing for comparison across different groups or categories within a single visualization

18
New cards

facet_grid()

a function in the ggplot2 package in R that creates a grid of plots based on two categorical variables, allowing for easy comparison of distributions and patterns across different combinations of those variables

19
New cards

facet_wrap()

a function in the ggplot2 package in R that creates a series of plots wrapped into a specified number of rows and columns based on a single categorical variable, making it easier to visualize multiple groups in a tidy format

20
New cards

scales argument

an argument used in ggplot2 functions to manage the scaling of axes, allowing for customization of the scale type, labels, and limits for better visualization

21
New cards

scale = “free”

allows each facet to have its own scales, enabling better visualization of varying ranges across different subplots

22
New cards

scales = “free_x”

allows the x-axis to vary independently for each facet, enhancing clarity when comparing different groups with unequal distributions

23
New cards

scales = “free_y”

allows the y-axis to vary independently for each facet, improving the visualization of varying data ranges across different subplots

24
New cards

geom_historgram()

is a function in ggplot2 used to create histograms by specifying the values and bins for data distribution visualization

25
New cards

binwidth

specifies the width of each bin in a histogram

26
New cards

bins

refers to the number of intervals into which the data is divided in a histogram

27
New cards

boundary

is the outer limits that define the range of bins in a histogram

28
New cards

geom_freqpoly()

is a function in ggplot2 that creates a frequency polygon, which uses a line to display the same information as a histogram

29
New cards

geom_density()

is a function in ggplot2 that estimates and visualizes the probability density function of a continuous variable, creating a smooth curve that represents the distribution of the data

30
New cards

geom_dotplot()

is a function in ggplot2 that creates a dot plot, displays 1-dimensional distributions. it represents each observation with a dot and then stacks dots within lines to create the semblance of a histogram

31
New cards

Density curves

are smooth lines that represent the distribution of a continuous variable

32
New cards

Facets

are a method in ggplot2 for creating multiple subplots based on the values of a categorical variable

33
New cards

Boxplots

are a graphical representation of the distribution of a dataset through its quartiles, highlighting the median, upper and lower quartiles, and potential outliers. they display the relationship between a continuous variable and a categorical variable

34
New cards

Countplots

display the relationship between 2 categorical variables

35
New cards

geom_boxplot()

is a ggplot2 function used to create boxplots in R. It visually summarizes the distribution of a continuous variable while allowing for grouping by a categorical variable

36
New cards

geom_boxplot() expectations

the y-axis to be continuous and x-axis to be categorical

37
New cards

outlier.color parameter

specifies the color of the outliers in a boxplot created using ggplot2

38
New cards

outlier.fill parameter

specifies the fill color of the outliers in a boxplot created using ggplot2

39
New cards

outlier.shape parameter

specifies the shape of the outliers in a boxplot created using ggplot2

40
New cards

outlier.size parameter

specifies the size of the outliers in a boxplot created using ggplot2

41
New cards

outlier.stroke parameter

specifies the stroke color of the outliers in a boxplot created using ggplot2

42
New cards

outlier.alpha parameter

specifies the transparency level of the outliers in a boxplot created using ggplot2

43
New cards

cut_interval()

is a function in ggplot2 that divides continuous data into intervals of equal length

44
New cards

cut_number()

is a function in ggplot2 that divides continuous data into a specified number of intervals, ensuring that each interval contains approximately the same number of observations

45
New cards

cut_width()

is a function in ggplot2 that divides continuous data into intervals of specified width

46
New cards

coord_flip()

is a function in ggplot2 that switches the x and y axes of a plot, allowing for horizontal displays of bar charts and other visualizations

47
New cards

geom_dotplot()

is a function in ggplot2 that creates a dot plot, visualizing the distribution of a continuous variable by stacking dots for each value in a specified bin

48
New cards

geom_violin()

is a function in ggplot2 that creates a violin plot, which combines a box plot and a density plot to visualize the distribution of a continuous variable across different categories.

49
New cards

draw_quantities =

is a function in ggplot2 that draws reference lines for specified quantiles on a plot

50
New cards

geom_count()

is a function in ggplot2 that creates a count plot, visualizing the number of occurrences of each combination of two categorical variables by representing them with points

51
New cards

Heat maps

are graphical representations of data where individual values are represented as colors

52
New cards

geom_tile()

is a function in ggplot2 that creates heat maps, displaying values in a matrix format with colored tiles.

53
New cards

Scatterplots

display the relationship between 2 continuous variables

54
New cards

geom_point()

is a function in ggplot2 used to create scatterplots by plotting points for two continuous variables

55
New cards

geom_text()

is a function in ggplot2 that adds text labels to a plot

56
New cards

geom_label()

is a function in ggplot2 that adds text labels with a background rectangle to a plot

57
New cards

geom_smooth()

is a function in ggplot2 that adds a smoothed line to a plot, often used to visualize trends in data. provides a summarized version of a scatterplot

58
New cards

“method” parameters

specify the method used for smoothing in geom_smooth(), such as "glm" or "lm".

59
New cards

geom_label_repel()

is a function in the ggplot2 library that adds text labels to plots while preventing overlapping by automatically adjusting their positions

60
New cards

Global mapping

refers to applying a transformation to all data points in a plot, affecting the entire dataset

61
New cards

Local mapping

applies transformations to specific subsets or areas, allowing for more detailed and focused analysis of specific data segments

62
New cards

last_plot()

is a function in ggplot2 that retrieves the last plot created. It allows users to modify or re-use the last generated plot without re-running the original plotting command

63
New cards

geom_rug()

adds another type of summary to the plot. displays the one dimensional marginal distributions of each variable in the scatterplot. they appear as tik marks along the x and y axes

64
New cards

geom_jitter()

plots a scatterplot and then adds a small amount of random noise to each point in the plot. provides a simple way to inspect patterns that occur in heavily gridded or overlapping data

65
New cards

coord_cartesian()

is a function in ggplot2 that adjusts the displayed coordinate system of a plot without altering the actual data

66
New cards