What Does This Mean For Me?
Look for filters that specifically target your local contaminants
'Lead', 'current_level' => '9.8 ppb', 'safe_level' => '15 ppb', 'percentage' => 65, 'status' => 'Elevated', 'borough' => 'Bronx', 'affected' => 92450, 'health_risk' => 'Developmental issues, kidney problems', 'severity' => 'warning', 'simple_explanation' => 'Lead can harm brain development in children and cause kidney problems.', 'source' => 'Old pipes and plumbing fixtures', 'filter_type' => 'Activated carbon filters with NSF-53 certification' ], [ 'name' => 'PFAS', 'current_level' => '54 ppt', 'safe_level' => '70 ppt', 'percentage' => 77, 'status' => 'Elevated', 'borough' => 'Queens', 'affected' => 186720, 'health_risk' => 'Immune system issues, thyroid effects', 'severity' => 'warning', 'simple_explanation' => 'These "forever chemicals" may affect your immune system and thyroid.', 'source' => 'Industrial processes, food packaging, and some consumer products', 'filter_type' => 'Reverse osmosis systems or specialized PFAS filters' ], [ 'name' => 'Nitrates', 'current_level' => '3.2 mg/L', 'safe_level' => '10 mg/L', 'percentage' => 32, 'status' => 'Safe', 'borough' => 'Brooklyn', 'affected' => 45300, 'health_risk' => 'Blue baby syndrome in infants', 'severity' => 'success', 'simple_explanation' => 'Current levels are safe. High levels can affect how blood carries oxygen in infants.', 'source' => 'Fertilizers, septic systems, and natural deposits', 'filter_type' => 'Reverse osmosis or ion exchange systems' ], [ 'name' => 'Chlorine', 'current_level' => '2.1 mg/L', 'safe_level' => '4 mg/L', 'percentage' => 52, 'status' => 'Safe', 'borough' => 'All', 'affected' => 8400000, 'health_risk' => 'Eye and respiratory irritation at high levels', 'severity' => 'success', 'simple_explanation' => 'Current levels are safe. Chlorine is added to kill harmful bacteria.', 'source' => 'Added during water treatment to disinfect', 'filter_type' => 'Activated carbon filters or letting water sit for 24 hours' ], [ 'name' => 'E. coli', 'current_level' => '0.1%', 'safe_level' => '0%', 'percentage' => 100, 'status' => 'Violation', 'borough' => 'Staten Island', 'affected' => 12380, 'health_risk' => 'Gastrointestinal illness, diarrhea', 'severity' => 'danger', 'simple_explanation' => 'Can cause stomach problems and diarrhea. Any amount is a concern.', 'source' => 'Human or animal waste contamination', 'filter_type' => 'Boil water or use UV filters and sub-micron filtration' ] ]; $boroughs = [ [ 'name' => 'Manhattan', 'quality_score' => 87, 'letter_grade' => 'B+', 'lead_level' => 8.5, 'pfas_level' => 48, 'violations' => 1, 'affected' => 28750, 'percent_affected' => 1.8, 'risk' => 'Low', 'filter_needed' => 'Optional', 'recommendation' => 'Basic carbon filter for peace of mind' ], [ 'name' => 'Brooklyn', 'quality_score' => 83, 'letter_grade' => 'B', 'lead_level' => 9.2, 'pfas_level' => 51, 'violations' => 3, 'affected' => 76820, 'percent_affected' => 3.0, 'risk' => 'Medium', 'filter_needed' => 'Recommended', 'recommendation' => 'Carbon filter with lead reduction' ], [ 'name' => 'Queens', 'quality_score' => 81, 'letter_grade' => 'B-', 'lead_level' => 9.1, 'pfas_level' => 54, 'violations' => 2, 'affected' => 186720, 'percent_affected' => 8.2, 'risk' => 'Medium', 'filter_needed' => 'Recommended', 'recommendation' => 'Carbon filter with PFAS reduction' ], [ 'name' => 'Bronx', 'quality_score' => 78, 'letter_grade' => 'C+', 'lead_level' => 9.8, 'pfas_level' => 49, 'violations' => 4, 'affected' => 92450, 'percent_affected' => 6.5, 'risk' => 'High', 'filter_needed' => 'Strongly Recommended', 'recommendation' => 'Under-sink reverse osmosis system' ], [ 'name' => 'Staten Island', 'quality_score' => 85, 'letter_grade' => 'B', 'lead_level' => 8.9, 'pfas_level' => 47, 'violations' => 2, 'affected' => 12380, 'percent_affected' => 2.6, 'risk' => 'Low', 'filter_needed' => 'Optional', 'recommendation' => 'Basic carbon filter for taste improvement' ] ]; $hotspots = [ [ 'name' => 'South Bronx (Mott Haven, Hunts Point)', 'risk' => 'High', 'affected' => 35600, 'description' => 'Older infrastructure with lead service lines. Lead levels consistently above 90% of the EPA action limit.', 'primary_concerns' => 'Lead, infrastructure age', 'simple_solution' => 'NSF-certified filter for lead removal is essential', 'filter_type' => 'Under-sink reverse osmosis or NSF-53 certified lead filter' ], [ 'name' => 'Eastern Queens (Jamaica, St. Albans)', 'risk' => 'Medium', 'affected' => 68400, 'description' => 'Elevated PFAS levels likely due to proximity to industrial areas and JFK Airport.', 'primary_concerns' => 'PFAS, industrial runoff', 'simple_solution' => 'Specialized PFAS filter recommended', 'filter_type' => 'Reverse osmosis or specialized PFAS filter' ], [ 'name' => 'North Staten Island (St. George, Port Richmond)', 'risk' => 'Medium', 'affected' => 12380, 'description' => 'Recent E. coli incidents. Likely related to infrastructure issues during heavy rainfall events.', 'primary_concerns' => 'E. coli, rainfall overflow', 'simple_solution' => 'Filtration for bacteria removal recommended', 'filter_type' => 'UV purification with sub-micron filtration' ] ]; // Filter solutions for different concerns $filter_solutions = [ [ 'concern' => 'Lead', 'solution' => 'NSF-53 certified filter', 'description' => 'Reduces lead by over 99% when properly maintained', 'cost_range' => '$20-$45 for pitchers, $100-$200 for faucet systems', 'maintenance' => 'Replace filter every 2-3 months', 'benefits' => 'Protects brain development in children and reduces kidney issues in adults', 'image' => 'lead-filter.jpg' ], [ 'concern' => 'PFAS', 'solution' => 'Reverse osmosis system', 'description' => 'Most effective method for PFAS removal (95-99% reduction)', 'cost_range' => '$200-$500 for under-sink systems', 'maintenance' => 'Replace filters annually, membrane every 2-5 years', 'benefits' => 'Reduces exposure to chemicals linked to immune and hormone problems', 'image' => 'ro-system.jpg' ], [ 'concern' => 'Chlorine taste and odor', 'solution' => 'Activated carbon filter', 'description' => 'Improves taste and odor by removing chlorine', 'cost_range' => '$20-$50 for pitchers, $50-$100 for faucet mounts', 'maintenance' => 'Replace filter every 2-3 months', 'benefits' => 'Better tasting water encourages proper hydration', 'image' => 'carbon-filter.jpg' ] ]; // Get current page from URL parameter or default to 'dashboard' $page = isset($_GET['page']) ? $_GET['page'] : 'dashboard'; $borough = isset($_GET['borough']) ? $_GET['borough'] : ''; // Function to display badge with appropriate color function display_badge($text, $type) { $class = match($type) { 'High', 'Violation', 'Strongly Recommended' => 'danger', 'Medium', 'Elevated', 'Recommended' => 'warning', 'Low', 'Safe', 'Optional' => 'success', default => 'info' }; return "$text"; } // Function to calculate total affected population function calculate_total_affected($contaminants) { $total = 0; foreach ($contaminants as $contaminant) { if ($contaminant['status'] != 'Safe' && $contaminant['borough'] != 'All') { $total += $contaminant['affected']; } } return $total; } // Function to get a single borough's data function get_borough_data($boroughs, $borough_name) { foreach ($boroughs as $borough) { if ($borough['name'] === $borough_name) { return $borough; } } return null; } // Function to convert numerical score to letter grade function score_to_letter($score) { if ($score >= 90) return 'A'; if ($score >= 87) return 'B+'; if ($score >= 83) return 'B'; if ($score >= 80) return 'B-'; if ($score >= 77) return 'C+'; if ($score >= 73) return 'C'; if ($score >= 70) return 'C-'; if ($score >= 67) return 'D+'; if ($score >= 63) return 'D'; if ($score >= 60) return 'D-'; return 'F'; } // Get borough-specific contaminants function get_borough_contaminants($contaminants, $borough_name) { $result = []; foreach ($contaminants as $contaminant) { if ($contaminant['borough'] === $borough_name || $contaminant['borough'] === 'All') { $result[] = $contaminant; } } return $result; } ?>
Know what's in your tap water and what you can do about it.
Currently viewing: