Class Woozydata

java.lang.Object
com.leumanuel.woozydata.Woozydata
All Implemented Interfaces:
DataController

public class Woozydata extends Object implements DataController
*WoozyData Library* A comprehensive Java library for data analysis, providing a unified interface for data manipulation, statistical analysis, and machine learning operations.

Key features include:

  • Data loading from multiple sources (CSV, Excel, JSON, MongoDB)
  • Statistical analysis and data cleaning
  • Time series analysis
  • Data visualization and export capabilities
  • Machine learning operations
Version:
1.0
Author:
Leu A. Manuel, github.com/Leupesquisa
  • Constructor Details

    • Woozydata

      public Woozydata()
      Initializes a new instance of Woozydata with all required analysis services. This constructor sets up all necessary services for data analysis operations.
  • Method Details

    • fromCsv

      public DataFrame fromCsv(String filePath) throws Exception
      Loads data from a CSV file into a DataFrame.
      Specified by:
      fromCsv in interface DataController
      Parameters:
      filePath - Path to the CSV file
      Returns:
      DataFrame containing the loaded data
      Throws:
      Exception - if file cannot be read or is invalid
    • fromXlsx

      public DataFrame fromXlsx(String filePath) throws Exception
      Loads data from an Excel file into a DataFrame.
      Specified by:
      fromXlsx in interface DataController
      Parameters:
      filePath - Path to the Excel file (.xlsx)
      Returns:
      DataFrame containing the loaded data
      Throws:
      Exception - if file cannot be read or is invalid
    • fromJson

      public DataFrame fromJson(String filePath) throws Exception
      Loads data from a JSON file into a DataFrame.
      Specified by:
      fromJson in interface DataController
      Parameters:
      filePath - Path to the JSON file
      Returns:
      DataFrame containing the loaded data
      Throws:
      Exception - if file cannot be read or is invalid
    • fromMongo

      public DataFrame fromMongo(String connectionString, String dbName, String collection)
      Connects to MongoDB and loads data from a collection into a DataFrame.
      Specified by:
      fromMongo in interface DataController
      Parameters:
      connectionString - MongoDB connection string
      dbName - Database name
      collection - Collection name
      Returns:
      DataFrame containing the loaded data
    • mean

      public double mean(String column)
      Calculates the arithmetic mean of a numeric column.
      Specified by:
      mean in interface DataController
      Parameters:
      column - Name of the column
      Returns:
      Mean value of the column
      Throws:
      IllegalStateException - if no DataFrame is loaded
      IllegalArgumentException - if column is not numeric
    • median

      public double median(String column)
      Calculates the median value of a numeric column.
      Specified by:
      median in interface DataController
      Parameters:
      column - Name of the column
      Returns:
      Median value of the column
      Throws:
      IllegalStateException - if no DataFrame is loaded
      IllegalArgumentException - if column is not numeric
    • stdv

      public double stdv(String column)
      Calculates the standard deviation of a numeric column.
      Specified by:
      stdv in interface DataController
      Parameters:
      column - Name of the column
      Returns:
      Standard deviation of the column
      Throws:
      IllegalStateException - if no DataFrame is loaded
      IllegalArgumentException - if column is not numeric
    • vars

      public double vars(String column)
      Calculates the variance of a numeric column.
      Specified by:
      vars in interface DataController
      Parameters:
      column - Name of the column
      Returns:
      Variance value of the column
      Throws:
      IllegalStateException - if no DataFrame is loaded
      IllegalArgumentException - if column is not numeric
    • skew

      public double skew(String column)
      Calculates the skewness of a numeric column.
      Specified by:
      skew in interface DataController
      Parameters:
      column - Name of the column
      Returns:
      Skewness value of the column
      Throws:
      IllegalStateException - if no DataFrame is loaded
      IllegalArgumentException - if column is not numeric
    • kurt

      public double kurt(String column)
      Calculates the kurtosis of a numeric column.
      Specified by:
      kurt in interface DataController
      Parameters:
      column - Name of the column
      Returns:
      Kurtosis value of the column
      Throws:
      IllegalStateException - if no DataFrame is loaded
      IllegalArgumentException - if column is not numeric
    • cov

      public double cov(String col1, String col2)
      Description copied from interface: DataController
      Calculates the covariance between two columns.
      Specified by:
      cov in interface DataController
      Parameters:
      col1 - Name of the first column
      col2 - Name of the second column
      Returns:
      Covariance value
    • clean

      public DataFrame clean()
      Performs automatic data cleaning on the current DataFrame. This method combines multiple cleaning operations:
      • Removes missing values
      • Removes duplicates
      • Fixes data types
      • Standardizes formats
      Specified by:
      clean in interface DataController
      Returns:
      Cleaned DataFrame
      Throws:
      IllegalStateException - if no DataFrame is loaded
    • dropNa

      public DataFrame dropNa()
      Removes rows containing null values from the DataFrame.
      Specified by:
      dropNa in interface DataController
      Returns:
      DataFrame with null values removed
      Throws:
      IllegalStateException - if no DataFrame is loaded
    • dropDupes

      public DataFrame dropDupes(String... columns)
      Removes duplicate rows based on specified columns.
      Specified by:
      dropDupes in interface DataController
      Parameters:
      columns - Column names to check for duplicates. If none specified, checks all columns
      Returns:
      DataFrame with duplicates removed
      Throws:
      IllegalStateException - if no DataFrame is loaded
    • fillNa

      public DataFrame fillNa(Object value)
      Fills null values in all columns with a specified value.
      Specified by:
      fillNa in interface DataController
      Parameters:
      value - Value to use for filling null values
      Returns:
      DataFrame with filled values
      Throws:
      IllegalStateException - if no DataFrame is loaded
    • fillNaColumns

      public DataFrame fillNaColumns(Object value, String... columns)
      Description copied from interface: DataController
      Fills null values in specified columns with a given value.
      Specified by:
      fillNaColumns in interface DataController
      Parameters:
      value - Value to fill nulls with
      columns - Columns to fill
      Returns:
      DataFrame with filled values
    • toCsv

      public void toCsv(String filePath) throws Exception
      Exports DataFrame to CSV file.
      Specified by:
      toCsv in interface DataController
      Parameters:
      filePath - Output file path
      Throws:
      Exception - if export fails
      IllegalStateException - if no DataFrame is loaded
    • toJson

      public void toJson(String filePath) throws Exception
      Exports DataFrame to JSON format.
      Specified by:
      toJson in interface DataController
      Parameters:
      filePath - Path where to save the JSON file
      Throws:
      Exception - if export fails
      IllegalStateException - if no DataFrame is loaded
    • toExcel

      public void toExcel(String filePath) throws Exception
      Exports DataFrame to Excel format.
      Specified by:
      toExcel in interface DataController
      Parameters:
      filePath - Path where to save the Excel file
      Throws:
      Exception - if export fails
      IllegalStateException - if no DataFrame is loaded
    • toPowerBI

      public void toPowerBI(String filePath) throws Exception
      Exports DataFrame to PowerBI format. Includes:
      • Data sheet
      • Metadata sheet
      • Statistics sheet
      Specified by:
      toPowerBI in interface DataController
      Parameters:
      filePath - Output file path
      Throws:
      Exception - if export fails
      IllegalStateException - if no DataFrame is loaded
    • toHtml

      public void toHtml(String filePath) throws Exception
      Description copied from interface: DataController
      Exports DataFrame to HTML format.
      Specified by:
      toHtml in interface DataController
      Parameters:
      filePath - Path where to save the HTML file
      Throws:
      Exception - If there's an error writing the file
    • toLatex

      public void toLatex(String filePath) throws Exception
      Exports DataFrame to LaTeX format for academic papers.
      Specified by:
      toLatex in interface DataController
      Parameters:
      filePath - Output file path
      Throws:
      Exception - if export fails
      IllegalStateException - if no DataFrame is loaded
    • describe

      public Map<String,Object> describe(String column)
      Generates comprehensive statistical analysis of a column. Includes:
      • Basic statistics (mean, median, std)
      • Distribution analysis
      • Missing value analysis
      • Outlier detection
      Specified by:
      describe in interface DataController
      Parameters:
      column - Column name to analyze
      Returns:
      Map containing statistical measures
      Throws:
      IllegalStateException - if no DataFrame is loaded
    • quantile

      public double quantile(String column, double q)
      Calculates quantile value for a numeric column.
      Specified by:
      quantile in interface DataController
      Parameters:
      column - Column name
      q - Quantile value (0-1)
      Returns:
      Quantile value
      Throws:
      IllegalStateException - if no DataFrame is loaded
      IllegalArgumentException - if q is not between 0 and 1
    • iqr

      public double iqr(String column)
      Calculates the Interquartile Range (IQR) of a column. IQR is the difference between the 75th and 25th percentiles.
      Specified by:
      iqr in interface DataController
      Parameters:
      column - Column name
      Returns:
      IQR value
      Throws:
      IllegalStateException - if no DataFrame is loaded
    • frequency

      public Map<Object,Long> frequency(String column)
      Description copied from interface: DataController
      Calculates frequency distribution for a column.
      Specified by:
      frequency in interface DataController
      Parameters:
      column - Column name
      Returns:
      Map of values to their frequencies
    • normalDist

      public double[] normalDist(int size, double mean, double std)
      Description copied from interface: DataController
      Generates normal distribution samples.
      Specified by:
      normalDist in interface DataController
      Parameters:
      size - Number of samples
      mean - Mean of the distribution
      std - Standard deviation
      Returns:
      Array of samples
    • normalPdf

      public double normalPdf(double x, double mean, double std)
      Description copied from interface: DataController
      Calculates normal probability density function value.
      Specified by:
      normalPdf in interface DataController
      Parameters:
      x - Input value
      mean - Mean of the distribution
      std - Standard deviation
      Returns:
      PDF value
    • normalCdf

      public double normalCdf(double x, double mean, double std)
      Description copied from interface: DataController
      Calculates normal cumulative distribution function value.
      Specified by:
      normalCdf in interface DataController
      Parameters:
      x - Input value
      mean - Mean of the distribution
      std - Standard deviation
      Returns:
      CDF value
    • poissonDist

      public double[] poissonDist(double lambda, int size)
      Description copied from interface: DataController
      Generates Poisson distribution samples.
      Specified by:
      poissonDist in interface DataController
      Parameters:
      lambda - Rate parameter
      size - Number of samples
      Returns:
      Array of samples
    • uniformDist

      public double[] uniformDist(int size, double min, double max)
      Description copied from interface: DataController
      Generates uniform distribution samples.
      Specified by:
      uniformDist in interface DataController
      Parameters:
      size - Number of samples
      min - Minimum value
      max - Maximum value
      Returns:
      Array of samples
    • correl

      public double correl(String col1, String col2)
      Description copied from interface: DataController
      Calculates correlation between two columns.
      Specified by:
      correl in interface DataController
      Parameters:
      col1 - First column name
      col2 - Second column name
      Returns:
      Correlation coefficient
    • linearReg

      public double[] linearReg(String xCol, String yCol)
      Description copied from interface: DataController
      Performs simple linear regression.
      Specified by:
      linearReg in interface DataController
      Parameters:
      xCol - Independent variable column
      yCol - Dependent variable column
      Returns:
      Array containing slope and intercept
    • rsquared

      public double rsquared(String xCol, String yCol)
      Description copied from interface: DataController
      Calculates R-squared value for linear regression.
      Specified by:
      rsquared in interface DataController
      Parameters:
      xCol - Independent variable column
      yCol - Dependent variable column
      Returns:
      R-squared value
    • multipleReg

      public DataFrame multipleReg(String[] xCols, String yCol)
      Description copied from interface: DataController
      Performs multiple linear regression.
      Specified by:
      multipleReg in interface DataController
      Parameters:
      xCols - Independent variable columns
      yCol - Dependent variable column
      Returns:
      DataFrame with regression results
    • polynomialReg

      public DataFrame polynomialReg(String xCol, String yCol, int degree)
      Description copied from interface: DataController
      Performs polynomial regression.
      Specified by:
      polynomialReg in interface DataController
      Parameters:
      xCol - Independent variable column
      yCol - Dependent variable column
      degree - Polynomial degree
      Returns:
      DataFrame with regression results
    • logisticReg

      public DataFrame logisticReg(String xCol, String yCol)
      Description copied from interface: DataController
      Performs logistic regression.
      Specified by:
      logisticReg in interface DataController
      Parameters:
      xCol - Independent variable column
      yCol - Dependent variable column
      Returns:
      DataFrame with regression results
    • tTest

      public Map<String,Double> tTest(String col1, String col2)
      Description copied from interface: DataController
      Performs t-test between two columns.
      Specified by:
      tTest in interface DataController
      Parameters:
      col1 - First column name
      col2 - Second column name
      Returns:
      Map containing test results
    • anova

      public Map<String,Double> anova(String... columns)
      Description copied from interface: DataController
      Performs one-way ANOVA test.
      Specified by:
      anova in interface DataController
      Parameters:
      columns - Column names to compare
      Returns:
      Map containing test results
    • chiSquare

      public Map<String,Double> chiSquare(String col1, String col2)
      Description copied from interface: DataController
      Performs chi-square test of independence.
      Specified by:
      chiSquare in interface DataController
      Parameters:
      col1 - First column name
      col2 - Second column name
      Returns:
      Map containing test results
    • shapiroWilk

      public Map<String,Double> shapiroWilk(String column)
      Description copied from interface: DataController
      Performs Shapiro-Wilk normality test.
      Specified by:
      shapiroWilk in interface DataController
      Parameters:
      column - Column name
      Returns:
      Map containing test results
    • sma

      public double[] sma(double[] data, int window)
      Calculates Simple Moving Average (SMA) for time series data.
      Specified by:
      sma in interface DataController
      Parameters:
      data - Input time series data
      window - Window size for moving average
      Returns:
      Array containing SMA values
    • ema

      public double[] ema(double[] data, double alpha)
      Description copied from interface: DataController
      Calculates Exponential Moving Average.
      Specified by:
      ema in interface DataController
      Parameters:
      data - Input data array
      alpha - Smoothing factor
      Returns:
      Array of EMA values
    • forecast

      public DataFrame forecast(String timeCol, String valueCol, int periods)
      Description copied from interface: DataController
      Forecasts future values using time series analysis.
      Specified by:
      forecast in interface DataController
      Parameters:
      timeCol - Time column name
      valueCol - Value column name
      periods - Number of periods to forecast
      Returns:
      DataFrame with forecasted values
    • decompose

      public DataFrame decompose(String timeCol, String valueCol)
      Description copied from interface: DataController
      Decomposes time series into components.
      Specified by:
      decompose in interface DataController
      Parameters:
      timeCol - Time column name
      valueCol - Value column name
      Returns:
      DataFrame with decomposition components
    • seasonalAdjust

      public DataFrame seasonalAdjust(String timeCol, String valueCol)
      Description copied from interface: DataController
      Performs seasonal adjustment on time series.
      Specified by:
      seasonalAdjust in interface DataController
      Parameters:
      timeCol - Time column name
      valueCol - Value column name
      Returns:
      DataFrame with adjusted values
    • detectOutliers

      public DataFrame detectOutliers(String timeCol, String valueCol)
      Description copied from interface: DataController
      Detects outliers in time series data.
      Specified by:
      detectOutliers in interface DataController
      Parameters:
      timeCol - Time column name
      valueCol - Value column name
      Returns:
      DataFrame with outlier information
    • pivot

      public DataFrame pivot(String index, String columns, String values)
      Creates a pivot table from the DataFrame.
      Specified by:
      pivot in interface DataController
      Parameters:
      index - Column to use as index
      columns - Column to use for new columns
      values - Column to use for values
      Returns:
      Pivoted DataFrame
      Throws:
      IllegalStateException - if no DataFrame is loaded
    • melt

      public DataFrame melt(String[] idVars, String[] valueVars)
      Reshapes data from wide to long format.
      Specified by:
      melt in interface DataController
      Parameters:
      idVars - Columns to use as identifiers
      valueVars - Columns to unpivot
      Returns:
      Melted DataFrame
      Throws:
      IllegalStateException - if no DataFrame is loaded
    • dummies

      public DataFrame dummies(String... columns)
      Description copied from interface: DataController
      Creates dummy/indicator variables.
      Specified by:
      dummies in interface DataController
      Parameters:
      columns - Columns to convert to dummy variables
      Returns:
      DataFrame with dummy variables
    • bin

      public DataFrame bin(String column, int bins)
      Description copied from interface: DataController
      Bins continuous data into discrete intervals.
      Specified by:
      bin in interface DataController
      Parameters:
      column - Column to bin
      bins - Number of bins
      Returns:
      DataFrame with binned data
    • rollingWindow

      public DataFrame rollingWindow(String column, int window, String func)
      Description copied from interface: DataController
      Applies function over rolling window.
      Specified by:
      rollingWindow in interface DataController
      Parameters:
      column - Column name
      window - Window size
      func - Function to apply
      Returns:
      DataFrame with rolling window calculations
    • quickAnalysis

      public DataFrame quickAnalysis(String... columns)
      Description copied from interface: DataController
      Performs quick exploratory data analysis on specified columns.
      Specified by:
      quickAnalysis in interface DataController
      Parameters:
      columns - Columns to analyze
      Returns:
      DataFrame containing analysis results including basic statistics, distribution information, and potential anomalies
    • correlation

      public DataFrame correlation(String... columns)
      Description copied from interface: DataController
      Calculates correlation matrix for specified columns.
      Specified by:
      correlation in interface DataController
      Parameters:
      columns - Columns to include in correlation analysis
      Returns:
      DataFrame containing correlation matrix with correlation coefficients between all pairs of specified columns
    • count

      public long count(String column)
      Calculates basic count of non-null values in a column.
      Specified by:
      count in interface DataController
      Parameters:
      column - Name of the column to count
      Returns:
      Count of non-null values
      Throws:
      IllegalStateException - if no DataFrame is loaded
    • min

      public double min(String column)
      Description copied from interface: DataController
      Finds the minimum value in a column.
      Specified by:
      min in interface DataController
      Parameters:
      column - Column name
      Returns:
      Minimum value
    • max

      public double max(String column)
      Finds the maximum value in a numeric column.
      Specified by:
      max in interface DataController
      Parameters:
      column - Name of the column
      Returns:
      Maximum value
      Throws:
      IllegalStateException - if no DataFrame is loaded
      IllegalStateException - if no numeric values found in column
    • analyze

      public DataFrame analyze(String column)
      Analyzes a specific column for statistical measures and patterns.
      Specified by:
      analyze in interface DataController
      Parameters:
      column - Name of the column to analyze
      Returns:
      DataFrame containing analysis results
      Throws:
      IllegalStateException - if no DataFrame is loaded
    • convert

      public DataFrame convert(Map<String,Class<?>> typeMap)
      Converts column data types according to the specified type map.
      Specified by:
      convert in interface DataController
      Parameters:
      typeMap - Map of column names to their target Java types
      Returns:
      DataFrame with converted column types
      Throws:
      IllegalStateException - if no DataFrame is loaded
    • standardize

      public DataFrame standardize(String... columns)
      Standardizes specified columns using z-score normalization.
      Specified by:
      standardize in interface DataController
      Parameters:
      columns - Columns to standardize
      Returns:
      DataFrame with standardized columns
      Throws:
      IllegalStateException - if no DataFrame is loaded
    • normalize

      public DataFrame normalize(String... columns)
      Normalizes specified columns to range [0,1].
      Specified by:
      normalize in interface DataController
      Parameters:
      columns - Columns to normalize
      Returns:
      DataFrame with normalized columns
      Throws:
      IllegalStateException - if no DataFrame is loaded
    • sum

      public double sum(String column)
      Description copied from interface: DataController
      Calculates the sum of a column.
      Specified by:
      sum in interface DataController
      Parameters:
      column - Column name
      Returns:
      Sum value
    • avg

      public double avg(String column)
      Description copied from interface: DataController
      Calculates the average of a column.
      Specified by:
      avg in interface DataController
      Parameters:
      column - Column name
      Returns:
      Average value
    • binomialDist

      public int[] binomialDist(int trials, double prob, int size)
      Description copied from interface: DataController
      Generates binomial distribution samples.
      Specified by:
      binomialDist in interface DataController
      Parameters:
      trials - Number of trials
      prob - Success probability
      size - Number of samples
      Returns:
      Array of samples
    • mannWhitney

      public Map<String,Double> mannWhitney(String col1, String col2)
      Description copied from interface: DataController
      Performs Mann-Whitney U test.
      Specified by:
      mannWhitney in interface DataController
      Parameters:
      col1 - First column name
      col2 - Second column name
      Returns:
      Map containing test results
    • groupBy

      public DataFrame groupBy(String... columns)
      Description copied from interface: DataController
      Groups DataFrame by specified columns.
      Specified by:
      groupBy in interface DataController
      Parameters:
      columns - Columns to group by
      Returns:
      Grouped DataFrame
    • sort

      public DataFrame sort(String... columns)
      Description copied from interface: DataController
      Sorts DataFrame by specified columns.
      Specified by:
      sort in interface DataController
      Parameters:
      columns - Columns to sort by
      Returns:
      Sorted DataFrame
    • select

      public DataFrame select(String... columns)
      Description copied from interface: DataController
      Selects specified columns from DataFrame.
      Specified by:
      select in interface DataController
      Parameters:
      columns - Columns to select
      Returns:
      DataFrame containing only the selected columns
    • sample

      public DataFrame sample(int n)
      Description copied from interface: DataController
      Creates a random sample of rows from the DataFrame.
      Specified by:
      sample in interface DataController
      Parameters:
      n - Number of rows to sample
      Returns:
      DataFrame containing the sampled rows
    • merge

      public DataFrame merge(DataFrame other, String how, String... on)
      Description copied from interface: DataController
      Merges current DataFrame with another DataFrame.
      Specified by:
      merge in interface DataController
      Parameters:
      other - DataFrame to merge with
      how - Type of merge ('inner', 'outer', 'left', 'right')
      on - Columns to merge on
      Returns:
      Merged DataFrame
    • concat

      public DataFrame concat(DataFrame other, boolean axis)
      Description copied from interface: DataController
      Concatenates current DataFrame with another DataFrame.
      Specified by:
      concat in interface DataController
      Parameters:
      other - DataFrame to concatenate
      axis - If true, concatenate along columns; if false, along rows
      Returns:
      Concatenated DataFrame
    • reshape

      public DataFrame reshape(int rows, int cols)
      Description copied from interface: DataController
      Reshapes the DataFrame to specified dimensions.
      Specified by:
      reshape in interface DataController
      Parameters:
      rows - Number of rows in reshaped DataFrame
      cols - Number of columns in reshaped DataFrame
      Returns:
      Reshaped DataFrame
    • timeAnalysis

      public DataFrame timeAnalysis(String dateCol, String valueCol)
      Description copied from interface: DataController
      Performs time-based analysis on a datetime column and corresponding value column.
      Specified by:
      timeAnalysis in interface DataController
      Parameters:
      dateCol - Column containing datetime values
      valueCol - Column containing values to analyze
      Returns:
      DataFrame with time-based analysis results including trends, seasonality, and temporal patterns
    • missingAnalysis

      public DataFrame missingAnalysis()
      Description copied from interface: DataController
      Analyzes missing values in the DataFrame.
      Specified by:
      missingAnalysis in interface DataController
      Returns:
      DataFrame containing missing value analysis including counts, percentages, and patterns of missing data
    • outlierAnalysis

      public DataFrame outlierAnalysis(String... columns)
      Performs quick comprehensive analysis of specified columns. Includes:
      • Basic statistics
      • Missing value analysis
      • Distribution analysis
      • Outlier detection

      Example:

       DataFrame analysis = woozy.quickAnalysis("sales", "profit");
       analysis.show();
       
      Specified by:
      outlierAnalysis in interface DataController
      Parameters:
      columns - Columns to analyze
      Returns:
      DataFrame containing analysis results
      Throws:
      IllegalStateException - if no DataFrame is loaded
    • stats

      public Map<String,Double> stats(String column)
      Description copied from interface: DataController
      Calculates basic statistical measures for a column.
      Specified by:
      stats in interface DataController
      Parameters:
      column - Name of the column
      Returns:
      Map containing statistical measures
    • interpolate

      public DataFrame interpolate(String method, String... columns)
      Description copied from interface: DataController
      Interpolates missing values using specified method.
      Specified by:
      interpolate in interface DataController
      Parameters:
      method - Interpolation method to use
      columns - Columns to interpolate
      Returns:
      DataFrame with interpolated values
    • fullReport

      public Map<String,Object> fullReport(String... columns)
      Generates a full statistical report.

      Example:

       Map<String, Object> report = woozy.fullReport("sales", "profit");
       System.out.println("Correlation: " + report.get("correlation"));
       
      Specified by:
      fullReport in interface DataController
      Parameters:
      columns - Columns to include in report
      Returns:
      Map containing comprehensive analysis
      Throws:
      IllegalStateException - if no DataFrame is loaded