Public
Edited
Aug 22, 2023
4 forks
Importers
24 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// tlDateFormat = d3.timeFormat("%a, %b %e"); // Timeline Tooltip Date Format
tlDateFormat = d3.timeFormat("%a, %b %e %Y"); // Timeline Tooltip Date Format
Insert cell
Insert cell
Insert cell
Insert cell
eventTip = d3.select("body").append("div").attr("class", "toolTip eventTip");
Insert cell
Insert cell
Insert cell
Insert cell
// Formats
Insert cell
Insert cell
Insert cell
Insert cell
// Moving Average Function from @d3/moving-average
Insert cell
Insert cell
// Dateset with moveing average processed and separate map by date for tooltip value lookup
Insert cell
Insert cell
// Primary Data Object
Insert cell
Insert cell
// Array to map the longer column heading on the source file to more usable ids
Insert cell
Insert cell
Insert cell
// Custom data dictionary to hold labels and color information for each more.
Insert cell
Insert cell
// Raw data file that MTA hosts
Insert cell
Insert cell
Insert cell
// Lighten/Darker color functions
// https://css-tricks.com/snippets/javascript/lighten-darken-color). - Wasn't working on some lighter colors
// https://stackoverflow.com/questions/5560248/programmatically-lighten-or-darken-a-hex-color-or-rgb-and-blend-colors) > Requries rgb color
Insert cell
Insert cell
Insert cell
// Custom force to handle rectangle collision on the force label placement
Insert cell
Insert cell
// slightly modified version of https://observablehq.com/@bumbeishvili/input-groups
Insert cell
Insert cell
// imported observable componenets
Insert cell
Insert cell
Insert cell
import {rangeSlider} from "@mootari/range-slider"
Insert cell
// load d3
Insert cell
d3 = require("d3@6")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
md`### !! Unsued or in development components`
Insert cell
// Previous Select Option for Ridership Chart
Insert cell
Insert cell
// Non working select elements. Decided to use @jashkenas/inputs instead
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more