#### Instructions for Data Formatting and Import

1. Camera Trap Data (Deployment Information)
   - General Structure:
     - Upload a CSV file containing 1 row per station (if 1 camera per station) or 1 row per camera (if >1 camera per station).
     - Station and Camera IDs can be any combination of characters and numbers. Do not use double underscores ("__") in IDs, as these are used internally by camtrapR.
   - Location Information:
     - Station Column: A unique identifier for each camera trap station.
     - Camera Column (optional): An identifier for individual cameras if multiple exist per station.
     - X & Y Coordinate Columns: Geographic coordinates (e.g., Longitude/Easting and Latitude/Northing).
     - Coordinate Reference System (CRS): Provide as an EPSG code (e.g., 4326 for WGS84, 32650 for UTM Zone 50N) without quotes.
   - Date Columns (Setup & Retrieval):
     - Must contain the setup and retrieval dates as character data type (do not use R's native Date type).
     - Specify the date format using lubridate codes (e.g., "ymd") or base R formats (e.g., "%Y-%m-%d"). The format must be consistent across all date columns.
     - Use date format (e.g. "ymd") or date-time format (e.g. "ymd HM".
   - Problem Columns (Optional):
     - Check the box if your data includes camera malfunction periods.
     - Column names must strictly follow the pattern: "Problem1_from", "Problem1_to", with additional pairs for further problem periods: "Problem2_from", "Problem2_to", etc.
   - Station/Camera-level Covariates:
     - Additional covariates (e.g., habitat type, trail type, camera model) can be included as extra columns in this CSV for use in later analyses.
2. Record Data (Detection Information)
   - General Structure:
     - Upload a CSV file containing the species detection records (e.g., output from the `recordTable` functions).
     - If you encounter a "maximum upload size exceeded" error, please adjust the maximum allowed file size in the dashboard sidebar under "File Size Control".
   - Required Columns:
     - Species Column: Contains the species names (common or scientific).
     - Date/Time Column: Contains the timestamp of each detection record.
   - Temporal Settings:
     - Date/Time Format: Specify using lubridate codes (e.g., "ymd HMS") or base R formats (e.g., "%Y-%m-%d %H:%M:%S").
     - Time Zone: Specify using standard Olson names (e.g., "UTC", "Asia/Singapore"). UTC is recommended if your area uses Daylight Saving Time (DST) but your cameras do not record or adjust for it.
   - Species Exclusion:
     - Provide a comma-separated list of species names to exclude from all analyses (e.g., "UNID, team, Human"). Names must match exactly as they appear in the Species column.
3. Import Workflow
   - Upload the CSV file for each data type. Once uploaded, the column selection dropdowns will populate automatically.
   - Map the appropriate columns and enter the specific formatting details (CRS, Date Format, Time Zone).
   - Click the "Done" button to confirm import and settings. A data preview will appear below the input box.

#### Notes:

- Consistency is key: Ensure date and time formats are identical across all relevant columns within a file.
- Do not convert date columns to R's native `Date` type before saving your CSV; keep them as text/character strings to ensure proper parsing via the specified formats.
- Avoid special characters like double underscores ("__") in Station and Camera IDs, as these are reserved for internal package operations (e.g., file naming).
- If you have multiple cameras per station, ensure each camera has its own row in the Camera Trap Data CSV and include a camera ID column to properly assess independence.
- If you are unsure have a look at the built-in datasets: `camtraps` and `recordTableSample`.

#### Relevant functions and data sets

- `recordTable`
- `camtraps` sample data
- `recordTable` sample data