import React, { useState, useEffect } from 'react'; import './DeploymentMap.css'; // Mock data for demonstration purposes const mockDeploymentData = { phases: [ { id: 1, name: "Phase 1", timeline: "Q3 2025 - Q1 2026", status: "planning", locations: [ { id: 101, name: "Springfield Downtown", lat: 39.801, lng: -89.644, status: "planned", type: "urban", capacity: 12 }, { id: 102, name: "Champaign-Urbana Hub", lat: 40.116, lng: -88.243, status: "planned", type: "urban", capacity: 8 }, { id: 103, name: "Bloomington-Normal", lat: 40.484, lng: -88.993, status: "planned", type: "urban", capacity: 8 }, { id: 104, name: "Peoria Central", lat: 40.694, lng: -89.589, status: "planned", type: "urban", capacity: 8 } ] }, { id: 2, name: "Phase 2", timeline: "Q2 2026 - Q4 2026", status: "future", locations: [ { id: 201, name: "Rockford Hub", lat: 42.271, lng: -89.093, status: "future", type: "urban", capacity: 8 }, { id: 202, name: "Quad Cities", lat: 41.512, lng: -90.578, status: "future", type: "urban", capacity: 8 }, { id: 203, name: "Carbondale", lat: 37.727, lng: -89.216, status: "future", type: "urban", capacity: 6 }, { id: 204, name: "Quincy", lat: 39.936, lng: -91.410, status: "future", type: "urban", capacity: 6 }, { id: 205, name: "I-55 Corridor North", lat: 41.097, lng: -88.841, status: "future", type: "corridor", capacity: 4 }, { id: 206, name: "I-55 Corridor South", lat: 39.144, lng: -89.479, status: "future", type: "corridor", capacity: 4 } ] }, { id: 3, name: "Phase 3", timeline: "Q1 2027 - Q3 2027", status: "future", locations: [ { id: 301, name: "Decatur", lat: 39.840, lng: -88.954, status: "future", type: "urban", capacity: 6 }, { id: 302, name: "Danville", lat: 40.124, lng: -87.630, status: "future", type: "urban", capacity: 6 }, { id: 303, name: "Galesburg", lat: 40.947, lng: -90.371, status: "future", type: "urban", capacity: 4 }, { id: 304, name: "Mt. Vernon", lat: 38.317, lng: -88.903, status: "future", type: "urban", capacity: 4 }, { id: 305, name: "I-57 Corridor North", lat: 41.201, lng: -87.866, status: "future", type: "corridor", capacity: 4 }, { id: 306, name: "I-57 Corridor South", lat: 38.729, lng: -88.978, status: "future", type: "corridor", capacity: 4 }, { id: 307, name: "I-70 Corridor", lat: 39.123, lng: -88.542, status: "future", type: "corridor", capacity: 4 }, { id: 308, name: "I-74 Corridor", lat: 40.681, lng: -89.893, status: "future", type: "corridor", capacity: 4 } ] } ], demographics: { population: [ { county: "Cook", population: 5150233, evAdoption: 2.8, chargingStations: 487 }, { county: "DuPage", population: 922921, evAdoption: 3.2, chargingStations: 112 }, { county: "Lake", population: 696535, evAdoption: 2.9, chargingStations: 78 }, { county: "Will", population: 677560, evAdoption: 2.1, chargingStations: 54 }, { county: "Kane", population: 532403, evAdoption: 2.3, chargingStations: 42 }, { county: "McHenry", population: 307774, evAdoption: 1.9, chargingStations: 28 }, { county: "Winnebago", population: 285350, evAdoption: 1.2, chargingStations: 18 }, { county: "Madison", population: 264461, evAdoption: 0.9, chargingStations: 14 }, { county: "St. Clair", population: 259686, evAdoption: 0.7, chargingStations: 12 }, { county: "Champaign", population: 205865, evAdoption: 1.8, chargingStations: 22 } ], evProjections: [ { year: 2025, percentage: 3.5 }, { year: 2026, percentage: 5.2 }, { year: 2027, percentage: 7.8 }, { year: 2028, percentage: 11.5 }, { year: 2029, percentage: 16.3 }, { year: 2030, percentage: 22.0 } ] }, impactMetrics: { economic: { jobsCreated: 450, localBusinessImpact: 28, taxRevenue: 3.2 }, environmental: { co2Reduction: 12500, gasDisplaced: 1.4, renewableIntegration: 65 }, social: { underservedCommunities: 14, accessibilityScore: 72, publicTransportIntegration: 8 } } }; function DeploymentMap() { const [activeTab, setActiveTab] = useState('map'); const [loading, setLoading] = useState(true); const [selectedPhase, setSelectedPhase] = useState(1); const [mapView, setMapView] = useState('phases'); const [selectedLocation, setSelectedLocation] = useState(null); const [mapZoom, setMapZoom] = useState(1); useEffect(() => { // Simulate loading const timer = setTimeout(() => { setLoading(false); }, 1500); return () => clearTimeout(timer); }, []); const handlePhaseChange = (phaseId) => { setSelectedPhase(phaseId); setSelectedLocation(null); }; const handleMapViewChange = (view) => { setMapView(view); setSelectedLocation(null); }; const handleLocationSelect = (location) => { setSelectedLocation(location); setMapZoom(2); }; const handleZoomChange = (zoom) => { setMapZoom(zoom); if (zoom === 1) { setSelectedLocation(null); } }; // Helper function to render the Illinois map with deployment locations const renderMap = () => { const currentPhase = mockDeploymentData.phases.find(phase => phase.id === selectedPhase); const allLocations = mockDeploymentData.phases.flatMap(phase => phase.locations); const displayLocations = mapView === 'phases' ? currentPhase.locations : allLocations; return (
Illinois Map {displayLocations.map(location => (
handleLocationSelect(location)} >
{mapZoom > 1 && (
{location.name}
)}
))} {selectedLocation && (

{selectedLocation.name}

Status: {selectedLocation.status.charAt(0).toUpperCase() + selectedLocation.status.slice(1)}
Type: {selectedLocation.type === 'urban' ? 'Urban Hub' : 'Corridor Station'}
Capacity: {selectedLocation.capacity} Chargers
Phase: {mockDeploymentData.phases.find(phase => phase.locations.some(loc => loc.id === selectedLocation.id) ).name}
)}

