# 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)](https://4055173823-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LgXtIWpHMikxGQHLU5T%2F-MU6qHjbteyjO114ZSzU%2F-MU6qSueXcw3Dx15cx3V%2Fbar_image%20\(1\).png?alt=media\&token=a1fc1e42-4436-4a45-a7fa-f5826f1f4c0c)

### 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)](https://4055173823-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LgXtIWpHMikxGQHLU5T%2F-MU6qnxnwc74xw16n70H%2F-MU6qzvdxrVRsevjnp7O%2Fline_image.png?alt=media\&token=5c70f8a6-47fd-4b2a-aa92-dec0a22cbbc9)

### 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)](https://4055173823-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LgXtIWpHMikxGQHLU5T%2F-MU6qnxnwc74xw16n70H%2F-MU6rUSPbpqix7VbpwSx%2Fscatter_image%20\(2\).png?alt=media\&token=7ef5c2d2-36bd-490a-9340-11c8d43903ce)


---

# Agent Instructions: 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.
