The goal of attomr is to make calls to the ATTOM API easy from R!
Relies on
httr
on the back end.
In development. You can install the current version of attomr from GitHub with:
devtools::install_github("juanfung/attomr")
This is a basic example which shows you how to solve a common problem:
library(attomr)
## basic example code
## NB: requires setting apikey variable
apikey = 'YOUR_API_KEY'
## (optional) set user agent globally
set_ua('github.com/juanfung/attomr')
## create full endpoint path
path = build_path('basic')
## basic list of query parameters
query = build_query('basic')
## append query parameters
query = update_query(
query,
list(address='721 Evergreen Terrace, Springfield'))
## make the query
response = attom_api(path, query, apikey)
## you can more easily iterate through a list of addresses:
testlist = list(
## Throws an error but does not stop
list(address='741 EVERGREEN TERRACE, SPRINGFIELD'),
list(address='4529 Winona Court, Denver, CO')
)
testout = search_list(queries=testlist, apikey=apikey, s='basic')
## parse responses to (list of) tables
testdf = parse_list(testout)
List of available endpoints:
/property/id
) returns list of properties that fit criteria
(bedrooms, geoid)/property/basicprofile
) returns basic property info,
most recent sale and taxes/property/detail
) property characteristics, given
address; or property details, given attomid/property/snapshot
) return properties that fall
within radius of lat/long/property/address
) return properties that dall within
radius of address or postalcode/sale/snapshot
) return sales within radius of propertyAdd the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.