Created
October 21, 2016 06:58
-
-
Save abdalimran/087766b72d76fa2de6f1042e8352590c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rgeolocate) | |
setwd("/home/imran/Documents/") | |
ipdf <- read.csv("IP_Address.csv") | |
ipmmdb <- system.file("extdata","GeoLite2-Country.mmdb", package = "rgeolocate") | |
results <- maxmind(ipdf$IP.Address, ipmmdb,"country_name") | |
export.results <- data.frame(ipdf$IP.Address, results$country_name) | |
colnames(export.results) <- c("IP Address", "Country") | |
write.csv(export.results, "IP_to_Locationmmdb.csv") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment