"""
HydroAnomaly

A Python package for hydro anomaly detection and USGS data retrieval.
"""

__version__ = "0.2.0"
__author__ = "Your Name"
__email__ = "your.email@example.com"

# Import main modules for easy access
from .hello import greet
from .math_utils import add, multiply
from .usgs_data import get_usgs_data, USGSDataRetriever
from .plotting import plot_usgs_data, plot_multiple_gages, quick_plot, WaterDataPlotter

# Convenience functions for common use cases
def get_discharge(gage_number, start_date, end_date, save_file=None):
    """
    Quick function to get discharge data from any USGS gage.
    
    Args:
        gage_number (str): USGS gage number (e.g., "08158000")
        start_date (str): Start date in YYYY-MM-DD format
        end_date (str): End date in YYYY-MM-DD format
        save_file (str, optional): Filename to save data
    
    Returns:
        pandas.DataFrame: Discharge data
        
    Example:
        >>> import hydroanomaly
        >>> data = hydroanomaly.get_discharge("08158000", "2023-01-01", "2023-01-31")
        >>> print(f"Got {len(data)} discharge measurements")
    """
    return get_usgs_data(
        site_number=gage_number,
        parameter_code="00060",  # Discharge
        start_date=start_date,
        end_date=end_date,
        save_to_file=save_file,
        parameter_name="Discharge_cfs"
    )

def get_water_level(gage_number, start_date, end_date, save_file=None):
    """
    Quick function to get water level data from any USGS gage.
    
    Args:
        gage_number (str): USGS gage number (e.g., "08158000")
        start_date (str): Start date in YYYY-MM-DD format
        end_date (str): End date in YYYY-MM-DD format
        save_file (str, optional): Filename to save data
    
    Returns:
        pandas.DataFrame: Water level data
    """
    return get_usgs_data(
        site_number=gage_number,
        parameter_code="00065",  # Gage height
        start_date=start_date,
        end_date=end_date,
        save_to_file=save_file,
        parameter_name="WaterLevel_ft"
    )

def get_temperature(gage_number, start_date, end_date, save_file=None):
    """
    Quick function to get water temperature data from any USGS gage.
    
    Args:
        gage_number (str): USGS gage number (e.g., "08158000")
        start_date (str): Start date in YYYY-MM-DD format
        end_date (str): End date in YYYY-MM-DD format
        save_file (str, optional): Filename to save data
    
    Returns:
        pandas.DataFrame: Temperature data
    """
    return get_usgs_data(
        site_number=gage_number,
        parameter_code="00010",  # Temperature
        start_date=start_date,
        end_date=end_date,
        save_to_file=save_file,
        parameter_name="Temperature_C"
    )

__all__ = [
    "greet", "add", "multiply", 
    "get_usgs_data", "USGSDataRetriever",
    "get_discharge", "get_water_level", "get_temperature",
    "plot_usgs_data", "plot_multiple_gages", "quick_plot", "WaterDataPlotter"
]
