Skip to main content
Unlisted

Share visualization

Loading preview…

Data Analysis

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Choose how to deliver this visualization

Anyone with the link can view this unlisted visualization. Posting it publicly will make the link discoverable.

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportHTML, source ZIP

Viewing a saved revision (read-only)

qCrkyqIzHdaHWKy2r0a-c

Data Analysis

0 stars2Unlisted
BBrian Jin
Last edited Nov 11, 2026
Created on Nov 11, 2026

Created from react-d3-starter template

NYC Restaurant Neighborhood Datasets

An interactive choropleth maps the count of restaurant records in restaurants.csv to neighborhood polygons in nbhd.geo.json. The map only includes features whose GeoJSON properties.id matches a restaurant nbhd_id; it does not infer matches from neighborhood names.

Dataset inventory

Counts below are those supplied in the project profile. The JSON profile reports each JSON file as one top-level object; that is not the number of records/features nested within it.

restaurants.csv

  • Known size: 30,605 data rows; 12 columns.
  • Apparent subject: restaurant inspection/listing records with restaurant identity, classification, neighborhood and coordinates.
  • Parsing: loaded with D3 csv, which parses a standards-compliant CSV record stream. The header is the first CSV record, not a presumed physical line; quoted fields and embedded newlines are handled by the parser. D3 initially returns cell values as strings. Numeric coordinates are converted only for validation; counts use records, not CAMIS deduplication.
  • Missingness: the supplied profile reports zero missing values in all fields. This does not rule out blank strings or semantic invalidity; the visualization rejects invalid coordinates and skips blank neighborhood IDs.
Exact field Tentative meaning Munzner classification
camis Restaurant/city inspection identifier; profile says numeric, but identifier values should be treated as labels, not measurements. Nominal
name Restaurant name as recorded. Nominal
brand Brand/group label. Nominal
brand_locations Number of locations associated with the brand; numeric quantity. Quantitative
tier Restaurant/chain-size classification. Ordinal only if the category definitions establish an order; otherwise nominal.
cuisine Cuisine category. Nominal
lat Latitude in decimal degrees. Geographic coordinates
lon Longitude in decimal degrees. Geographic coordinates
nbhd_id Neighborhood identifier. Geographic identifier
nbhd_name Neighborhood name label. Geographic identifier
boro Borough label. Geographic identifier
not_yet_inspected Boolean inspection-status indicator. Nominal (binary)

No explicit temporal field is present. Restaurant coordinates are accepted only when both values parse to finite numbers within valid latitude/longitude ranges. The visualization counts input records; if multiple rows refer to one establishment, the count is not a distinct-establishment count unless the source guarantees one row per establishment.

nbhd.geo.json

  • Known size: 340,812 bytes; profile reports one top-level JSON object with two keys. The nested feature count is not stated in the profile.
  • Apparent subject: GeoJSON neighborhood boundary features. The supplied sample shows a FeatureCollection; each feature has polygon geometry and properties including an ID, name, borough, counts and shares.
  • Parsing: loaded as JSON. GeoJSON coordinates are longitude/latitude coordinate pairs. No geometry repair or CRS conversion beyond D3's map projection is applied.
  • Missingness: profile reports no missing top-level type or features; this says nothing about nested properties. Sample properties.type is null. Feature-level missingness must be evaluated from the actual file.
Exact field/path Tentative meaning Munzner classification
type GeoJSON object type, expected to identify a FeatureCollection. Nominal
features Array of neighborhood GeoJSON features (the profile calls this field a string, but the provided sample establishes nested JSON structure). Geographic identifiers / structured spatial data
features[].type GeoJSON feature type, typically Feature. Nominal
features[].properties.id Neighborhood feature identifier; sample uses values such as N000. Geographic identifier
features[].properties.name Neighborhood name. Geographic identifier
features[].properties.boro Borough name. Geographic identifier
features[].properties.type Additional feature type; sample is null, semantics unknown. Nominal
features[].properties.n_restaurants A restaurant count included in the sample; source definition and relationship to the CSV are unverified. Quantitative
features[].properties.counts.independent Sample count for independent establishments. Quantitative
features[].properties.counts.mini_chain Sample count for mini-chain establishments. Quantitative
features[].properties.counts.chain Sample count for chain establishments. Quantitative
features[].properties.counts.big_chain Sample count for big-chain establishments. Quantitative
features[].properties.shares.independent Sample proportion/share for independent establishments. Quantitative
features[].properties.shares.mini_chain Sample proportion/share for mini-chain establishments. Quantitative
features[].properties.shares.chain Sample proportion/share for chain establishments. Quantitative
features[].properties.shares.big_chain Sample proportion/share for big-chain establishments. Quantitative
features[].geometry.type GeoJSON geometry type, such as Polygon. Nominal
features[].geometry.coordinates Nested coordinate arrays defining polygon rings; GeoJSON order is longitude, latitude. Geographic coordinates

