---
meta:
  iooxa:
    id:
      block: hWmL2NFVU5Q8zURcyA1f
      project: pYq3tTY66ZSR0P222zpE
      version: 23
  kernelspec:
    display_name: Python 3
    language: python
    name: python3
  language_info:
    codemirror_mode:
      name: ipython
      version: 3
    file_extension: .py
    mimetype: text/x-python
    name: python
    nbconvert_exporter: python
    pygments_lexer: ipython3
    version: 3.7.6
---

chunk:
:::
```python iooxa="\[object Object]" execution_count=1
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import altair as alt
from sklearn import *
```
:::

chunk:
:::
```python iooxa="\[object Object]" execution_count=3
x = [1,2,3]
y = ["a", "b", "c"]
df = pd.DataFrame({"x": x,
                  "y" : y})
df.head()
```

|   | x | y |
| - | - | - |
| 0 | 1 | a |
| 1 | 2 | b |
| 2 | 3 | c |
:::

chunk:
:::
```python iooxa="\[object Object]" execution_count=1
library(tidyverse)
```

```text
── Attaching packages ─────────────────────────────────────── tidyverse 1.2.1 ──
✔ ggplot2 3.2.1     ✔ purrr   0.3.2
✔ tibble  2.1.3     ✔ dplyr   0.8.3
✔ tidyr   1.0.2     ✔ stringr 1.4.0
✔ readr   1.3.1     ✔ forcats 0.4.0
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
```
:::

chunk:
:::
```python iooxa="\[object Object]" execution_count=2
mtcars1 <- mtcars %>%
ggplot() +
 geom_point(aes(x = wt, y = hp))
```
:::

chunk:
:::
```python iooxa="\[object Object]" execution_count=3
mtcars1 +
 geom_smooth(aes(x = wt, y = hp), method = "lm", se = F) +
 theme_bw()
```

![](2021_06_14.md.media/0)
:::

An image won't work. How about some text? This works. 
[curvenote](https://curvenote.com)

Text works, images do not. 
Tables do not work either Tables work only under code fence blocks

    | x | y |
    |----|---|
    | 1  | 2 |

chunk:
:::
```python iooxa="\[object Object]" execution_count=7
library(knitr)

head(mtcars)
```

|                   | mpg      | cyl      | disp     | hp       | drat     | wt       | qsec     | vs       | am       | gear     | carb     |
| ----------------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |
|                   | &lt;dbl> | &lt;dbl> | &lt;dbl> | &lt;dbl> | &lt;dbl> | &lt;dbl> | &lt;dbl> | &lt;dbl> | &lt;dbl> | &lt;dbl> | &lt;dbl> |
| Mazda RX4         | 21       | 6        | 160      | 110      | 3.9      | 2.62     | 16.46    | 0        | 1        | 4        | 4        |
| Mazda RX4 Wag     | 21       | 6        | 160      | 110      | 3.9      | 2.875    | 17.02    | 0        | 1        | 4        | 4        |
| Datsun 710        | 22.8     | 4        | 108      | 93       | 3.85     | 2.32     | 18.61    | 1        | 1        | 4        | 1        |
| Hornet 4 Drive    | 21.4     | 6        | 258      | 110      | 3.08     | 3.215    | 19.44    | 1        | 0        | 3        | 1        |
| Hornet Sportabout | 18.7     | 8        | 360      | 175      | 3.15     | 3.44     | 17.02    | 0        | 0        | 3        | 2        |
| Valiant           | 18.1     | 6        | 225      | 105      | 2.76     | 3.46     | 20.22    | 1        | 0        | 3        | 1        |
:::

chunk:
:::
```python iooxa="\[object Object]" execution_count=4
library(broom)
```
:::

chunk:
:::
```python iooxa="\[object Object]" execution_count=5
tidy(head(mtcars))
```

```text
Warning message:
“'tidy.data.frame' is deprecated.
See help("Deprecated")”
```

* * *

| column   | n        | mean       | sd         | median   | trimmed    | mad      | min      | max      | range    | skew       | kurtosis | se         |
| -------- | -------- | ---------- | ---------- | -------- | ---------- | -------- | -------- | -------- | -------- | ---------- | -------- | ---------- |
| &lt;chr> | &lt;dbl> | &lt;dbl>   | &lt;dbl>   | &lt;dbl> | &lt;dbl>   | &lt;dbl> | &lt;dbl> | &lt;dbl> | &lt;dbl> | &lt;dbl>   | &lt;dbl> | &lt;dbl>   |
| mpg      | 6        | 20.5       | 1.7663522  | 21       | 20.5       | 1.1      | 18.1     | 22.8     | 4.7      | -0.2588032 | 1.786006 | 0.7211103  |
| cyl      | 6        | 6          | 1.2649111  | 6        | 6          | 0        | 4        | 8        | 4        | 0          | 3        | 0.5163978  |
| disp     | 6        | 211.833333 | 89.903096  | 192.5    | 211.833333 | 49       | 108      | 360      | 252      | 0.5895813  | 2.267444 | 36.7027852 |
| hp       | 6        | 117.166667 | 29.0889441 | 110      | 117.166667 | 2.5      | 93       | 175      | 82       | 1.5702674  | 3.874166 | 11.8755117 |
| drat     | 6        | 3.44       | 0.503468   | 3.5      | 3.44       | 0.4      | 2.76     | 3.9      | 1.14     | -0.2092434 | 1.327855 | 0.2055399  |
| wt       | 6        | 2.988333   | 0.4632566  | 3.045    | 2.988333   | 0.405    | 2.32     | 3.46     | 1.14     | -0.3112377 | 1.624982 | 0.1891237  |
| qsec     | 6        | 18.128333  | 1.5210314  | 17.815   | 18.128333  | 1.075    | 16.46    | 20.22    | 3.76     | 0.2585718  | 1.476108 | 0.6209585  |
| vs       | 6        | 0.5        | 0.5477226  | 0.5      | 0.5        | 0.5      | 0        | 1        | 1        | 0          | 1        | 0.2236068  |
| am       | 6        | 0.5        | 0.5477226  | 0.5      | 0.5        | 0.5      | 0        | 1        | 1        | 0          | 1        | 0.2236068  |
| gear     | 6        | 3.5        | 0.5477226  | 3.5      | 3.5        | 0.5      | 3        | 4        | 1        | 0          | 1        | 0.2236068  |
| carb     | 6        | 2.166667   | 1.4719601  | 1.5      | 2.166667   | 0.5      | 1        | 4        | 3        | 0.5190377  | 1.43929  | 0.6009252  |
:::