CS-GY 6313 - Information Visualization
New York University
2026-10-09
| User Interface | Graphics Library | Notebook(s) |
|---|---|---|
| observablehq.com | D3 Framework |
Observable Frameworks |
Today we will be a exploring the following topics:
In prep for your group projects, it would be ideal to work on your own local instances of Observable…ness. The same group behind Observable also has released Framework, a JavaScript ecosystem for generating dashboards and web apps with Observable functionality.
We will focus a bit on making sure you are ready with a Framework project that you can upload to Github. Make sure to open today’s lab notebook, Local Observable Frameworks and follow along with the instructions.
[Note]: Framework is one of many options you can use for your project. We’re introducing it because it’s the closest to the Observable notebooks we’ve generated thus far.

Our guide assumes that you have a Github account.
If you do not, please make an account.
We will install Node.js and npm with a version manager called nvm.
Install nvm by following the instructions provided by the version manager’s Github documentation.
Open a CLI (“Command Line Interface”) in Terminal.app or some other code editor such as VSCode.
Paste and run the command, which downloads and installs the latest LTS version of Node.js:
Paste and run the command. This will switch the default Node.js version that your CLI uses to the LTS version you just installed:
nvm is a Unix-based Node.js version manager. Windows as its own version, called nvm-windows.
Install nvm-windows via the installation instructions mentioned in their online documentation.
Open PowerShell as an administrator. Alternatively, open a CLI terminal in your code editor such as VSCode.
Paste and run the command, which downloads and installs the latest LTS version of Node.js:
Paste and run the command. This will switch the default Node.js version that your CLI uses to the LTS version you just installed:
Open a terminal window (either Terminal.app on MacOS, Command Prompt on Windows, or VS Code on either MacOS or Windows).
Navigate to any folder or location where you will be comfortable creating a new folder (e.g. the Documents/ directory on MacOS or the Desktop/ on Windows). You can navigate to that location using the following command:
Paste and run the command:
New instructions will be prompted from you in the terminal window. Answer all the directions that appear.
@observablehq/framework@[VERSION]. Say “Yes” or “y” to proceed.At this point, Framework will create a brand new folder for you with all the code necessary to run a Framework project locally. If you ran with defaults, then the new folder will be titled “hello-framework”.
We are ready to run a local server that we can use for development. Run the following command inside your project folder:
Your Framework webpage should then be loaded into a localhost server that you can view via the browser. The Framework architecture tracks any changes to any files and updates in real-time every time you save changes in a file.
After these steps, you should be able to push changes to your Github repository and pull them when needed.
Online, create an empty Github repository and feel free to name it anything you want (though generally you should try to match project names when possible).
Locally (via command line or via Github tool), add and commit all files in your project window.
Set the branch to “main”, add a new remote origin, and push your changes. The 3 commands to do so are provided below, as an example:
[Note]: Whenever you clone your repo to another folder or device, you must install dependencies again:
# Step 1: Install Node.js LTS, for Mac OSX (after installing npx)
nvm install --lts
nvm use --lts
# Step 1: Install Node.js LTS, for Windows (after installing npx-windows)
nvm install lts
nvm use lts
# Step 2: Create a _Framework_ Project
npx @observablehq/framework@latest create
# Step 3: Run a Development Preview Server
npm run dev
# Step 4: Connecting an Empty Github Repo
git add -A
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:[USERNAME]/[PROJECT_NAME].git
git push -u origin mainsrc/ folder.Let’s Run a Live Demo!
Look up our other guides on Framework, if you wish to learn more.
We only have approx. 1-2 weekly exercises remaining. Exercises will transition away from inspecting specific code into general “did you achieve these visualizations reasonably?”-esque prompts.
We will soon migrate into two new deliverables for the course:
We will place more emphasis on our class’ AI Policy:
… you can use generative AI tools to do the assignments in this class. If you use an AI to guide you in completing an assignment, you must disclose which parts were generated by the AI. Remember that you are responsible for any errors or inaccuracies in AI-generated content, and you must be able to explain all submitted work.
Basically if you use AI for any exercises, mini-projects, milestone deliverables, or even for the final group project, you MUST disclose where and how you used it.
Spend the remainder of the class searching for teammates or datasets to focus working on. Aim to find a group by the end of class today, and report back to us your group members via this Google Form.
The best groups are those that communicate with each other well, are honest with each other, and are not afraid to ask questions.