The paths listed reflect the nested structure in the supplied sample; actual features may omit properties or use additional properties. geometry is standard GeoJSON structure, not a separately profiled top-level column.

nbhd_stats.json

  • Known size: 49,211 bytes; profile reports one top-level object and 195 columns/keys.
  • Apparent subject: neighborhood statistics keyed by short NYC-style codes. The JSON object is presented as many code-like keys (BK88, QN51, MN06, etc.), but the supplied profile does not reveal values or names/definitions of measures.
  • Parsing: loaded as JSON. The actual nested shape and meaning of each value must be inspected before analysis; no assumptions are made that codes are neighborhood IDs.
  • Missingness: the supplied profile marks all 195 keys as nonmissing strings. This is a type inference for the profiled values, not confirmation that all are meaningful measures.
  • Fields: all 195 exact keys are listed below. Their tentative meaning is “unidentified key/value in the neighborhood statistics object”; no defensible assignment to a statistic or geography is available from the schema alone.
Exact key Tentative meaning Munzner classification
BK88, QN51, QN27, QN07, MN06, BK25, BX59, QN41, QN08, QN25, QN06, BK44, BK41, BK95, BX33, BK69, QN61, QN01, BX10, QN33, BK43, BK26, BK29, BK72, BK75, BK35, BK79, BK61, BK63, BK96, BX31, BK93, BK91, BK78, BK77, QN20, BK46, BK68, QN68, BX08, BX46, BX55, BK30, BK23, QN19, BX28, QN38, SI99, MN15, QN18, QN26, QN34, QN43, QN21, QN29, QN66, BX62, BX07, BK85, QN55, BK27, BK28, QN30, QN50, QN23, QN37, QN63, BX98, SI12, SI48, BX44, SI28, BK73, BK81, BX52, QN54, QN62, MN27, SI01, MN25, QN17, MN14, MN17, MN40, QN53, SI54, BK60, BX26, BK21, BX22, BX29, BK40, BK64, BX27, BK50, BK42, BK58, QN44, QN45, QN35, QN60, BX09, QN28, BK37, SI11, SI32, MN03, BK82, BK83, MN32, QN48, QN52, BX34, BX39, MN28, BX01, BX35, BX75, MN21, MN01, MN22, MN24, MN13, MN23, MN12, BX43, BX05, BX40, BX41, BX03, BX13, BX06, BX17, BK17, BK19, QN10, QN12, SI08, SI37, QN03, QN05, SI25, SI45, BK90, SI14, SI36, QN15, QN70, BK09, BK38, BK45, BK99, MN50, BX37, BX49, BX99, BK33, BK76, MN20, QN46, BX14, BX63, MN04, MN36, MN35, MN09, MN33, MN19, QN31, MN31, QN71, MN99, QN72, SI07, QN98, QN47, SI05, SI24, MN11, MN34, QN22, QN49, QN02, QN76, BK34, QN42, QN99, BK31, BK32, BX30, BX36, SI35, SI22, QN56, QN57 Unidentified per-key value; field meaning and value semantics cannot be inferred safely. Unclassified pending inspection

The 195 names are exact keys reported by the authoritative profile. Their string type does not establish whether a value is a category, identifier, date, or numeric quantity.

Defensible relationships and join caveats

  • The map relates restaurants.csv.nbhd_id to nbhd.geo.json.features[].properties.id. This is supported by the shared N###-style identifiers in the provided examples and can be checked against the runtime values. The visualization uses exact string equality and draws only geometry features with at least one valid-coordinate restaurant record carrying that ID.
  • The visualization does not join on nbhd_name to GeoJSON properties.name; names can vary in spelling, casing, punctuation or coverage. Borough is not used as a fallback key.
  • The GeoJSON sample contains precomputed restaurant counts and shares, but their source, date, record grain and category definitions are not established. They are not substituted for counts recomputed from the CSV.
  • nbhd_stats.json keys look code-like, but no matching key field or encoding is established. Do not join these keys to restaurant neighborhood IDs or GeoJSON feature IDs merely because both look like geographic codes.
  • Restaurant camis is an identifier, but its uniqueness and row grain are not verified. Brand location count is a brand-level value repeated across restaurant rows and should not be summed as though it were a per-restaurant quantity.
  • There are no temporal fields in the supplied restaurant column list, so inspection-time trends cannot be inferred.