Map Legend

Planned (Phase 1)
Future Phases
Urban Hub
Corridor Station
); }; // Helper function to render the deployment phases const renderPhases = () => { return (
{mockDeploymentData.phases.map(phase => ( ))}
{mockDeploymentData.phases.map(phase => ( phase.id === selectedPhase && (

{phase.name}

{phase.timeline}
{phase.status.charAt(0).toUpperCase() + phase.status.slice(1)}
{phase.locations.length}
Charging Locations
{phase.locations.reduce((sum, location) => sum + location.capacity, 0)}
Total Chargers
{phase.locations.filter(location => location.type === 'urban').length}
Urban Hubs
{phase.locations.filter(location => location.type === 'corridor').length}
Corridor Stations

Deployment Locations

{phase.locations.map(location => (
handleLocationSelect(location)} >
{location.name}
{location.type === 'urban' ? 'Urban Hub' : 'Corridor Station'}
{location.capacity} Chargers
))}
) ))}
); }; // Helper function to render the demographics tab const renderDemographics = () => { return (

Population & EV Adoption by County

County
Population
EV Adoption %
Charging Stations
{mockDeploymentData.demographics.population.map((county, index) => (
{county.county}
{county.population.toLocaleString()}
{county.evAdoption}%
{county.chargingStations}
))}

EV Adoption Projections

{mockDeploymentData.demographics.evProjections.map((projection, index) => (
{projection.year}
{projection.percentage}%
))}
Projected EV Adoption Rate (%)

Projections based on current adoption trends, state incentives, and manufacturer production forecasts.

The Link deployment strategy is designed to stay ahead of projected adoption curves to ensure adequate charging infrastructure.

); }; // Helper function to render the impact metrics tab const renderImpactMetrics = () => { const { economic, environmental, social } = mockDeploymentData.impactMetrics; return (

Economic Impact

💼
{economic.jobsCreated}
Jobs Created
Direct and indirect employment opportunities across all deployment phases
🏪
{economic.localBusinessImpact}%
Local Business Growth
Projected increase in revenue for businesses near charging hubs
💰
${economic.taxRevenue}M
Annual Tax Revenue
Estimated additional tax revenue for state and local governments

Environmental Impact

🌱
{environmental.co2Reduction}
Tons CO₂ Reduced
Annual carbon emissions reduction from EV adoption enabled by The Link
{environmental.gasDisplaced}M
Gallons Gas Displaced
Annual reduction in gasoline consumption
☀️
{environmental.renewableIntegration}%
Renewable Energy
Percentage of charging energy from renewable sources

Social Impact

🏘️
{social.underservedCommunities}
Underserved Communities
Number of underserved communities with improved EV access
{social.accessibilityScore}/100
Accessibility Score
Rating of charging infrastructure accessibility for all users
🚌
{social.publicTransportIntegration}
Transit Connections
Number of charging hubs with public transportation connections
); }; if (loading) { return (
Unity Fleet

Loading Deployment Map...

); } return (

Deployment Map

The Link Charging Network
{activeTab === 'map' && renderMap()} {activeTab === 'phases' && renderPhases()} {activeTab === 'demographics' && renderDemographics()} {activeTab === 'impact' && renderImpactMetrics()}
); } export default DeploymentMap;