For now, support geojson file as that is what mongolite package tries to support. Shape and others later which would also mean, keeping the package deps minimal. For details see data-raw example of this package how geojson objects are imported.
gc_import(url, collection = "geocoder", local = TRUE, index = "2dsphere", mongo_url = "mongodb://localhost:27017", silent = FALSE)
url | geojson file to read or remote, flick |
---|---|
collection | set collection from parameter default |
local | assume |
index | a MongoDB compatible index: either 2d or 2dsphere. |
mongo_url | custom mongourl to use with |
silent | show messages, default is |
number of rows inserted