Blog‎ > ‎

Sort xeno-canto Recordings by Count

posted Jul 14, 2019, 1:37 AM by MUHAMMAD MUN`IM AHMAD ZABIDI   [ updated Jul 14, 2019, 1:44 AM ]
Get metadata for all recordings from Malaysia:

> CR.recs <- querxc(qword="cnt:malaysia")
> summary(CR.recs)
> unique(CR.recs$Locality)
> x <- sort(table(CR.recs$Locality),decreasing = F)
> write.csv(x,"mytable.csv")

$ tail mytable.csv
"424","Stapok area of Batu Kawa, Bahagian Kuching, Sarawak",122
"425","Deremakot forest reserve, Sabah, Borneo",124
"426","Taman Negara, Sungai Relau, Merapoh, Pahang",140
"427","Kuala Selangor, Selangor",140
"428","Mount Kinabalu, Sabah, Borneo",154
"429","Rainforest Discovery Center, Sepilok, Sabah, Borneo",166
"430","Taman Negara, Pahang",209
"431","Borneo Rainforest Lodge, Danum Valley, Sabah, Borneo",291
"432","Fraser's Hill, Pahang",360
"433","Danum Valley, Sabah, Borneo",389

If the command was write.csv(x,"mytable.csv",quote=F) then there won't be any quotes around the linenumber.

Giving the command to get metadata for all quality A recordings from all over the world makes the server work for 30 minutes

> World <- querxc(qword="q:A")
   |+++++++                                           | 14% ~24m 11s