Posts

Showing posts with the label sample

Prototyping in MongoDB with the Aggregation Pipeline stage operator $sample

Image
Prototyping in MongoDB with the Aggregation Pipeline stage operator $sample The World Map as a visual example In order to show how the random sampling works in the mongoDB query, this NodeJS Express website will show the world map and display random latitude/longitude points on the map. Each refresh of the page will produce new random points. Below the map, the docs will display. Once the website is up and working with data points, we will play with the query to see how the data points change in response. The demonstration video is available on YouTube . Setup steps for the website Setup This article assumes you have no mongoDB, no website, and no data. It does assume you have an account on Compose . Each step is broken out and explained. If there is a step you already have, such as the mongoDB with latitude/longitude data or a website that displays it, skip to the next. get website running, display map with no data setup the mongoDB+ ssl database get mock d...