HW1: MongoDB Atlas via Jupyter Notebook(Python).
1. Try connecting to your cluster using both MongoDB Compass (will have to download it first).
2. Download ‘War and Peace’ book (Check the attachement) Do not alter this file
in any way when you work with it!
3. Create a new database: “WarAndPeaceAnalytics”. Create two collection in
it: “nameLocations” and “paragraphNames”. And try to connect them to
your Jupyter Notebook
4 a. Use your program that extracts names from the file and populate the
“nameLocations” collection with the following documents:
Every time you find a name from the list, create a document that will record
the name, the line (paragraph) number and the index (location) of the name
within that paragraph.
For example, if you find a name “Natasha” in paragraph (line in the file) 445 at
location 161 of that line, then you create the following document.
Get Free Quote!
347 Experts Online