> For the complete documentation index, see [llms.txt](https://bcds.gitbook.io/learn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bcds.gitbook.io/learn/tutorials/data-visualization/google-colab/visualization.md).

# Visualization

Exemplar data: COVID-19 case and death data (date: 202012006)

### Bar Chart

Tutorial: [pandas.DataFrame.plot.bar](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.bar.html)

```python
#Bar Chart
#bar_1 = df_state_1.plot.bar()
bar_2 = df_state_1.plot.bar(x='state', y='cases', rot=90, figsize=(20,3))
```

![Example: COVID-19 Num. of Cases 2020-12-06 (United States on State Level)](/files/-MU6qSueXcw3Dx15cx3V)

### Line Chart

Tutorial: [pandas.DataFrame.plot.line](https://pandas.pydata.org/pandas-docs/version/0.23/generated/pandas.DataFrame.plot.line.html)

```python
#Syntax: DataFrame.plot.line(x=None, y=None, **kwds)
line_1 = df_state_1.plot.line(y='deaths',x='state', rot=90, figsize=(10,3))
line_2 = df_state_1.plot.line(subplots=True,x='state', rot=90,figsize=(10,5))
```

![Example: COVI19 Num. of Cases 2020-12-06 (United States on State Level)](/files/-MU6qzvdxrVRsevjnp7O)

### Scatter Plot Chart

Tutorial: [pandas.DataFrame.plot.scatter](https://pandas.pydata.org/pandas-docs/version/0.23/generated/pandas.DataFrame.plot.scatter.html)

```python
#Syntax: DataFrame.plot.scatter(x, y, s=None, c=None, **kwargs)
scatter = df_state_1.plot.scatter(x='cases', y='deaths')
```

![Example: COVID-19 Num. of Cases & Deaths 2020-12-06 (United States State Level)](/files/-MU6rUSPbpqix7VbpwSx)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bcds.gitbook.io/learn/tutorials/data-visualization/google-colab/visualization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
