Package 'pumilioR'

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

Help Index


Get Pumilio Version

Description

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.

Usage

checkVersion(pumilio_URL, credentials = NA, pumiliologin = NA)

Arguments

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

Value

Returns a boolean if the Pumilio version matches the requirement.

Examples

access <- checkVersion(pumilio_URL = "http://pumilio.coquipr.com/pumilio/")
	
	access

Get Collections from Pumilio

Description

Function to get the collections with sounds from Pumilio.

Usage

getCollections(pumilio_URL, credentials = NA, pumiliologin = NA)

Arguments

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

Value

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

Examples

## Not run: 
		cols <- getCollections(pumilio_URL = "http://pumilio.coquipr.com/pumilio/")
		cols[1,]
	
## End(Not run)

Download a sound file from Pumilio

Description

Function to download one sound file, specified with SoundID, to the working directory from the result of a query using getSounds.

Usage

getFile(result, SoundID = NA, credentials = NA)

Arguments

result

the result of the function getSounds

SoundID

ID of a valid record, obtained using getSounds

credentials

username and password, separated with a colon, for websites that require basic Apache webserver authentication

Value

Returns the filename.

Note

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)

Examples

## 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)

Get Sites from Pumilio

Description

Function to get the sites with sounds from Pumilio.

Usage

getSites(pumilio_URL, credentials = NA, pumiliologin = NA)

Arguments

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

Value

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

Examples

## Not run: 
		sites <- getSites(pumilio_URL = "http://pumilio.coquipr.com/pumilio/")	
		sites[1,]
	
## End(Not run)

Get Sounds from Pumilio

Description

Function to get the data from sounds that match the search query.

Usage

getSounds(pumilio_URL, SiteID=NA, ColID=NA, type="all", 
		credentials = NA, pumiliologin = NA)

Arguments

pumilio_URL

URL of the Pumilio installation, with trailing slash. For example: "http://server.com/pumilio/"

SiteID

ID of a valid site, obtained using getSites

ColID

ID of a valid collection, obtained using getCollections

type

type of query to run: "all" to get all sounds in the archive; "site" for the site specified with SiteID; "col" for the collection specified with ColID; "both" for sounds that match both the site specified with SiteID and the collection specified with ColID.

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

Value

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 OriginalFilename without the extension

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

Examples

## Not run: 
		sounds <- getSounds(pumilio_URL="http://pumilio.coquipr.com/pumilio/",
			SiteID=111, type="site")
		sounds[1,]
	
## End(Not run)

pumilioR

Description

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.

Details

Package: pumilioR
Type: Package
Version: 1.3
Date: 2014-04-14
License: GPLv3

Author(s)

Luis J. Villanueva-Rivera