A modern web application for visualizing avian influenza data, providing comprehensive insights into bird abundance, movement patterns, and outbreak information across North America.
This application offers an interactive platform that enables users to:
- Visualize bird abundance and movement data across North America with detailed timeline controls.
- Track avian influenza outbreaks dynamically, including Poultry, Bovine, and Wild Bird categories.
- Analyze inflow and outflow patterns for bird populations with advanced timeline playback and range selection.
- Utilize high-performance data overlays leveraging pregenerated mask layers and cache-enabled flow calculations for smooth user experience.
- Select geographic locations interactively through map clicks or address search for targeted analysis.
- Download flow projection data as GeoTIFF files for external use.
- Experience a responsive and accessible UI optimized for both desktop and mobile devices.
-
HomePage (
src/views/Home.tsx)- Central component managing the interactive map, timeline playback, and control widgets.
- Supports toggling search modes for location selection (map click or address search).
- Integrates the
MapOverlayPanelfor displaying active data type, species, date, and location information.
-
MapView (
src/components/MapView.tsx)- Renders the interactive Leaflet map with support for:
- Bird abundance, movement, inflow/outflow overlays using pregenerated mask layers.
- Dynamic outbreak visualization for Poultry, Bovine, and Wild Bird outbreaks.
- Location selection via map click or address search, with state management reflecting choice.
- Improved marker handling for current vs historic data visuals.
- Responsive design enhancements for mobile layouts, including scalable legends and controls.
- Renders the interactive Leaflet map with support for:
-
Timeline and Playback Components
- Timeline (
src/components/Timeline)- A highly modular timeline slider component supporting:
- Range selection for abundance and movement data visualization.
- Playback controls animating data progression over time (including 20-week projections for inflow/outflow).
- Draggable and tooltip-enhanced markers and thumbs with consistent UI styling.
- Support for all datasets with dynamic month labeling and hover info.
- A highly modular timeline slider component supporting:
- Timeline (
-
ControlBar (
src/components/ControlBar.tsx)- Dropdown selectors enhanced with species icons and improved tooltip accessibility.
- Includes toggles to control visibility of outbreak types (Poultry, Bovine, Wild Bird).
- Streamlined styling and interaction for improved user experience.
-
MapOverlayPanel (
src/components/MapOverlayPanel.tsx)- Displays current data context — data type, species, start date, and selected location.
- Integrates smoothly with timeline and map interactions.
-
InflowOutflowCalculateButton:- Compute button triggers server API calls for inflow/outflow calculations with progress and error notifications.
-
Legend (
src/components/DataLegend.tsx)- Displays data scale with updated, dynamic color coding and unit labels (
Birds/km²). - Supports inflow/outflow legends when relevant and adapts layout responsively.
- Displays data scale with updated, dynamic color coding and unit labels (
-
OutbreakPoints (
src/components/OutbreakPoints.tsx)- Manages and renders multiple outbreak types with distinct icons and conditional styling.
- Distinguishes current-year (Recent) outbreaks from historic outbreaks with opacity and color variations for clarity.
- Integrates with map slice's outbreak visibility state.
-
AboutButtons and About Section (
src/components/AboutButtons.tsxand related views)- Improved tabbed navigation and styling for About and Feedback pages.
- Added external links for API testing.
- Enhanced content describing avian influenza, data layers, and funding.
-
FeedbackForm
- User feedback with non-blocking Mantine notifications on submission.
- uiSlice: UI flags including monitor mode, icon/text sizing, font height, and title size.
- speciesSlice: Bird species and related data management.
- timelineSlice: Controls timeline state, including selected weeks, modes, and playback.
- mapSlice: Map-related state including mask overlay usage, cached flow results (
flowResultsCache), outbreak visibility (showOutbreaks), and location data. - outbreaksSlice: New slice managing outbreak toggle states by type (Poultry, Bovine, Wild Bird).
import { useSelector, useDispatch } from 'react-redux';
import { RootState, AppDispatch } from './store';
import { setShowOutbreaks } from './slices/outbreaksSlice';
const dispatch = useDispatch<AppDispatch>();
const showOutbreaks = useSelector((state: RootState) => state.map.showOutbreaks);
// Toggle outbreak visibility
dispatch(setShowOutbreaks({ poultry: true, bovine: false, wildBird: true }));To add new slices such as for additional data or UI state:
- Define the slice state interface and initial state in
slices/yourSlice.ts. - Create the slice with
createSlice. - Connect the reducer in
store.ts. - Use typed hooks with
RootStateandAppDispatchfor safety.
- Node.js (install via https://nodejs.org/en/download/package-manager)
- Clone the repository and change to project directory.
- Install dependencies, including new additions @mantine/notifications and Tailwind CSS packages:
npm install- Run dev server:
npm run dev- Build for production:
npm run build- Serve the production build for local testing:
serve -sTo install new packages:
npm install <package> --save- React with TypeScript
- Redux Toolkit for state management (with slices for outbreaks, flow, UI, timeline, species, map)
- Mantine UI Library with enhanced components and notifications
- Leaflet for advanced map visualizations with GeoTIFF and mask overlay support
- Vite for fast build tooling
- Tailwind CSS for utility-first styling integration
- GeoTIFF module for raster data handling
- Bird abundance and movement data from BirdFlowWork repository:
https://github.com/birdflow-science/BirdFlowWork/tree/main/avian_influenza/dates - Avian influenza outbreaks data includes Poultry, Bovine, and Wild Bird cases, updated dynamically.
- Flow projection data fetched from BirdfluAPI (production at birdfluapi.com).
- The application uses pregenerated mask overlays by default for performance.
- Inflow/outflow calculations are cached locally to minimize API requests and improve user experience.
- UI components are designed with accessibility and mobile responsiveness in mind.
- Users can download GeoTIFF files of flow projections directly from the interface.
- Notifications for user feedback and error handling leverage Mantine's notification system for a modern UX.
For more details, contributions, or issues, please refer to the project repository and documentation.