README.md

ripinfo

Project Status: Active - The project has reached a stable, usable state and is being actively developed. BSD License CRAN_Status_Badge

Overview

This package provides a (very) lightweight interface to the ipinfo.io API, which provides organizational and geographical information about IP addresses.

Installation

ripinfo is not currently available on CRAN, but you can use devtools to install the current development version:

    if(!require("devtools")) install.packages("devtools")
    devtools::install_github("briandconnelly/ripinfo")

Example

Here, we'll get information about a Google Public DNS IP Address:

library(ripinfo)

ipinfo(ip = "8.8.8.8")

which returns:

$ip
[1] "8.8.8.8"

$hostname
[1] "google-public-dns-a.google.com"

$city
[1] "Mountain View"

$region
[1] "California"

$country
[1] "US"

$loc
[1] "37.3860,-122.0840"

$org
[1] "AS15169 Google Inc."

$postal
[1] "94035"

$phone
[1] "650"

If you'd prefer a data frame, you can coerce it:

as.data.frame(ipinfo(ip = "8.8.8.8"))
       ip                       hostname          city     region country               loc                 org
1 8.8.8.8 google-public-dns-a.google.com Mountain View California      US 37.3860,-122.0840 AS15169 Google Inc.
  postal phone

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project in any way, you agree to abide by its terms.



briandconnelly/ripinfo documentation built on May 13, 2019, 7:41 a.m.