GetAnimals: Access All Available Petfinder Data

Description Usage Arguments Details Examples

View source: R/GetAnimals.R

Description

This function allows the users to access pet adoption data from Petfinder 2.0 API through a variety of different parameters. Parameters should be left null if it is not of interest so as to include all fields that have that parameter.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
GetAnimals(
  breed = NULL,
  size = NULL,
  gender = NULL,
  age = NULL,
  color = NULL,
  coat = NULL,
  status = NULL,
  organization = NULL,
  good_with_children = NULL,
  good_with_dogs = NULL,
  good_with_cats = NULL,
  location = NULL,
  distance = NULL,
  before = NULL,
  after = NULL,
  limit = 20
)

Arguments

breed

Accepts multiple values, e.g. breed=pug,samoyed.

size

small, medium, large, xlarge Accepts multiple values, e.g. size=large,xlarge.

gender

male, female, unknown Accepts multiple values, e.g. gender=male,female.

age

baby, young, adult, senior Accepts multiple values, e.g. age=baby,senior.

color

Return results matching animal color

coat

Return results matching animal coat

status

Return results matching adoption status

organization

Return results associated with specific organization(s)

good_with_children

Return results that are good with children. Can be true, false, 1, or 0

good_with_dogs

Return results that are good with dogs. Can be true, false, 1, or 0

good_with_cats

Return results that are good with cats. Can be true, false, 1, or 0

location

Return results by location. string city, state; latitude,longitude; or postal code.

distance

Return results within distance of location (in miles). Requires location to be set (default: 100, max: 500)

before

Return results published before this date/time. Must be a valid ISO8601 date-time string (e.g. 2019-10-07T19:13:01+00:00)

after

Return results published after this date/time. Must be a valid ISO8601 date-time string (e.g. 2019-10-07T19:13:01+00:00)

limit

Sets the number of observations to return. Default is 20.

Details

Returns a dataframe with all available features for 20 observations. Parameters will filter based on selected values and number of observations can be adjusted with the limit parameter.

Examples

1

joseandresmontes/petfindeR documentation built on June 4, 2020, 5:05 p.m.