Skip to content

Commit

Permalink
Add initial home page
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheiss committed May 25, 2023
1 parent 4b482b5 commit 8535207
Show file tree
Hide file tree
Showing 5 changed files with 387 additions and 0 deletions.
Binary file added files/img/dataviz-flowchart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions html/home/title-block.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<div class="grid title-block">
<div class="course-details-title-block g-col-12 g-col-sm-8 order-2 order-sm-1 text-center text-sm-start">
<h1 class="course-title">
$title$
</h1>
<div class="course-subtitle">
<p>$subtitle$</p>
</div>
<div class="course-meta">
<p>$details$</p>
</div>
</div>
<div class="g-col-12 g-col-sm-4 order-1 order-sm-2">
<div class="grid" style="--bs-columns: 5;">
<div class="g-col-1 g-col-sm-0"></div>
<div class="g-col-3 g-col-sm-5"><img src="$course-logo$" class="img-fluid"></div>
<div class="g-col-1 g-col-sm-0"></div>
</div>
</div>
</div>
52 changes: 52 additions & 0 deletions index.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: "Data Visualization"
subtitle: "Use R, ggplot2, and the principles of graphic design to create beautiful and truthful visualizations of data"
details: |
PMAP 8101 • Summer 2023<br>Andrew Young School of Policy Studies<br>Georgia State University
sidebar: false
toc: false
page-layout: full
format:
html:
template-partials:
- html/home/title-block.html
course-logo: /files/img/eval-hires.png
---

::: {.home}

::: {.grid .course-details}

::: {.g-col-12 .g-col-sm-6 .g-col-md-4}
### Instructor

- {{< fa user >}} &nbsp; [{{< var instructor.name >}}]({{< var instructor.url >}})
- {{< fa university >}} &nbsp; {{< var instructor.office >}}
- {{< fa envelope >}} &nbsp; <a href="mailto:{{< var instructor.email >}}">{{< var instructor.email >}}</a>
- {{< fa brands twitter >}} &nbsp; [{{< var instructor.twitter >}}](https://www.twitter.com/{{< var instructor.twitter >}})
- {{< fa calendar-check >}} &nbsp; [Schedule an appointment]({{< var instructor.appointment_url >}})
:::

::: {.g-col-12 .g-col-sm-6 .g-col-md-4}
### Course details

- {{< fa calendar >}} &nbsp; {{< var course.days >}}
- {{< fa calendar-alt >}} &nbsp; {{< var course.dates >}}
- {{< fa clock >}} &nbsp; {{< var course.time >}}
- {{< fa location-dot >}} &nbsp; {{< var course.location >}}
- {{< fa brands slack >}} &nbsp; [Slack]({{< var course.slack >}})
:::

::: {.g-col-12 .g-col-md-4 .contact-policy}
### Contacting me

{{< var instructor.contact_policy >}}
:::

:::

```{r echo=FALSE}
knitr::include_graphics(here::here("files", "img", "dataviz-flowchart.png"), error = FALSE)
```

:::
79 changes: 79 additions & 0 deletions schedule.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
title: "Schedule"
sidebar: false
toc: false
page-layout: full
---

```{r packages-data, include=FALSE}
library(tidyverse)
library(knitr)
library(kableExtra)
# withr::with_dir(here::here(), {
# schedule_nested <- targets::tar_read(schedule_page_data)
# targets::tar_load(schedule_ical_file)
# })
schedule_ical_file <- "blah"
# base_url <- yaml::read_yaml(here::here("_quarto.yml"))$website$`site-url`
# ical_url_absolute <- paste0(base_url, "/", schedule_ical_file)
ical_url_absolute <- "blahblah"
```

::: {.schedule-page}

Here's your roadmap for the semester!

- [**Content**](/content/) ({{< fa book-open-reader >}}): This page contains the readings, slides, and recorded lectures for the week. Read and watch these **before** our in-person class.

- [**Example**](/example/) ({{< fa laptop-code >}}): This page contains fully annotated R code and other supplementary information that you can use as a reference for your assignments and project. This is only a reference page—you don't have to necessarily do anything here. Some sections also contain videos of me live coding the examples so you can see what it looks like to work with R in real time. This page will be *very* helpful as you work on your assignments.

- [**Assignment**](/assignment/) ({{< fa pen-ruler >}}): This page contains the instructions for each assignment. Weekly reports are due by *noon* on the day of class. Other assignments are due by *11:59 PM* on the day they're listed.

::: {.callout-tip}

## Subscribe!

You can subscribe to this calendar URL in Outlook, Google Calendar, or Apple Calendar:

::: {.grid}

::: {.g-col-12 .g-col-md-2}
<p class="download-btn"><a class="btn btn-danger btn-sm" href="/`r schedule_ical_file`" role="button">{{< fa calendar-alt >}} Download</a></p>
:::

::: {.g-col-12 .g-col-md-10}
<p><input class="form-control" type="text" value="`r ical_url_absolute`" onclick="this.select()" readonly></p>
:::

:::

:::


```{r build-table, include=FALSE}
show_table <- function(group_id) {
# Add a heading
cat(as.character(paste("\n\n###", schedule_nested$group[[group_id]], "\n\n")))
# Make the table
tbl <- schedule_nested$data[[group_id]] %>%
select(-subgroup) %>%
kbl(escape = FALSE, align = "rlccc", table.attr = 'class="schedule-table"') %>%
kable_styling() %>%
column_spec(1, width = "20%", extra_css = "padding-right: 20px;") %>%
column_spec(2, width = "50%") %>%
column_spec(3:5, width = "10%") %>%
pack_rows(index = schedule_nested$subgroup_index[[group_id]],
label_row_css = "border-bottom: 2px solid #000000;")
cat(tbl)
}
```

```{r show-table, echo=FALSE, results="asis"}
# walk(seq(1, nrow(schedule_nested)), ~show_table(.x))
```

:::
Loading

0 comments on commit 8535207

Please sign in to comment.