Viewing a saved revision (read-only)
d2SnX37jz-PwxtYtAaHzS
This example demonstrates a minimal Hello World visualization created with D3 v6, displaying the text “Hello VizHub!” centered on the page. It showcases VizHub’s support for loading D3 from UNPKG, importing D3 API functions like `select`, and combining local ES6 modules such as `message.js` alongside HTML and CSS. The rendering approach uses the DOM—D3’s `select` method targets the `#message` div to set its text content, with styling controlled by the linked `styles.css` file. This serves as a template for more complex projects.
Toronto Neighbourhood Crime Dashboard - Four-page version
Files:
- index.html: Toronto choropleth map
- trend.html: annual trend and 2026-2027 projection
- categories.html: category comparison
- neighbourhoods.html: top neighbourhoods
- styles.css: shared layout
- common.js: shared CSV loading and filters
Place Neighbourhood_Crime_Rates_Open_Data_5187007239983414201.csv in this folder. Open the folder with VS Code Live Server. Internet access is required for ECharts, Papa Parse, and the City of Toronto ArcGIS GeoJSON service (gis.toronto.ca).
Year filtering: Pages 1, 3, and 4 share one selected calendar year using browser localStorage. Page 2 intentionally remains a multi-year trend/projection page.
Map tooltip: neighbourhood, selected year, total incidents, crime rate per 100,000, leading crime type/count, and year-over-year change. Increases are red; decreases are green.
Page 1 includes a visible legend for map crime intensity and tooltip year-over-year direction: red increase, green decrease, grey no change.