Skip to content

Instantly share code, notes, and snippets.

@amzoss
amzoss / course-reserves-data-model.md
Last active August 29, 2023 15:50
Course Reserves Data Model Diagram

Actual Data Model

erDiagram
    COURSE-LISTING ||--o{ COURSE : "one-to-many"
    COURSE }|--|{ INSTRUCTOR : "many-to-many"
    COURSE-LISTING ||--o{ RESERVE : "one-to-many"
    RESERVE }|..o{ CONTRIBUTOR : "many-to-many"
@amzoss
amzoss / got_adv.Rmd
Created March 16, 2023 13:12
Game of Thrones Advanced Exercises
---
title: "Game of Thromes Character Ratings - Advanced"
author: "Angela Zoss"
date: "3/16/2023"
output: html_document
---
## Setup your environment
```{r}
@amzoss
amzoss / ldlite_notebook_sample.ipynb
Last active March 28, 2023 21:01
ldlite_notebook_sample.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@amzoss
amzoss / Day1-1-inclusiveness-geom_col.R
Created August 19, 2022 14:15
Extra code from Data Matters 2022
# Showing how to replicate geom_bar() with a combination of
# count() and geom_col
inclusiveness_index %>% count(Continent) %>%
rename("count" = "n") %>%
ggplot() +
geom_col(mapping=aes(x=Continent, y=count))
@amzoss
amzoss / dr_who_snippet.R
Created December 16, 2021 19:13
Dr Who code chunk
viewership_with_names <- series_viewership %>%
left_join(doctors) %>%
mutate(doctor_name = fct_reorder(doctor_name, season_number))
first_season <- viewership_with_names %>%
group_by(doctor_name) %>%
summarise(first_year = min(year)) %>%
mutate(y = ifelse(first_year == 2005, 2, 1))
ggplot(viewership_with_names,
@amzoss
amzoss / index.html
Last active October 31, 2018 18:29
test gantt
<!DOCTYPE html>
<head>
<title>Visualizing the Future Symposium</title>
<meta charset="utf-8">
<script src="https://cdn.jsdelivr.net/npm/vega@4.2.0/build/vega.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@3.0.0-rc6/build/vega-lite.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@3.19.2/build/vega-embed.js"></script>
<style media="screen">
@amzoss
amzoss / .block
Created September 4, 2016 20:40 — forked from mbostock/.block
Brushable Network, II
license: gpl-3.0
@amzoss
amzoss / README.md
Last active December 17, 2015 14:09 — forked from mbostock/.block
Network with Google Spreadsheet support

This code extends the original (described below) by generalizing the layout of the graph so that data can be loaded either from JSON or a Google Spreadsheet.

Original description:

This brushable and draggable network supports multiple selections via the SHIFT key. Click and drag the background area to make a rectangular selection (brushing). Once you’ve selected some nodes, drag them around to reposition the network. You might use this technique to hand-tweak a force-directed layout for better appearance, saving the manually-adjusted node positions back to a file.

For greater control, you can hold down the SHIFT key to add to or remove from an existing selection, either by creating a new rectangular selection or clicking on an individual nodes. You can use the OPTION and SPACE keys to modify the rectangular selection while dragging. You can also use the arrow keys to nudge selected nodes.

A further improvement to this example would be to allow ri