Browse Source

Select on geoip result and insert in db

master
Maxime Wack 6 years ago
parent
commit
6bc7c82fd1
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      geoip.R

+ 3
- 4
geoip.R View File

@@ -33,10 +33,9 @@ db %>%
if (length(ips) > 0)
{
ips %>%
geolocate -> geoip

dbConnect(SQLite(), "access.db") %>%
dbWriteTable("geoip", geoip, append = T)
geolocate %>%
select(ip = query, city, country, lat, lon) %>%
dbWriteTable(conn = db, name = "geoip", value = ., append = T)
}

src_sqlite("access.db") %>%


Loading…
Cancel
Save