Skip to content

codingforentrepreneurs/time-series-mongodb-pymongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Time Series with Python & MongoDB

Learn the fundamental techniques for analyzing time-series data with Python, MongoDB, PyMongo, Pandas, & Matplotlib

References

  • Blog post (coming soon)
  • Video (coming soon)

Prerequisites

  • Python 3.8+ Installed
  • Docker Desktop Installed (for local MongoDB instance)
  • Terminal or PowerShell experience

Getting Started

  1. Make a project directory
mkdir -p ~/dev/ts-pymongo
cd ~/dev/ts-pymongo
  1. Clone this repo:
git clone https://github.com/codingforentrepreneurs/time-series-mongodb-pymongo .
  1. Make and activate a virtual environment:
python3.10 -m venv venv

macOS/Linux activation

source venv/bin/activate

Windows activation

./venv/Scripts/activate
  1. Upgrade Virtual Environment Pip
(venv) python -m pip install pip --upgrade
  1. Move src/example.env to src/.env
mv src/example.env src/.env
  1. Change MONGO_INITDB_ROOT_PASSWORD in .env Create a new password with:
(venv) python -c "import secrets;print(secrets.token_urlsafe(32))"

So .env looks like:

MONGO_INITDB_ROOT_USERNAME="root"
MONGO_INITDB_ROOT_PASSWORD="wlke0lL-v7FkGFn5Cl0brfxHJqhDPImBmg-MRfCIXx4" 
  1. Install requirements
(venv) python -m pip install -r src/requirements.txt
  1. Run Docker Compose Don't have docker? Install Docker Desktop
cd ~/dev/ts-pymongo
docker compose up
  1. Checkout the Final Results If you want to see the final code changes, checkout the final branch.
git checkout final

About

Learn the fundamental techniques for analyzing time-series data with Python, MongoDB, PyMongo, Pandas, & Matplotlib

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published