Title: | Pumilio in R |
---|---|
Description: | R package to query and get data out of a Pumilio sound archive system (http://ljvillanueva.github.io/pumilio/). |
Authors: | Luis J. Villanueva-Rivera |
Maintainer: | Luis J. Villanueva-Rivera <[email protected]> |
License: | GPL-3 |
Version: | 1.3 |
Built: | 2025-03-03 04:18:08 UTC |
Source: | https://github.com/ljvillanueva/pumilior |
Function to find if the version of the Pumilio system can work with this package. Version 2.6.0, or newer, of Pumilio is required and if the system allows querying.
checkVersion(pumilio_URL, credentials = NA, pumiliologin = NA)
checkVersion(pumilio_URL, credentials = NA, pumiliologin = NA)
pumilio_URL |
URL of the Pumilio installation, with trailing slash. For example: "http://server.com/pumilio/" |
credentials |
username and password, separated with a colon, for websites that require basic Apache webserver authentication |
pumiliologin |
username and password, separated with a colon, for Pumilio systems that require a valid user |
Returns a boolean if the Pumilio version matches the requirement.
access <- checkVersion(pumilio_URL = "http://pumilio.coquipr.com/pumilio/") access
access <- checkVersion(pumilio_URL = "http://pumilio.coquipr.com/pumilio/") access
Function to get the collections with sounds from Pumilio.
getCollections(pumilio_URL, credentials = NA, pumiliologin = NA)
getCollections(pumilio_URL, credentials = NA, pumiliologin = NA)
pumilio_URL |
URL of the Pumilio installation, with trailing slash. For example: "http://server.com/pumilio/" |
credentials |
username and password, separated with a colon, for websites that require basic Apache webserver authentication |
pumiliologin |
username and password, separated with a colon, for Pumilio systems that require a valid user |
Returns a data frame with the collections data.
ColID |
ID of the collection |
CollectionName |
name of the collection |
Author |
author of the collection |
FilesSource |
source of the collection |
CollectionFullCitation |
full citation to use for this collection |
URL |
web page for more details of this collection |
notes |
notes of the collection |
## Not run: cols <- getCollections(pumilio_URL = "http://pumilio.coquipr.com/pumilio/") cols[1,] ## End(Not run)
## Not run: cols <- getCollections(pumilio_URL = "http://pumilio.coquipr.com/pumilio/") cols[1,] ## End(Not run)
Function to download one sound file, specified with SoundID
, to the working directory from the result of a query using getSounds
.
getFile(result, SoundID = NA, credentials = NA)
getFile(result, SoundID = NA, credentials = NA)
result |
the result of the function |
SoundID |
ID of a valid record, obtained using |
credentials |
username and password, separated with a colon, for websites that require basic Apache webserver authentication |
Returns the filename.
To use this function, the curl library needs to be installed. In Linux install libcurl-devel.
For Windows, add this line to the script before calling the getFile
function:
setInternet2(TRUE)
## Not run: #First, get a list of results results <- getSounds(pumilio_URL = "http://pumilio.coquipr.com/pumilio/", SiteID = 111, type = "site") #Then, get the file from the first row, identified with the SoundID = 4078 getFile(results, SoundID = 4078) #For Windows, when credentials are needed: #First, get a list of results results <- getSounds(pumilio_URL = "http://pumilio.coquipr.com/pumilio2/", SiteID = 111, type = "site", credentials = "pumilio:pumilio") setInternet2(TRUE) getFile(results, SoundID = 4078, credentials = "pumilio:pumilio") ## End(Not run)
## Not run: #First, get a list of results results <- getSounds(pumilio_URL = "http://pumilio.coquipr.com/pumilio/", SiteID = 111, type = "site") #Then, get the file from the first row, identified with the SoundID = 4078 getFile(results, SoundID = 4078) #For Windows, when credentials are needed: #First, get a list of results results <- getSounds(pumilio_URL = "http://pumilio.coquipr.com/pumilio2/", SiteID = 111, type = "site", credentials = "pumilio:pumilio") setInternet2(TRUE) getFile(results, SoundID = 4078, credentials = "pumilio:pumilio") ## End(Not run)
Function to get the sites with sounds from Pumilio.
getSites(pumilio_URL, credentials = NA, pumiliologin = NA)
getSites(pumilio_URL, credentials = NA, pumiliologin = NA)
pumilio_URL |
URL of the Pumilio installation, with trailing slash. For example: "http://server.com/pumilio/" |
credentials |
username and password, separated with a colon, for websites that require basic Apache webserver authentication |
pumiliologin |
username and password, separated with a colon, for Pumilio systems that require a valid user |
Returns a data frame with the sites data.
SiteID |
ID of the site |
SiteName |
name of the site |
latitude |
latitude of the site, in decimal degrees |
longitude |
longitude of the site, in decimal degrees |
elevation |
elevation of the site, in meters above sea level |
notes |
notes of the site |
## Not run: sites <- getSites(pumilio_URL = "http://pumilio.coquipr.com/pumilio/") sites[1,] ## End(Not run)
## Not run: sites <- getSites(pumilio_URL = "http://pumilio.coquipr.com/pumilio/") sites[1,] ## End(Not run)
Function to get the data from sounds that match the search query.
getSounds(pumilio_URL, SiteID=NA, ColID=NA, type="all", credentials = NA, pumiliologin = NA)
getSounds(pumilio_URL, SiteID=NA, ColID=NA, type="all", credentials = NA, pumiliologin = NA)
pumilio_URL |
URL of the Pumilio installation, with trailing slash. For example: "http://server.com/pumilio/" |
SiteID |
ID of a valid site, obtained using |
ColID |
ID of a valid collection, obtained using |
type |
type of query to run: "all" to get all sounds in the archive; "site" for the site specified with |
credentials |
username and password, separated with a colon, for websites that require basic Apache webserver authentication |
pumiliologin |
username and password, separated with a colon, for Pumilio systems that require a valid user |
Returns a data frame with the sound data.
SoundID |
ID of the soundfile in the database |
ColID |
ID of the collection in which this file is archived in |
SiteID |
ID of the site where this sound was recorded |
OriginalFilename |
filename of the soundfile |
SoundName |
filename of the soundfile, usually |
day |
day part of the date when it was recorded |
month |
month part of the date when it was recorded |
year |
year part of the date when it was recorded |
hour |
hour part of the date when it was recorded |
minutes |
minutes part of the date when it was recorded |
seconds |
seconds part of the date when it was recorded |
SamplingRate |
sampling rate used to record the soundfile, in Hz |
BitRate |
bitrate of the file, in bits |
Channels |
number of channels |
Duration |
duration of the soundfile, in seconds |
SoundFormat |
format of the file |
SensorID |
ID of the sensor used to record the soundfile |
Notes |
notes of the soundfile |
timestamp |
date and time stamp when the soundfile was added to the archive |
FileSize |
file size of the soundfile, in bytes |
FilePath |
URL of the soundfile |
AudioPreviewFormat |
format of the preview file, usually mp3 |
AudioPreviewFilename |
filename of the preview file |
AudioPreviewFilePath |
URL of the preview file |
## Not run: sounds <- getSounds(pumilio_URL="http://pumilio.coquipr.com/pumilio/", SiteID=111, type="site") sounds[1,] ## End(Not run)
## Not run: sounds <- getSounds(pumilio_URL="http://pumilio.coquipr.com/pumilio/", SiteID=111, type="site") sounds[1,] ## End(Not run)
Functions to get data from a Pumilio sound archive system (http://ljvillanueva.github.io/pumilio/). Requires version 2.6.0, or newer, of Pumilio installed and XML turned on in the Admin menu.
Package: | pumilioR |
Type: | Package |
Version: | 1.3 |
Date: | 2014-04-14 |
License: | GPLv3 |
Luis J. Villanueva-Rivera