GithubHelp home page GithubHelp logo

ipinfo's Introduction

ipinfo

Collect Metadata on ‘IP’ Addresses and Autonomous Systems

Description

The ‘ipinfo.io’ https://ipinfo.io/ service provides an ‘API’ for retrieving metadata on ‘IP’ addresses and autonomous systems. Methods are provided to query and retrieve this metadata.

What’s Inside The Tin

The following functions are implemented:

  • country_trans: Retrieve a data frame of country abbreviation to name mappings
  • query_asn: Retrieve full ASN details
  • query_ip: Retrieve full IP details

Installation

devtools::install_github("hrbrmstr/ipinfo")

Usage

library(ipinfo)

# current verison
packageVersion("ipinfo")
## [1] '0.1.0'

Lookup an IP

str(
  query_ip("1.1.1.1"),
  1
)
## List of 8
##  $ ip      : chr "1.1.1.1"
##  $ hostname: chr "1dot1dot1dot1.cloudflare-dns.com"
##  $ city    : chr "Research"
##  $ region  : chr "Victoria"
##  $ country : chr "AU"
##  $ loc     : chr "-37.7000,145.1830"
##  $ postal  : chr "3095"
##  $ org     : chr "AS13335 Cloudflare, Inc."

Lookup an ASN

I do not have a paid plan for this so I cannot test it

Country iso2c to name mapping

country_trans()
## # A tibble: 250 x 2
##    iso2c country_name          
##    <chr> <chr>                 
##  1 BD    Bangladesh            
##  2 BE    Belgium               
##  3 BF    Burkina Faso          
##  4 BG    Bulgaria              
##  5 BA    Bosnia and Herzegovina
##  6 BB    Barbados              
##  7 WF    Wallis and Futuna     
##  8 BL    Saint Barthelemy      
##  9 BM    Bermuda               
## 10 BN    Brunei                
## # ... with 240 more rows

Code of Conduct

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

ipinfo's People

Contributors

hrbrmstr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

neo4reo rayiik

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.