working with CSV and no photos

22 views
Skip to first unread message

D dpzzp

unread,
Oct 1, 2025, 3:50:40 AMOct 1
to camtrapR
Hello I think I already messaged you but its been a week so in case you didn´t see my last reply I´m sending this since is  a bit urgent for me to finnish the analysis, so as I said I´m working with CSV archives in order to see overlpas in activity of different species, here are the archives so we can figure out how to get them in R,
my idea is to do something similar to the point 2.5 of this article 

I´m unsure of how to proceed since most tutorials talk about imags so I don´t know what the steps would be to continue

thanks in advance and best wishes
Camarah.csv
Camarap.csv

Juergen Niedballa

unread,
Oct 2, 2025, 12:08:20 AMOct 2
to camtrapR
Hello, 
yes, you can absolutely work with csv files. Your current tables look like this:

$ Survey : chr "tagged_13ag2020" "tagged_13ag2020" "tagged_13ag2020" "tagged_13ag2020" ... $ Station : chr "AA10" "AA10" "AA10" "AA9" ... $ Idcamara : chr "C13" "C13" "C13" "C14" ... $ Species : chr "Meles_meles" "Meles_meles" "Meles_meles" "Vulpes_vulpes" ... $ DateTime : chr "21/06/2020 22:14" "21/06/2020 23:51" "27/06/2020 23:05" "24/06/2020 5:19" ... $ metadata_Nindividuals: int 1 1 1 1 1 1 1 1 1 1 ... $ Y : num 37 37 37 37 37 ... $ X : num -6.45 -6.45 -6.45 -6.45 -6.45 ...

which in camtrapR terms is a record table (which species, where, when). In general what you need in addition is the camera trap table (which station was set up where, and when?). The X and Y columns need to be in the camera trap table. They are redundant here because all records at the same station have the same coordinates. You will need to add the setup / retrieval dates and possibly dates of malfunctioning. 

See 
data(recordTableSample)
data(camtraps)
for a simple example of both tables. 


In your specific case you may not need the camera trap table if the analysis is strictly about activity and specific camera trap information are irrelevant (you pool data from all stations). The activity* functions only need the recordTable, which you have already.

Just load your data with 
read.csv(..., sep = ";")   # your csv uses semicolon as column separator

Then proceed with the activity analysis. See e.g. ?activityOverlap, the example section

Best regards,
Jürgen

D dpzzp

unread,
Oct 2, 2025, 9:48:42 PMOct 2
to camtrapR
Thanks a lot for your attention, I assume I would have to change the coordinates in UTM? would I have to separate date and time into two columns like in the example or is not needed?

Juergen Niedballa

unread,
Oct 2, 2025, 10:01:47 PMOct 2
to camtrapR
You can use any coordinate system you want. 
In the older function detectionMaps() you specify the X and Y column and separately, the coordinate system. In the newer createCovariates function you directly provide an sf object (a data frame with spatial information) in any coordinate system. 

In the setup / retrieval / Problem columns you can either use date or date-time as a single value. So for example:
"2025-10-03 09:52:43" "2025-10-03"
are both valid values. You need to specify the format in the relevant functions (e.g. cameraOperation) using the dateTime or CTdateTime parameters.
See vignette 1 for details (note that it only mentions date formats, but now also supports date-time).
Best,

D dpzzp

unread,
Oct 3, 2025, 3:21:16 PMOct 3
to camtrapR
Thanks a lot, I´m trying to put the record table throw activity based on the example but it seems to not recognise the species colum, is strange bc it allows me to put the values (define species of interests) but fails on the other command

code : 
if(requireNamespace("overlap")) {
  # load record table
  data(record)
  # define species of interest
  speciesC_for_activity <- "Lepus_granatensis"# = Lepus granatensis, liebre iberica
  speciesD_for_activity <- "Vulpes_vulpes"   # = Vulpes vulpes, Zorro
  # create activity overlap plot (basic)
  activityOverlap (recordTable = record,
                   speciesC  = "Lepus_granatensis", # = Lepus granatensis, liebre iberica
                   speciesD  = "Vulpes_vulpes",  # = Vulpes vulpes, Zorro
                   writePNG  = FALSE,
                   plotR  = TRUE
  )

Error: speciesCol = "Lepus_granatensis" is not a column name in recordTable
Reply all
Reply to author
Forward
0 new messages