@@ -67,7 +67,7 @@ const viz6: React.FC = () => {
6767
6868 // Filters
6969 const [ manufacturer , setManufacturer ] = useState ( 'Any' )
70- const [ airline , setAirline ] = useState ( 'Any' )
70+ // const [airline, setAirline] = useState('Any')
7171 const [ departure , setDeparture ] = useState ( 'Any' )
7272 const [ arrival , setArrival ] = useState ( 'Any' )
7373 const [ decadeFrom , setDecadeFrom ] = useState ( 'Any' )
@@ -118,7 +118,6 @@ const viz6: React.FC = () => {
118118 const total = data . combinations . reduce ( ( sum , c ) => {
119119 if ( ! validDecades . has ( c . decade ) ) return sum
120120 if ( manufacturer !== 'Any' && c . manufacturer !== manufacturer ) return sum
121- if ( airline !== 'Any' && c . airline !== airline ) return sum
122121 if ( departure !== 'Any' && c . departure !== departure ) return sum
123122 if ( arrival !== 'Any' && c . arrival !== arrival ) return sum
124123 return sum + c . incidents
@@ -131,7 +130,7 @@ const viz6: React.FC = () => {
131130 totalIncidents : total ,
132131 decadesInRange : numDecades ,
133132 }
134- } , [ data , decadeFrom , decadeTo , manufacturer , airline , departure , arrival ] )
133+ } , [ data , decadeFrom , decadeTo , manufacturer , departure , arrival ] )
135134
136135 // ── D3 chart ─────────────────────────────────────────────────────────────
137136 useEffect ( ( ) => {
@@ -314,20 +313,8 @@ const viz6: React.FC = () => {
314313 : [ ]
315314
316315 return (
317- < div className = "section" id = "section5 " >
316+ < div className = "section" id = "section6 " >
318317 < div className = "viz-container" >
319- < div className = "paragraph" >
320- < p className = "section-badge" > / Visualization 06</ p >
321- < h1 className = "viz-title" > Modelling your flight's crash risk</ h1 >
322- < p >
323- Using a Poisson process, we model crashes as a rate λ — the mean
324- number of incidents per year for a filtered subset of the data.
325- The chart shows the full probability distribution P(X = k): the
326- chance of exactly k crashes occurring in any given year. Filter by
327- manufacturer, airline, departure city, arrival city, and decade range.
328- </ p >
329- </ div >
330-
331318 < div className = "widget" ref = { widgetRef } >
332319 < button className = "fullscreen-btn" aria-label = "Toggle Fullscreen" onClick = { toggle } >
333320 < svg viewBox = "0 0 24 24" width = "18" height = "18" fill = "none" stroke = "currentColor" strokeWidth = "1.75" strokeLinecap = "round" strokeLinejoin = "round" >
@@ -355,12 +342,6 @@ const viz6: React.FC = () => {
355342 { data ?. manufacturers . map ( m => < option key = { m } value = { m } > { m } </ option > ) }
356343 </ select >
357344
358- < span className = "viz6-ctrl-label" > Airline</ span >
359- < select className = "viz6-ctrl-select" value = { airline } onChange = { e => setAirline ( e . target . value ) } >
360- < option value = "Any" > Any</ option >
361- { data ?. airlines . map ( a => < option key = { a } value = { a } > { a } </ option > ) }
362- </ select >
363-
364345 < div className = "viz6-ctrl-sep" />
365346
366347 < span className = "viz6-ctrl-label" > Dep.</ span >
@@ -428,6 +409,18 @@ const viz6: React.FC = () => {
428409 </ div >
429410 </ div >
430411 </ div >
412+
413+ < div className = "paragraph" >
414+ < p className = "section-badge" > / Visualization 06</ p >
415+ < h1 className = "viz-title" > Modelling your flight's crash risk</ h1 >
416+ < p >
417+ Using a Poisson process, we model crashes as a rate λ — the mean
418+ number of incidents per year for a filtered subset of the data.
419+ The chart shows the full probability distribution P(X = k): the
420+ chance of exactly k crashes occurring in any given year. Filter by
421+ manufacturer, airline, departure city, arrival city, and decade range.
422+ </ p >
423+ </ div >
431424 </ div >
432425 </ div >
433426 )
0 commit comments