Bat Tracker - MongoDB Atlas Hackathon Submission
Tags: atlashackathon
Published: 2022-01-14 06:12:48

[Instructions]: # (To submit to the MongoDB Atlas Hackathon on DEV, please fill out all sections.)


### Overview of My Submission
[Note]: # (Please make sure the project links to the appropriate GitHub repository, and includes the [Apache-2 permissive license](https://www.apache.org/licenses/LICENSE-2.0)  and README.)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9zfb8apnvs4wtwxbg50t.jpg)

> **TRACK BAT LOCATION MOVEMENTS OVER TIME**



[Movebank](https://www.movebank.org/cms/movebank-main), is a public database, where scientists track animal movements by attaching a GPS device to the animal. Based on a certain frequencies, that data is recorded by the device and stored in the database.

There is a public API which gets this data, so developers can use it in various projects.

My idea for this was to:

1. Get European free-tailed bat tracking data from Movebank's API.
2. Store that data in MongoDB.
3. Convert it to Time Series data.
4. Display that data on a Map to track their movement history.

Unfortunately, I saw this Hackathon only a few days before the due date and did not have enough time to complete my idea. But I am submitting it as is. I may want to complete it in the future.

What I completed:

- ✅  Get European free-trailed bat tracking data from Movebank's API
- ✅  Store that data in MongoDB.
- ⛔ Convert it to Time Series data.
- ⛔ Display that data on a Map to track their movement history.


### Submission Category: 

[Note]: # (E-Commerce Creation, Prime Time, Action Star, Automation Innovation, or Choose Your Own Adventure)

> Prime Time with Atlas Time Series

### Screenshots:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j2lc7j3h4urpq53xfu13.jpg)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p48hsjg810t3vwsduvj0.png)


### Link to Code

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)

{% github https://github.com/anthonyjdella/atlas-hackathon-time-series %}

### Additional Resources / Info

- A helpful guide:
https://www.mongodb.com/features/mongodb-time-series-data


- Tutorial for inserting data using `PyMongo`:
https://kb.objectrocket.com/mongo-db/how-to-bulk-insert-multiple-documents-to-a-mongodb-collection-using-python-352


- Referencing this MongoDB PyMongo Guide on Github:
https://github.com/mongodb-developer/django-pymongo


- Movebank Study where I got the Data:
https://www.movebank.org/cms/webapp?gwt_fragment=page=studies,path=study312057662


- Movebank API:
https://github.com/movebank/movebank-api-doc


- How to Migrate Data into a Time Series Collection:
https://docs.mongodb.com/manual/core/timeseries/timeseries-migrate-data-into-timeseries-collection/


- To install MongoDB Shell and login: https://docs.mongodb.com/mongodb-shell/

```
mongosh mongodb+srv://USER:PASS@cluster0.9ptvo.mongodb.net/Bat_DB?retryWrites=true&w=majority
```

- To install MongoDB Community Edition 5.0: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/#install-mongodb-community-edition

```
brew tap mongodb/brew
brew install mongodb-community@5.0

brew services stop mongodb-community@5.0

brew services list

mongosh
```

- To download and configure MongoDB CLI: https://docs.mongodb.com/mongocli/master/configure/#std-label-mcli-configure

```
mongocli config describe default
```

- To connect to a Remote Host: https://docs.mongodb.com/mongodb-shell/connect/#mongodb-instance-on-a-remote-host

```
 mongosh "mongodb+srv://USER:PASS@cluster0.9ptvo.mongodb.net/Bat_DB?retryWrites=true&w=majority"
```

Thanks for sponsoring this great Hackathon! Although my submission is incomplete, I learned a lot.