Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

US dams example dashboard #1350

Merged
merged 55 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
a99aba6
us-dams example
May 15, 2024
ce4c89f
update table, chart heights, some org
May 15, 2024
6d3649c
update condition order in histogram
May 15, 2024
60e3217
remove unrelated examples/hotel-bookings/dist
Fil May 15, 2024
8e5f23a
clean up overview a bit
May 15, 2024
83db21f
Merge branch 'allison/dams-example' of https://github.com/observableh…
May 15, 2024
60fb29a
fix path for dams example
allisonhorst May 16, 2024
60db5ed
fix path in us-states loader
allisonhorst May 16, 2024
2d558e6
Reorder condition: Satisfactory better than Fair (per data dictionary…
pettiross May 16, 2024
ad06359
deck.gl dams map tinkering
allisonhorst May 16, 2024
73bd374
deck.gl hexagon layer updates
allisonhorst May 16, 2024
89e3a9e
start adding charts to index
allisonhorst May 17, 2024
7396d38
Color and format tweaks on Plots
pettiross May 17, 2024
8753466
map updates, add overview charts, incorporate Jeff's changes
May 17, 2024
46bb7e8
Update nationwide overview charts, incorporate Jeff changes
May 17, 2024
63541c3
add search to table, finish homepage layout
May 17, 2024
fc33e91
switch homepage map to scatter with fill by condition
May 17, 2024
06ba8e8
update legend in nationwide map
May 17, 2024
2e6d68a
edits
May 17, 2024
8d08d63
update overview page and by-state dashboard
May 20, 2024
902ac5a
fix text color and add tooltips in purpose chart
May 20, 2024
3ad46e7
overview back to 3d hexbin map
May 21, 2024
12ad749
clean up code, delete unused, add comments, update ReadMe
May 21, 2024
9d4353a
Merge branch 'main' into allison/dams-example
May 21, 2024
8942ce0
Update ReadMe based on other examples, incorporate Fil feedback
May 21, 2024
b2e3a31
fix map re-run code to avoid overlap on selection
May 21, 2024
e079cea
Merge branch 'main' into allison/dams-example
May 22, 2024
aa86900
gets polygons from us-atlas, calculates centroids
May 22, 2024
11475a8
Update examples/us-dams/package.json
allisonhorst May 22, 2024
35cc8d1
Update examples/us-dams/package.json
allisonhorst May 22, 2024
9153ab6
Update examples/us-dams/README.md
allisonhorst May 22, 2024
6b6d566
moves dam data to data loader, updates data descriptions in ReadMe
May 22, 2024
d1420bb
Merge branch 'allison/dams-example' of https://github.com/observableh…
May 22, 2024
7cd39eb
update config file to match other examples
May 22, 2024
1da2c24
remove leftover display
May 22, 2024
4240927
adds sidebar back
May 22, 2024
6bd68a9
title change
May 22, 2024
ce706d4
fix conditionHeatmap height
Fil May 28, 2024
b194aa2
Merge branch 'main' into allison/dams-example
allisonhorst Jun 4, 2024
81e16f1
Add description to examples ReadMe, add webp images
allisonhorst Jun 4, 2024
5b37367
Merge branch 'allison/dams-example' of https://github.com/observableh…
allisonhorst Jun 4, 2024
2c32427
Apply suggestions from code review
allisonhorst Jun 5, 2024
846b179
match bubble chart orders to nationwide page
allisonhorst Jun 5, 2024
8fa54ea
code formatting, updates purpose barchart labels
allisonhorst Jun 5, 2024
ca32b88
update config keeping sidebar
allisonhorst Jun 5, 2024
d15077f
fine tune conditional text
allisonhorst Jun 5, 2024
03f06e7
Merge branch 'main' into allison/dams-example
allisonhorst Jun 14, 2024
9dabdc9
clean up unused columns in loader
allisonhorst Jun 14, 2024
e013faf
Merge branch 'main' into allison/dams-example
Fil Jun 18, 2024
074b81a
small edits
Fil Jun 18, 2024
4632622
condition
Fil Jun 18, 2024
0662a38
Merge branch 'main' into allison/dams-example
allisonhorst Jun 18, 2024
c0e5e22
Merge branch 'main' into allison/dams-example
allisonhorst Jun 18, 2024
bb0ce9a
update example readme, data directly from NID API
allisonhorst Jun 18, 2024
9520d50
resize webp thumbnails
allisonhorst Jun 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions examples/us-dams/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.DS_Store
dist/
src/.observablehq/cache/
node_modules/
yarn-error.log
src/.observablehq/deploy.json
53 changes: 53 additions & 0 deletions examples/us-dams/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# US dams

This is an [Observable Framework](https://observablehq.com/framework) project. To start the local preview server, run:
allisonhorst marked this conversation as resolved.
Show resolved Hide resolved

```
npm run dev
```

Then visit <http://localhost:3000> to preview your project.

For more, see <https://observablehq.com/framework/getting-started>.

## Project structure

A typical Framework project looks like this:

```ini
.
├─ docs
allisonhorst marked this conversation as resolved.
Show resolved Hide resolved
│ ├─ components
│ │ └─ timeline.js # an importable module
│ ├─ data
│ │ ├─ launches.csv.js # a data loader
│ │ └─ events.json # a static data file
│ ├─ example-dashboard.md # a page
│ ├─ example-report.md # another page
│ └─ index.md # the home page
├─ .gitignore
├─ observablehq.config.js # the project config file
├─ package.json
└─ README.md
```

**`docs`** - 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/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.

**`docs/index.md`** - This is the home page for your site. You can have as many additional pages as you’d like, but you should always have a home page, too.

**`docs/data`** - You can put [data loaders](https://observablehq.com/framework/loaders) or static data files anywhere in your source root, but we recommend putting them here.

**`docs/components`** - You can put shared [JavaScript modules](https://observablehq.com/framework/javascript/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.

**`observablehq.config.js`** - This is the [project configuration](https://observablehq.com/framework/config) file, such as the pages and sections in the sidebar navigation, and the project’s title.

## Command reference

| Command | Description |
| ----------------- | -------------------------------------------------------- |
| `npm install` | Install or reinstall dependencies |
| `npm run dev` | Start local preview server |
| `npm run build` | Build your static site, generating `./dist` |
| `npm run deploy` | Deploy your project to Observable |
| `npm run clean` | Clear the local data loader cache |
| `npm run observable` | Run commands like `observable help` |
28 changes: 28 additions & 0 deletions examples/us-dams/observablehq.config.js
allisonhorst marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// See https://observablehq.com/framework/config for documentation.
export default {
// The project’s title; used in the sidebar and webpage titles.
title: "US dams",

// The pages and sections in the sidebar. If you don’t specify this option,
// all pages will be listed in alphabetical order. Listing pages explicitly
// lets you organize them into sections and have unlisted pages.
// pages: [
// {
// name: "Examples",
// pages: [
// {name: "Dashboard", path: "/example-dashboard"},
// {name: "Report", path: "/example-report"}
// ]
// }
// ],

// Some additional configuration options and their defaults:
// theme: "default", // try "light", "dark", "slate", etc.
// header: "", // what to show in the header (HTML)
// footer: "Built with Observable.", // what to show in the footer (HTML)
toc: false // whether to show the table of contents
// pager: true, // whether to show previous & next links in the footer
// root: "src", // path to the source root for preview
// output: "dist", // path to the output root for build
// search: true, // activate search
};
25 changes: 25 additions & 0 deletions examples/us-dams/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "module",
"private": true,
"scripts": {
"clean": "rimraf docs/.observablehq/cache",
allisonhorst marked this conversation as resolved.
Show resolved Hide resolved
"build": "rimraf dist && observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
},
"dependencies": {
"@observablehq/framework": "latest",
allisonhorst marked this conversation as resolved.
Show resolved Hide resolved
"d3-dsv": "^3.0.1",
"d3-time-format": "^4.1.0",
"fs": "^0.0.1-security",
allisonhorst marked this conversation as resolved.
Show resolved Hide resolved
"topojson-client": "^3.1.0",
"topojson-simplify": "^3.0.3"
},
"devDependencies": {
"rimraf": "^5.0.5"
},
"engines": {
"node": ">=18"
}
}
Loading