Skip to content

Commit

Permalink
update to use R and Py
Browse files Browse the repository at this point in the history
  • Loading branch information
chaz-clark committed Mar 6, 2024
1 parent 5868c02 commit 3720c98
Show file tree
Hide file tree
Showing 25 changed files with 1,233 additions and 1,211 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ jobs:
with:
# To install LaTeX to build PDF book
tinytex: true


# Comment out the below section if you are not using python
- name: Install Python and Dependencies
uses: actions/setup-python@v4
with:
Expand All @@ -28,6 +29,21 @@ jobs:
- run: pip install jupyter numpy pandas scikit-learn plotly.express
#- run: pip install -r requirements.txt

# Comment out the 2 below section if you are not using R
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.3.2'
use-public-rspm: true

- name: Install R Dependencies
uses: r-lib/actions/setup-renv@v2
with:
packages:
any::tidyverse
any::knitr
any::DT

- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
Expand Down
166 changes: 1 addition & 165 deletions Projects/project1.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,168 +25,4 @@ execute:

---

```{python}
#| label: libraries
#| include: false
import pandas as pd
import numpy as np
import plotly.express as px
```


## Elevator pitch

_paste your elevator pitch here_
_A SHORT (4-5 SENTENCES) PARAGRAPH THAT `DESCRIBES KEY INSIGHTS` TAKEN FROM METRICS IN THE PROJECT RESULTS THINK TOP OR MOST IMPORTANT RESULTS._

```{python}
#| label: project data
#| code-summary: Read and format project data
# Include and execute your code here
df = pd.read_csv("https://github.com/byuidatascience/data4names/raw/master/data-raw/names_year/names_year.csv")
```

__Highlight the Questions and Tasks__

## QUESTION|TASK 1

__COPY PASTE QUESTION|TASK 1 FROM THE PROJECT HERE__

_type your results and analysis here_

```{python}
#| label: Q1
#| code-summary: Read and format data
# Include and execute your code here
```

_include figures in chunks and discuss your findings in the figure._

```{python}
#| label: Q1 chart
#| code-summary: plot example
#| fig-cap: "My useless chart"
#| fig-align: center
# Include and execute your code here
chart = px.bar(df.head(200),
x="name",
y="AK"
)
chart.show()
```


```{python}
#| label: Q1 table
#| code-summary: table example
#| tbl-cap: "Not much of a table"
#| tbl-cap-location: top
# Include and execute your code here
mydat = df.head(1000)\
.groupby('year')\
.sum()\
.reset_index()\
.tail(10)\
.filter(["year", "AK","AR"])
display(mydat)
```


## QUESTION|TASK 2

__COPY PASTE QUESTION|TASK 2 FROM THE PROJECT HERE__

_type your results and analysis here_

```{python}
#| label: Q2
#| code-summary: Read and format data
# Include and execute your code here
```

_include figures in chunks and discuss your findings in the figure._

```{python}
#| label: Q2 chart
#| code-summary: plot example
#| fig-cap: "My useless chart"
#| fig-align: center
# Include and execute your code here
chart = px.bar(df.head(200),
x="name",
y="AK"
)
chart.show()
```


```{python}
#| label: Q2 table
#| code-summary: table example
#| tbl-cap: "Not much of a table"
#| tbl-cap-location: top
# Include and execute your code here
mydat = df.head(1000)\
.groupby('year')\
.sum()\
.reset_index()\
.tail(10)\
.filter(["year", "AK","AR"])
display(mydat)
```


## QUESTION|TASK 3

__COPY PASTE QUESTION|TASK 3 FROM THE PROJECT HERE__

_type your results and analysis here_

```{python}
#| label: Q3
#| code-summary: Read and format data
# Include and execute your code here
```

_include figures in chunks and discuss your findings in the figure._

```{python}
#| label: Q3 chart
#| code-summary: plot example
#| fig-cap: "My useless chart"
#| fig-align: center
# Include and execute your code here
chart = px.bar(df.head(200),
x="name",
y="AK"
)
chart.show()
```


