How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
MongoDBTip 1: Leverage Existing Functions
© 2017 8 Path Solutions LLC. All Rights Reserved.
db.Student.aggregate ([ { "$group": { "_id": { "Section" : "$Section" },
"AverageGrades": { "$avg":"$Grades" } } } ])
{ "_id" : { "Section" : 4 }, "AverageGrades" : 26.666666666666668 }
{ "_id" : { "Section" : 3 }, "AverageGrades" : 72.5 }
{ "_id" : { "Section" : 2 }, "AverageGrades" : 70 }
{ "_id" : { "Section" : 1 }, "AverageGrades" : 74 }
{ "_id" : { "Section" : null }, "AverageGrades" : null }
MongoDBTip 2: Check the Data
© 2017 8 Path Solutions LLC. All Rights Reserved.
• db.Student.find()
{ "_id" : ObjectId("59352ef5e8bdf3bfa5a6a465"), "StudentName" : "Ann", "Section" : 1, "Grades" : 70, "Subject" : [ "Science", "English", "Math" ] }
{ "_id" : ObjectId("59352ef5e8bdf3bfa5a6a466"), "StudentName" : "Arthur", "Section" : 1, "Grades" : 90, "Subject" : [ "English" ] }
{ "_id" : ObjectId("59352ef5e8bdf3bfa5a6a467"), "StudentName" : "Ann", "Section" : 1, "Grades" : 70, "Subject" : [ "Math" ] }
{ "_id" : ObjectId("59352f32e8bdf3bfa5a6a468"), "StudentName" : "Ann", "Section" : 1, "Grades" : 70, "Subject" : [ "Science" ] }
{ "_id" : ObjectId("59352f32e8bdf3bfa5a6a469"), "Subject" : [ "English" ] }
{ "_id" : ObjectId("59352f32e8bdf3bfa5a6a46a"), "StudentName" : "Ann", "Section" : 2, "Grades" : 70, "Subject" : [ "Math" ] }
{ "_id" : ObjectId("59352f33e8bdf3bfa5a6a46b"), "StudentName" : "An", "Section": 1, "Grades" : 70, "Subject" : [ "Math" ] }
{ "_id" : ObjectId("59352f39e8bdf3bfa5a6a46c"), "Subject" : [ "English" ] }
{ "_id" : ObjectId("59352f39e8bdf3bfa5a6a46d"), "StudentName" : "Lea", "Section" : 3, "Grades" : 50, "Subject" : [ "English" ] }
{ "_id" : ObjectId("59352f39e8bdf3bfa5a6a46e"), "StudentName" : "Tom", "Section" : 4, "Grades" : 40, "Subject" : [ "Math" ] }
{ "_id" : ObjectId("59352f39e8bdf3bfa5a6a46f"), "StudentName" : "To", "Section": 4, "Grades" : 20, "Subject" : [ "English", "Math" ] }
{ "_id" : ObjectId("59352f3be8bdf3bfa5a6a470"), "StudentName" : "Tod", "Section" : 4, "Grades" : 20, "Subject" : [ "English", "Math" ] }
{ "_id" : ObjectId("593536d6e8bdf3bfa5a6a471"), "Subject" : [ "English" ] }
{ "_id" : ObjectId("59353795e8bdf3bfa5a6a472"), "StudentName" : "Lee", "Section": 3, "Grades" : 80, "Subject" : [ "Math", "English" ] }
{ "_id" : ObjectId("59353923e8bdf3bfa5a6a473"), "StudentName" : "Alex", "Section" : 3, "Grades" : 80, "Subject" : [ "Mth" ] }
{ "_id" : ObjectId("593539dee8bdf3bfa5a6a474"), "StudentName" : "Alex", "Section" : 3, "Grades" : 80, "Subject" : [ "english" ] }
MongoDBTip 3: Investigate Potential Errors
© 2017 8 Path Solutions LLC. All Rights Reserved.
• db.Student.distinct("Subject“)
• Find ‘distinct’ terms to look for potential errors
• Look for misspelled terms
• Check for mismatch between upper case and lower case
MongoDBTip 4: Use Integrations
© 2017 8 Path Solutions LLC. All Rights Reserved.
library('RMongo')
mongo <- mongoDbConnect("test", "localhost", 27017)
dataProd <- dbGetQuery(mongo, "Student", "{}", 0, 999999)
subjects <- dbGetDistinct(mongo,"Student","Subject")
MongoDBTip 4: Use Integrations
© 2017 8 Path Solutions LLC. All Rights Reserved.
 dbGetQuery(mongo, "Student", "{}", 0, 999999)
Grades X_id StudentName Section Subject 1
70 59352ef5e8bdf3bfa5a6a465 Ann 1 [ "Science" , "English" , "Math"]
90 59352ef5e8bdf3bfa5a6a466 Arthur 1 [ "English"]
70 59352ef5e8bdf3bfa5a6a467 Ann 1 [ "Math"]
70 59352f32e8bdf3bfa5a6a468 Ann 1 [ "Science"]
NA 59352f32e8bdf3bfa5a6a469 NA [ "English"]
70 59352f32e8bdf3bfa5a6a46a Ann 2 [ "Math"]
70 59352f33e8bdf3bfa5a6a46b An 1 [ "Math"]
NA 59352f39e8bdf3bfa5a6a46c NA [ "English"]
50 59352f39e8bdf3bfa5a6a46d Lea 3 [ "English"]
40 59352f39e8bdf3bfa5a6a46e Tom 4 [ "Math"]
20 59352f39e8bdf3bfa5a6a46f To 4 [ "English" , "Math"]
20 59352f3be8bdf3bfa5a6a470 Tod 4 [ "English" , "Math"]
NA 593536d6e8bdf3bfa5a6a471 NA [ "English"]
80 59353795e8bdf3bfa5a6a472 Lee 3 [ "Math" , "English"]
80 59353923e8bdf3bfa5a6a473 Alex 3 [ "Mth"]
80 593539dee8bdf3bfa5a6a474 Alex 3 [ "english"]
© 2017 8 Path Solutions LLC. All Rights Reserved.
dbGetDistinct(mongo,"Student","Subject")
[1] "English" "Math" "Science" "Mth" "english"
MongoDBTip 4: Use Integrations
MongoDBTip 4: Use Integrations
© 2017 8 Path Solutions LLC. All Rights Reserved.
© 2017 8 Path Solutions LLC. All Rights Reserved.
MongoDBTip 4: Use Integrations
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data
How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data

More Related Content

PPTX
Building a Scalable Inbox System with MongoDB and Java
KEY
Schema Design with MongoDB
PDF
Intro to MongoDB and datamodeling
PPTX
jQuery
PDF
Building DSLs with Groovy
PDF
Optimizing Slow Queries with Indexes and Creativity
PDF
Storing tree structures with MongoDB
PPTX
Indexing and Query Optimization
Building a Scalable Inbox System with MongoDB and Java
Schema Design with MongoDB
Intro to MongoDB and datamodeling
jQuery
Building DSLs with Groovy
Optimizing Slow Queries with Indexes and Creativity
Storing tree structures with MongoDB
Indexing and Query Optimization

What's hot (20)

PDF
PDF
MongoDB Performance Tuning
ODP
2011 Mongo FR - Indexing in MongoDB
PDF
MongoDB Indexing Constraints and Creative Schemas
KEY
Potential Friend Finder
PDF
MongoDB With Style
PDF
MongoD Essentials
KEY
Schema Design (Mongo Austin)
KEY
Geospatial Indexing and Querying with MongoDB
ZIP
CouchDB-Lucene
PPTX
Running Production MongoDB Lightning Talk
PDF
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.
PDF
MongoDB Performance Debugging
KEY
Building Your First MongoDB Application
PDF
Couchbase Korea User Group 2nd Meetup #2
PPTX
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
PDF
Jongo mongo sv
PPTX
Functional reactive android (with Groovy)
PPTX
How to win $10m - analysing DOTA2 data in R (Sheffield R Users Group - May)
PPTX
Webinar: Data Modeling Examples in the Real World
MongoDB Performance Tuning
2011 Mongo FR - Indexing in MongoDB
MongoDB Indexing Constraints and Creative Schemas
Potential Friend Finder
MongoDB With Style
MongoD Essentials
Schema Design (Mongo Austin)
Geospatial Indexing and Querying with MongoDB
CouchDB-Lucene
Running Production MongoDB Lightning Talk
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.
MongoDB Performance Debugging
Building Your First MongoDB Application
Couchbase Korea User Group 2nd Meetup #2
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Jongo mongo sv
Functional reactive android (with Groovy)
How to win $10m - analysing DOTA2 data in R (Sheffield R Users Group - May)
Webinar: Data Modeling Examples in the Real World
Ad

Similar to How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data (20)

PDF
PDF
Sam zhang demo
PPTX
MongoDB Aggregation
KEY
Managing Social Content with MongoDB
PDF
Mongo indexes
PDF
L9. Math object in JS, CSE 202, BN11.pdf
PDF
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
PDF
Scaling MongoDB; Sharding Into and Beyond the Multi-Terabyte Range
PDF
ActiveRecord vs Mongoid
PDF
Tame Accidental Complexity with Ruby and MongoMapper
PPT
Building Your First MongoDB App ~ Metadata Catalog
PDF
Elasticsearch first-steps
PDF
10gen Presents Schema Design and Data Modeling
PDF
Whats new in mongoDB 2.4 at Copenhagen user group 2013-06-19
KEY
NOSQL101, Or: How I Learned To Stop Worrying And Love The Mongo!
PDF
ElasticSearch in action
PPTX
Webinar: General Technical Overview of MongoDB for Dev Teams
PDF
Montreal Elasticsearch Meetup
KEY
Schema design
PPTX
Leveraging Lucene/Solr as a Knowledge Graph and Intent Engine
Sam zhang demo
MongoDB Aggregation
Managing Social Content with MongoDB
Mongo indexes
L9. Math object in JS, CSE 202, BN11.pdf
Harnessing The Power of Search - Liferay DEVCON 2015, Darmstadt, Germany
Scaling MongoDB; Sharding Into and Beyond the Multi-Terabyte Range
ActiveRecord vs Mongoid
Tame Accidental Complexity with Ruby and MongoMapper
Building Your First MongoDB App ~ Metadata Catalog
Elasticsearch first-steps
10gen Presents Schema Design and Data Modeling
Whats new in mongoDB 2.4 at Copenhagen user group 2013-06-19
NOSQL101, Or: How I Learned To Stop Worrying And Love The Mongo!
ElasticSearch in action
Webinar: General Technical Overview of MongoDB for Dev Teams
Montreal Elasticsearch Meetup
Schema design
Leveraging Lucene/Solr as a Knowledge Graph and Intent Engine
Ad

More from MongoDB (20)

PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
PDF
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
PDF
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
PDF
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
PDF
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
PDF
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
PDF
MongoDB SoCal 2020: MongoDB Atlas Jump Start
PDF
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
PDF
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
PDF
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
PDF
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
PDF
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
PDF
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
PDF
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
PDF
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
PDF
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
PDF
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
PDF
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...

Recently uploaded (20)

PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
Comparative analysis of machine learning models for fake news detection in so...
PPTX
Microsoft User Copilot Training Slide Deck
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PPTX
future_of_ai_comprehensive_20250822032121.pptx
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
The influence of sentiment analysis in enhancing early warning system model f...
Lung cancer patients survival prediction using outlier detection and optimize...
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Comparative analysis of machine learning models for fake news detection in so...
Microsoft User Copilot Training Slide Deck
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Custom Battery Pack Design Considerations for Performance and Safety
Improvisation in detection of pomegranate leaf disease using transfer learni...
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
MuleSoft-Compete-Deck for midddleware integrations
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
future_of_ai_comprehensive_20250822032121.pptx
Taming the Chaos: How to Turn Unstructured Data into Decisions
sustainability-14-14877-v2.pddhzftheheeeee
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
Data Virtualization in Action: Scaling APIs and Apps with FME
Enhancing plagiarism detection using data pre-processing and machine learning...
NewMind AI Weekly Chronicles – August ’25 Week IV
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf

How to Avoid Common Data Visualization Pitfalls and Being Led Astray By Your Data

  • 49. MongoDBTip 1: Leverage Existing Functions © 2017 8 Path Solutions LLC. All Rights Reserved. db.Student.aggregate ([ { "$group": { "_id": { "Section" : "$Section" }, "AverageGrades": { "$avg":"$Grades" } } } ]) { "_id" : { "Section" : 4 }, "AverageGrades" : 26.666666666666668 } { "_id" : { "Section" : 3 }, "AverageGrades" : 72.5 } { "_id" : { "Section" : 2 }, "AverageGrades" : 70 } { "_id" : { "Section" : 1 }, "AverageGrades" : 74 } { "_id" : { "Section" : null }, "AverageGrades" : null }
  • 50. MongoDBTip 2: Check the Data © 2017 8 Path Solutions LLC. All Rights Reserved. • db.Student.find() { "_id" : ObjectId("59352ef5e8bdf3bfa5a6a465"), "StudentName" : "Ann", "Section" : 1, "Grades" : 70, "Subject" : [ "Science", "English", "Math" ] } { "_id" : ObjectId("59352ef5e8bdf3bfa5a6a466"), "StudentName" : "Arthur", "Section" : 1, "Grades" : 90, "Subject" : [ "English" ] } { "_id" : ObjectId("59352ef5e8bdf3bfa5a6a467"), "StudentName" : "Ann", "Section" : 1, "Grades" : 70, "Subject" : [ "Math" ] } { "_id" : ObjectId("59352f32e8bdf3bfa5a6a468"), "StudentName" : "Ann", "Section" : 1, "Grades" : 70, "Subject" : [ "Science" ] } { "_id" : ObjectId("59352f32e8bdf3bfa5a6a469"), "Subject" : [ "English" ] } { "_id" : ObjectId("59352f32e8bdf3bfa5a6a46a"), "StudentName" : "Ann", "Section" : 2, "Grades" : 70, "Subject" : [ "Math" ] } { "_id" : ObjectId("59352f33e8bdf3bfa5a6a46b"), "StudentName" : "An", "Section": 1, "Grades" : 70, "Subject" : [ "Math" ] } { "_id" : ObjectId("59352f39e8bdf3bfa5a6a46c"), "Subject" : [ "English" ] } { "_id" : ObjectId("59352f39e8bdf3bfa5a6a46d"), "StudentName" : "Lea", "Section" : 3, "Grades" : 50, "Subject" : [ "English" ] } { "_id" : ObjectId("59352f39e8bdf3bfa5a6a46e"), "StudentName" : "Tom", "Section" : 4, "Grades" : 40, "Subject" : [ "Math" ] } { "_id" : ObjectId("59352f39e8bdf3bfa5a6a46f"), "StudentName" : "To", "Section": 4, "Grades" : 20, "Subject" : [ "English", "Math" ] } { "_id" : ObjectId("59352f3be8bdf3bfa5a6a470"), "StudentName" : "Tod", "Section" : 4, "Grades" : 20, "Subject" : [ "English", "Math" ] } { "_id" : ObjectId("593536d6e8bdf3bfa5a6a471"), "Subject" : [ "English" ] } { "_id" : ObjectId("59353795e8bdf3bfa5a6a472"), "StudentName" : "Lee", "Section": 3, "Grades" : 80, "Subject" : [ "Math", "English" ] } { "_id" : ObjectId("59353923e8bdf3bfa5a6a473"), "StudentName" : "Alex", "Section" : 3, "Grades" : 80, "Subject" : [ "Mth" ] } { "_id" : ObjectId("593539dee8bdf3bfa5a6a474"), "StudentName" : "Alex", "Section" : 3, "Grades" : 80, "Subject" : [ "english" ] }
  • 51. MongoDBTip 3: Investigate Potential Errors © 2017 8 Path Solutions LLC. All Rights Reserved. • db.Student.distinct("Subject“) • Find ‘distinct’ terms to look for potential errors • Look for misspelled terms • Check for mismatch between upper case and lower case
  • 52. MongoDBTip 4: Use Integrations © 2017 8 Path Solutions LLC. All Rights Reserved. library('RMongo') mongo <- mongoDbConnect("test", "localhost", 27017) dataProd <- dbGetQuery(mongo, "Student", "{}", 0, 999999) subjects <- dbGetDistinct(mongo,"Student","Subject")
  • 53. MongoDBTip 4: Use Integrations © 2017 8 Path Solutions LLC. All Rights Reserved.  dbGetQuery(mongo, "Student", "{}", 0, 999999) Grades X_id StudentName Section Subject 1 70 59352ef5e8bdf3bfa5a6a465 Ann 1 [ "Science" , "English" , "Math"] 90 59352ef5e8bdf3bfa5a6a466 Arthur 1 [ "English"] 70 59352ef5e8bdf3bfa5a6a467 Ann 1 [ "Math"] 70 59352f32e8bdf3bfa5a6a468 Ann 1 [ "Science"] NA 59352f32e8bdf3bfa5a6a469 NA [ "English"] 70 59352f32e8bdf3bfa5a6a46a Ann 2 [ "Math"] 70 59352f33e8bdf3bfa5a6a46b An 1 [ "Math"] NA 59352f39e8bdf3bfa5a6a46c NA [ "English"] 50 59352f39e8bdf3bfa5a6a46d Lea 3 [ "English"] 40 59352f39e8bdf3bfa5a6a46e Tom 4 [ "Math"] 20 59352f39e8bdf3bfa5a6a46f To 4 [ "English" , "Math"] 20 59352f3be8bdf3bfa5a6a470 Tod 4 [ "English" , "Math"] NA 593536d6e8bdf3bfa5a6a471 NA [ "English"] 80 59353795e8bdf3bfa5a6a472 Lee 3 [ "Math" , "English"] 80 59353923e8bdf3bfa5a6a473 Alex 3 [ "Mth"] 80 593539dee8bdf3bfa5a6a474 Alex 3 [ "english"]
  • 54. © 2017 8 Path Solutions LLC. All Rights Reserved. dbGetDistinct(mongo,"Student","Subject") [1] "English" "Math" "Science" "Mth" "english" MongoDBTip 4: Use Integrations
  • 55. MongoDBTip 4: Use Integrations © 2017 8 Path Solutions LLC. All Rights Reserved.
  • 56. © 2017 8 Path Solutions LLC. All Rights Reserved. MongoDBTip 4: Use Integrations