[R] R & MongoDB

Fernando Mozas Enguita fernando.mozas at trackglobe.com
Thu Dec 1 09:07:00 CET 2016


Hi Everyone!

I´m new in R-world and I need help.
I need to make an R-script for PowerBI to connect with a MongoDB data source and I don´t have so much idea

I have a dataset in a Mongo DB like this:

/* 1 */
{
    "_id" : ObjectId("5819ad77d8828e871ce09297"),
    "Date" : 1478077741,
    "Receptor" : "CORMAD",
    "Position" : "02112016",
    "clients" : [
        {
            "mac" : "A2:C2:CA:18:F0:5E",
            "vendor" : "",
            "lastSeen" : 1478077746,
            "power" : -80,
            "R" : "",
            "bssid" : "(not associated) ",
            "essid" : [],
            "probedESSID" : [
                "any"
            ]
        },
        {
            "mac" : "D6:B0:C2:0E:2B:A0",
            "vendor" : "",
            "lastSeen" : 1478077755,
            "power" : -78,
            "R" : "",
            "bssid" : "(not associated) ",
            "essid" : [],
            "probedESSID" : [
                "any"
            ]
        }
/* 2 */
{
    "_id" : ObjectId("5819b009d8828e871ce092dc"),
    "Date" : 1478078401,
    "Receptor" : "CORMAD",
    "Position" : "02112016",
    "clients" : [
        {
            "mac" : "C0:38:96:86:1E:91",
            "vendor" : "HonHaiPr",
            "lastSeen" : 1478078443,
            "power" : -80,
            "R" : "",
            "bssid" : "0A:18:D6:2B:7F:EB",
            "essid" : [],
            "probedESSID" : [
                "any"
            ]
        },
        {
            "mac" : "F4:F1:E1:60:73:D2",
            "vendor" : "Motorola",
            "lastSeen" : 1478078410,
            "power" : -78,
            "R" : "",
            "bssid" : "(not associated) ",
            "essid" : [],
            "probedESSID" : [
                "JAZZTEL_HY7S"
            ]
        }

How can I iterate throw all the clients to extract the information?
I need to have a classic table with the information.
One row with the fields :
_id | Date | Receptor | Position | clients | mac | vendor | lastSeen | power | R | bssid | essid | probedESSID


Thanks!
Fernando.





	[[alternative HTML version deleted]]



More information about the R-help mailing list