Visualization mappings

  • Type: neighborhood choropleth map.
  • Data: restaurants.csv and nbhd.geo.json.
  • Spatial geometry: GeoJSON polygon coordinates projected to a responsive map using D3 Mercator fitting.
  • Neighborhood key: exact string match from CSV nbhd_id to GeoJSON feature properties.id.
  • Measure: count of CSV records by neighborhood, after requiring valid latitude/longitude and a nonblank neighborhood ID.
  • Color: sequential light-to-dark blue fill, scaled to the largest displayed neighborhood count for the selected tier.
  • Filter: dropdown for tier; “All tiers” is the default. Counts and map fill update with the selection.
  • Interaction: click or keyboard-activate a polygon to select it and display its name, borough and filtered record count; the close control clears selection. Hover title text and accessible labels expose neighborhood/count context.
  • Rationale: a choropleth makes the geographic distribution of neighborhood-level records legible without relying on an unverified join to the statistics object. The measure is explicitly a count of CSV rows, not population-adjusted density or unique establishments.

Files

  • index.html — page shell and CDN import map.
  • index.jsx — React mount point.
  • App.jsx — runtime dataset loading, validated join, filtering and map rendering.
  • styles.css — responsive layout and accessible visual styling.

Visualization Ideas

  1. Independent-Share Choropleth

    • Main question: Which neighborhoods still have the most independent restaurants, and which have lost that character?
    • Data fields: restaurants.csv nbhd_id, tier; nbhd.geo.json properties.id, name, boro.
    • Visual encoding: Choropleth filled by the share of records with tier = independent, on a diverging or sequential scale with a labeled midpoint at the citywide share.
    • Interaction/annotation: Hover tooltip with the share and the count. Annotate the highest and lowest neighborhoods.
    • Implementation note: Group the CSV by nbhd_id, divide independent rows by all rows, and join to the GeoJSON by exact ID. This extends the existing count choropleth in App.jsx. Verify the actual tier values at runtime.
  2. Chain-Penetration Map (Non-Independent Share)

    • Main question: Where are mini-chains, chains and big chains concentrated?
    • Data fields: tier, nbhd_id, brand_locations.
    • Visual encoding: Choropleth of the share of non-independent records, with a small tier selector that switches between mini_chain, chain, big_chain and combined.
    • Interaction/annotation: Dropdown or segmented control. Legend note that this is a share of records, not of revenue.
    • Implementation note: Reuse the existing tier filter state, but compute a ratio instead of a count.
  3. Tier-Mix Small Multiples Map

    • Main question: Do the four tiers occupy different parts of the city?
    • Data fields: tier, nbhd_id, GeoJSON geometry.
    • Visual encoding: Four mini choropleths in a 2×2 grid, one per tier, each with its own sequential hue and a shared layout.
    • Interaction/annotation: Hovering a neighborhood in one panel highlights it in all four.
    • Implementation note: Render one geoPath per tier from the same projection and share a hovered-ID state.
  4. Neighborhood Similarity Matrix

    • Main question: Which neighborhoods have near-identical restaurant profiles, as the "same-ification" idea suggests?
    • Data fields: nbhd_id, nbhd_name, tier, cuisine, boro.
    • Visual encoding: Heatmap matrix with neighborhoods on both axes, ordered by hierarchical clustering. Color is cosine similarity of tier and cuisine share vectors.
    • Interaction/annotation: Brush a block to highlight its members on the map. Group boundaries by boro.
    • Implementation note: Build a feature vector per neighborhood from the CSV, compute pairwise similarity in a useMemo, and cluster with d3-hierarchy. With roughly 195 neighborhoods this is feasible, but use canvas if SVG is slow.
  5. Click-to-Compare Similarity Map

    • Main question: Which neighborhoods look most like the one I select?
    • Data fields: nbhd_id, cuisine, tier, brand.
    • Visual encoding: Recolor the map by similarity to the selected neighborhood. The selected polygon gets a bold outline.
    • Interaction/annotation: Clicking a polygon sets the reference, building on the existing selection. A side card lists the top five most similar neighborhoods.
    • Implementation note: Compute a similarity vector once, then take the matrix row for the selected ID. Show the similarity measure in the legend.
  6. Neighborhood Embedding Scatterplot

    • Main question: Do neighborhoods form natural clusters by restaurant makeup, and does geography explain them?
    • Data fields: nbhd_id, tier, cuisine, boro.
    • Visual encoding: Each neighborhood is a point in a 2D projection (PCA or classical MDS) of its profile vector. Color is boro and size is restaurant count.
    • Interaction/annotation: Linked brushing between the scatterplot and the map. Label outliers.
    • Implementation note: Implement PCA on a small matrix in plain JS. Projection axes are abstract, so say so in a caption.
  7. Tier Composition Stacked Bars by Neighborhood

    • Main question: What is the independent/mini-chain/chain/big-chain mix in each neighborhood?
    • Data fields: nbhd_name, tier, boro.
    • Visual encoding: 100% horizontal stacked bars, sorted by independent share, with a categorical tier palette that stays consistent across views.
    • Interaction/annotation: Filter by borough. Hover a bar to highlight the polygon on the map. Toggle between share and count.
    • Implementation note: Use d3.rollup over nbhd_id and tier, and virtualize or paginate the long list.
  8. Borough Tier-Mix Comparison

    • Main question: Do the boroughs differ in how homogeneous their restaurant scenes are?
    • Data fields: boro, tier.
    • Visual encoding: Five 100% stacked columns, or a slope-style dot plot of independent share per borough.
    • Interaction/annotation: Click a borough to zoom the map to it and filter all views.
    • Implementation note: Aggregate by boro, use fitExtent on the borough's features, and keep the borough-label casing consistent.
  9. Diversity (Entropy) Choropleth

    • Main question: Which neighborhoods have the least varied restaurant offerings?
    • Data fields: nbhd_id, cuisine.
    • Visual encoding: Choropleth of normalized Shannon entropy of cuisine counts, with low entropy meaning a homogeneous scene. Use a sequential scale with a clear legend.
    • Interaction/annotation: Tooltip showing the dominant cuisine and its share.
    • Implementation note: Compute entropy per neighborhood and normalize by log of the number of distinct cuisines. Set a minimum restaurant count so tiny neighborhoods don't distort the scale.
  10. Top Cuisines Heatmap

    • Main question: Which cuisines define which neighborhoods?
    • Data fields: cuisine, nbhd_name, nbhd_id.
    • Visual encoding: Heatmap with neighborhoods as rows and the top N cuisines as columns, colored by the cuisine's share within the neighborhood. Rows are clustered.
    • Interaction/annotation: Click a cuisine column to recolor the map by that cuisine's share.
    • Implementation note: Limit to the top 15–20 cuisines plus an "Other" bucket for readability.
  11. Brand Footprint Map for Mini-Chains

    • Main question: Where have scaling mini-chains such as the brands named in the brief spread?
    • Data fields: brand, brand_locations, tier, lat, lon, nbhd_id.
    • Visual encoding: Dot map of individual restaurants over faint neighborhood outlines. Dots are filtered to a chosen brand, and color marks brand versus others.
    • Interaction/annotation: A brand search box with autocomplete. Show the count of neighborhoods that contain the brand.
    • Implementation note: Project lat and lon with the existing projection and validate coordinates first. Treat brand_locations as a brand-level value, not a summable one.
  12. Brand Reach Ranking

    • Main question: Which brands are the most widespread across neighborhoods, not just the largest?
    • Data fields: brand, nbhd_id, tier, brand_locations.
    • Visual encoding: Horizontal lollipop chart of the distinct neighborhoods per brand, with dot color by tier. A second marker shows brand_locations.
    • Interaction/annotation: Clicking a brand cross-filters the map to its locations.
    • Implementation note: Count unique nbhd_id values per brand. Compare against brand_locations to flag brands with gaps in the data.
  13. Hexbin Density of Chain Restaurants

    • Main question: Where does chain density cluster, independent of neighborhood boundaries?
    • Data fields: lat, lon, tier.
    • Visual encoding: Hexagonal bins colored by the share of non-independent records. Opacity encodes the count so sparse hexes are muted.
    • Interaction/annotation: Toggle between neighborhood boundaries and hexes to expose boundary effects.
    • Implementation note: Use a small hand-written hex grid, or d3-hexbin loaded from CDN with the same import-map style. Check the modifiable areal unit problem in the caption.
  14. Dumbbell Plot: Chains vs Independents Ranking

    • Main question: Which neighborhoods have the biggest gap between big-chain and independent presence?
    • Data fields: nbhd_name, tier.
    • Visual encoding: Dumbbell chart with two dots per neighborhood (independent share and big_chain share) on a shared axis, sorted by gap.
    • Interaction/annotation: Hover a dumbbell to highlight its polygon. Annotate the neighborhoods at the extremes.
    • Implementation note: Compute shares from the CSV and show the top and bottom 15 to keep the chart legible.
  15. Bivariate Choropleth: Size vs Independence

    • Main question: Are busy restaurant neighborhoods also the most chain-heavy?
    • Data fields: nbhd_id, tier, and the record count per neighborhood.
    • Visual encoding: 3×3 bivariate color scheme crossing restaurant count terciles with independent-share terciles, plus a 2D legend.
    • Interaction/annotation: Hovering a legend cell highlights the matching neighborhoods.
    • Implementation note: Use d3.quantile thresholds and a hard-coded 9-color palette. Build the legend as a small SVG grid.
  16. Count vs Share Scatterplot

    • Main question: Is chain share related to the number of restaurants in a neighborhood?
    • Data fields: nbhd_id, tier, boro.
    • Visual encoding: Scatterplot with x as total restaurants (log scale), y as independent share, color as boro and size as mini-chain count. Add a trend line.
    • Interaction/annotation: Brush to select points and highlight them on the map. Label notable outliers.
    • Implementation note: Because there is no time field, say explicitly that this is a cross-sectional relationship. Do not call it causal.
  17. Mini-Chain Hotspot Ranking Bars

    • Main question: Which neighborhoods are most affected by the mini-chain scaling described in the brief?
    • Data fields: nbhd_name, tier, brand.
    • Visual encoding: Ranked bars of mini_chain share, with a segmented fill showing the top three brands in each neighborhood.
    • Interaction/annotation: Click a bar to open a detail card listing its brands. The map highlights the polygon.
    • Implementation note: Filter tier = mini_chain, group by nbhd_id and brand, and take the top three per group.
  18. Tier Treemap Drill-Down

    • Main question: How does the restaurant landscape break down from borough to neighborhood to tier to brand?
    • Data fields: boro, nbhd_name, tier, brand.
    • Visual encoding: Zoomable treemap with area as record count and color as tier.
    • Interaction/annotation: Click to zoom into a level, with breadcrumb navigation. Use the selected neighborhood from the map as the starting point.
    • Implementation note: Build the hierarchy with d3.rollup and d3.hierarchy. Cap very small brand tiles into an "Other" group.
  19. Not-Yet-Inspected Newcomer Overlay

    • Main question: Do recently listed, not-yet-inspected restaurants lean toward certain tiers or neighborhoods?
    • Data fields: not_yet_inspected, tier, nbhd_id, lat, lon.
    • Visual encoding: Dot map where records with not_yet_inspected true are drawn in an accent color over muted dots. A companion bar shows the tier mix of those records.
    • Interaction/annotation: Toggle that shows or hides the other restaurants. Caption that this is an inspection-status proxy, not a confirmed opening date.
    • Implementation note: Parse the string "True"/"False" explicitly. Treat this as a weak signal for newness, since the dataset has no temporal field.
  20. Cross-Check: Computed vs Precomputed GeoJSON Counts

    • Main question: Do the precomputed n_restaurants, counts and shares in the GeoJSON agree with the CSV?
    • Data fields: nbhd.geo.json properties.n_restaurants, properties.counts.*, properties.shares.*; restaurants.csv nbhd_id, tier.
    • Visual encoding: Scatterplot of the GeoJSON count (x) against the CSV-computed count (y) with a 45° reference line. Residual color highlights mismatches. A second small-multiple panel can compare shares.
    • Interaction/annotation: Hover a point for the neighborhood name and difference. Annotate the largest discrepancies.
    • Implementation note: Join on exact ID and flag unmatched features. This builds trust in the data before the audience interprets the maps, and nbhd_stats.json is left out because it has no verified join key.