```{python}
#| label: Q3 table
#| code-summary: table example
#| tbl-cap: "Not much of a table"
#| tbl-cap-location: top
# Include and execute your code here
mydat = df.head(1000)\
.groupby('year')\
.sum()\
.reset_index()\
.tail(10)\
.filter(["year", "AK","AR"])
display(mydat)
```
### Paste in a template
169 changes: 1 addition & 168 deletions Projects/project2.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,171 +25,4 @@ execute:

---

### Uncomment the entire section to use this template

<!--
```{python}
#| label: libraries
#| include: false
import pandas as pd
import numpy as np
import plotly.express as px
```
## Elevator pitch
_paste your elevator pitch here_
_A SHORT (4-5 SENTENCES) PARAGRAPH THAT `DESCRIBES KEY INSIGHTS` TAKEN FROM METRICS IN THE PROJECT RESULTS THINK TOP OR MOST IMPORTANT RESULTS._
```{python}
#| label: project data
#| code-summary: Read and format project data
# Include and execute your code here
df = pd.read_csv("https://github.com/byuidatascience/data4names/raw/master/data-raw/names_year/names_year.csv")
```
__Highlight the Questions and Tasks__
## QUESTION|TASK 1
__COPY PASTE QUESTION|TASK 1 FROM THE PROJECT HERE__
_type your results and analysis here_
```{python}
#| label: Q1
#| code-summary: Read and format data
# Include and execute your code here
```
_include figures in chunks and discuss your findings in the figure._
```{python}
#| label: Q1 chart
#| code-summary: plot example
#| fig-cap: "My useless chart"
#| fig-align: center
# Include and execute your code here
chart = px.bar(df.head(200),
x="name",
y="AK"
)
chart.show()
```
```{python}
#| label: Q1 table
#| code-summary: table example
#| tbl-cap: "Not much of a table"
#| tbl-cap-location: top
# Include and execute your code here
mydat = df.head(1000)\
.groupby('year')\
.sum()\
.reset_index()\
.tail(10)\
.filter(["year", "AK","AR"])
display(mydat)
```
## QUESTION|TASK 2
__COPY PASTE QUESTION|TASK 2 FROM THE PROJECT HERE__
_type your results and analysis here_
```{python}
#| label: Q2
#| code-summary: Read and format data
# Include and execute your code here
```
_include figures in chunks and discuss your findings in the figure._
```{python}
#| label: Q2 chart
#| code-summary: plot example
#| fig-cap: "My useless chart"
#| fig-align: center
# Include and execute your code here
chart = px.bar(df.head(200),
x="name",
y="AK"
)
chart.show()
```
```{python}
#| label: Q2 table
#| code-summary: table example
#| tbl-cap: "Not much of a table"
#| tbl-cap-location: top
# Include and execute your code here
mydat = df.head(1000)\
.groupby('year')\
.sum()\
.reset_index()\
.tail(10)\
.filter(["year", "AK","AR"])
display(mydat)
```
## QUESTION|TASK 3
__COPY PASTE QUESTION|TASK 3 FROM THE PROJECT HERE__
_type your results and analysis here_
```{python}
#| label: Q3
#| code-summary: Read and format data
# Include and execute your code here
```
_include figures in chunks and discuss your findings in the figure._
```{python}
#| label: Q3 chart
#| code-summary: plot example
#| fig-cap: "My useless chart"
#| fig-align: center
# Include and execute your code here
chart = px.bar(df.head(200),
x="name",
y="AK"
)
chart.show()
```
```{python}
#| label: Q3 table
#| code-summary: table example
#| tbl-cap: "Not much of a table"
#| tbl-cap-location: top
# Include and execute your code here
mydat = df.head(1000)\
.groupby('year')\
.sum()\
.reset_index()\
.tail(10)\
.filter(["year", "AK","AR"])
display(mydat)
``` -->
### Paste in a template
Loading

0 comments on commit 3720c98

Please sign in to comment.