Skip to main content
100%

Fork of Basic Scatter Plot with React & D3

✓ Published1🌍 Public
RRyan Offstein
Last edited Sep 9, 2025
Created on Sep 9, 2025

A React and D3 scatter plot visualizes hospital readmission metrics across U.S. states, comparing the number of hospitals performing worse versus better than the national average for each measure. The code loads CSV data, converts non-numeric values to NaN, and filters out invalid points before rendering circles with d3.scaleLinear. The `viz` function uses `selectAll` and `data().join()` to bind points, with padding applied to the x and y axes. The dataset comes from CMS hospital readmission rates per state.

AI-generated description

This is my dataset of hospital readmission rates per state.

Scatter Plot

  • The scatter plot Draws a point on the graph for each state and for each of the 5 or so readamission metrics across diseases
  • On the X axis we have "Number of Hospitals Worse" than the national average
  • On the Y axis we have "Number of Hospitals Better" than the national average
  • So The bottom right would contain the states that have really poor readmission rates for a disease when compared to the national average,
  • and top left data points would have less readmission rates than the national average for that readmission type

Data

  • Here is a link to the data

  • What it does is look at all the hospitals in each state, and count the hospitals and their comparison to national averages across metricsk

  • It tracks the readmission rates for people of different diseses such as heart failure, pneumonia...

  • It also tracks the numerical values of the average number of return days

Attributes

  • Here are the attributes
    • State
      • Categorical (Geographic)
    • Measure ID
      • Categorical
    • Measure Name
      • Categorical
    • Number of Hospitals Worse
      • Quantitative
    • Number of Hospitals Same
      • Quantitative
    • Number of Hospitals Better
      • Quantitative
    • Number of Hospitals Too Few
      • Quantitative
    • Start Date
      • Time
    • End Date
      • Time
    • Number of Hospitals Fewer
      • Quantitative
    • Number of Hospitals Average
      • Quantitative
    • Number of Hospitals More
      • Quantitative
    • Number of Hospitals Too Small
      • Quantitative
MIT Licensed

Similar vizzes