项目作者: briandconnelly

项目描述 :
Look Up Information about an IP Address using ipinfo.io
高级语言: R
项目地址: git://github.com/briandconnelly/ripinfo.git
创建时间: 2017-04-14T05:40:47Z
项目社区:https://github.com/briandconnelly/ripinfo

开源协议:Other

下载


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:

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

Example

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

  1. library(ripinfo)
  2. ipinfo(ip = "8.8.8.8")

which returns:

  1. $ip
  2. [1] "8.8.8.8"
  3. $hostname
  4. [1] "google-public-dns-a.google.com"
  5. $city
  6. [1] "Mountain View"
  7. $region
  8. [1] "California"
  9. $country
  10. [1] "US"
  11. $loc
  12. [1] "37.3860,-122.0840"
  13. $org
  14. [1] "AS15169 Google Inc."
  15. $postal
  16. [1] "94035"
  17. $phone
  18. [1] "650"

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

  1. as.data.frame(ipinfo(ip = "8.8.8.8"))
  1. ip hostname city region country loc org
  2. 1 8.8.8.8 google-public-dns-a.google.com Mountain View California US 37.3860,-122.0840 AS15169 Google Inc.
  3. 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.