Skip to content

Commit 8ff5fee

Browse files
committed
add framework, deploy
1 parent 6b0abf4 commit 8ff5fee

File tree

18 files changed

+4487
-20
lines changed

18 files changed

+4487
-20
lines changed

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy
2+
3+
on:
4+
# Run this workflow whenever a new commit is pushed to main.
5+
push: {branches: [main]}
6+
# Run this workflow once per day, at 10:15 UTC
7+
# schedule: [{cron: "15 10 * * *"}]
8+
# Run this workflow when triggered manually in GitHub’s UI.
9+
# workflow_dispatch: {}
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
cache: npm
27+
- run: npm ci
28+
- run: npm run build
29+
- uses: actions/configure-pages@v4
30+
- uses: actions/upload-pages-artifact@v3
31+
with:
32+
path: dist
33+
- name: Deploy
34+
id: deployment
35+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
/dist/
3+
node_modules/
4+
yarn-error.log

README.md

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
1-
# Interactive-Data-Vis-Fall2025
1+
# Interactive Data Visualization (Fall 2025)
22

3-
Course material for Interactive Data Visualization (DATA 73200) taught at CUNY (Fall 2025).
3+
This is an [Observable Framework](https://observablehq.com/framework/) app. To install the required dependencies, run:
4+
5+
```
6+
npm install
7+
```
8+
9+
Then, to start the local preview server, run:
10+
11+
```
12+
npm run dev
13+
```
14+
15+
Then visit <http://localhost:3000> to preview your app.
16+
17+
For more, see <https://observablehq.com/framework/getting-started>.
18+
19+
## Project structure
20+
21+
A typical Framework project looks like this:
22+
23+
```ini
24+
.
25+
├─ src
26+
│ ├─ components
27+
│ │ └─ timeline.js # an importable module
28+
│ ├─ data
29+
│ │ ├─ launches.csv.js # a data loader
30+
│ │ └─ events.json # a static data file
31+
│ ├─ example-dashboard.md # a page
32+
│ ├─ example-report.md # another page
33+
│ └─ index.md # the home page
34+
├─ .gitignore
35+
├─ observablehq.config.js # the app config file
36+
├─ package.json
37+
└─ README.md
38+
```
39+
40+
**`src`** - This is the “source root” — where your source files live. Pages go here. Each page is a Markdown file. Observable Framework uses [file-based routing](https://observablehq.com/framework/project-structure#routing), which means that the name of the file controls where the page is served. You can create as many pages as you like. Use folders to organize your pages.
41+
42+
**`src/index.md`** - This is the home page for your app. You can have as many additional pages as you’d like, but you should always have a home page, too.
43+
44+
**`src/data`** - You can put [data loaders](https://observablehq.com/framework/data-loaders) or static data files anywhere in your source root, but we recommend putting them here.
45+
46+
**`src/components`** - You can put shared [JavaScript modules](https://observablehq.com/framework/imports) anywhere in your source root, but we recommend putting them here. This helps you pull code out of Markdown files and into JavaScript modules, making it easier to reuse code across pages, write tests and run linters, and even share code with vanilla web applications.
47+
48+
**`observablehq.config.js`** - This is the [app configuration](https://observablehq.com/framework/config) file, such as the pages and sections in the sidebar navigation, and the app’s title.
49+
50+
## Command reference
51+
52+
| Command | Description |
53+
| ----------------- | -------------------------------------------------------- |
54+
| `npm install` | Install or reinstall dependencies |
55+
| `npm run dev` | Start local preview server |
56+
| `npm run build` | Build your static site, generating `./dist` |
57+
| `npm run deploy` | Deploy your app to Observable |
58+
| `npm run clean` | Clear the local data loader cache |
59+
| `npm run observable` | Run commands like `observable help` |

lab_0/README.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

observablehq.config.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// See https://observablehq.com/framework/config for documentation.
2+
export default {
3+
// The app’s title; used in the sidebar and webpage titles.
4+
title: "Interactive Data Visualization (Fall 2025)",
5+
6+
// The pages and sections in the sidebar. If you don’t specify this option,
7+
// all pages will be listed in alphabetical order. Listing pages explicitly
8+
// lets you organize them into sections and have unlisted pages.
9+
// pages: [
10+
// {
11+
// name: "Lab 0: Getting Started",
12+
// pages: [
13+
// {name: "Installations", path: "/lab_0/1_INSTALLATIONS"},
14+
// {name: "Github Setup", path: "/lab_0/2_GIT_SETUP"}
15+
// ],
16+
// name: "Lab 1: Intro to Observable Framework",
17+
// pages: [
18+
// {name: "Intro to Observable Framework", path: "/lab_1/1_INTRO_TO_OBSERVABLE_FRAMEWORK"}
19+
// ]
20+
// }
21+
// ],
22+
23+
// Content to add to the head of the page, e.g. for a favicon:
24+
head: '<link rel="icon" href="observable.png" type="image/png" sizes="32x32">',
25+
26+
// The path to the source root.
27+
root: "src",
28+
29+
// Some additional configuration options and their defaults:
30+
// theme: "default", // try "light", "dark", "slate", etc.
31+
// header: "", // what to show in the header (HTML)
32+
// footer: "Built with Observable.", // what to show in the footer (HTML)
33+
// sidebar: true, // whether to show the sidebar
34+
// toc: true, // whether to show the table of contents
35+
// pager: true, // whether to show previous & next links in the footer
36+
// output: "dist", // path to the output root for build
37+
// search: true, // activate search
38+
// linkify: true, // convert URLs in Markdown to links
39+
// typographer: false, // smart quotes and other typographic improvements
40+
// preserveExtension: false, // drop .html from URLs
41+
// preserveIndex: false, // drop /index from URLs
42+
};

0 commit comments

Comments
 (0)