Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
Mutabazi Noble 63d9d39f13
Merge branch 'staging' into calibrate-update
3 weeks ago
..
1a70096401
run black formatter
1 month ago
1a70096401
run black formatter
1 month ago
2ee24c17d3
Merge branch 'staging' into update-kafka-calibrate
2 years ago
d45ca8ed7e
initial cleanup
1 month ago
bfa1951cd0
Added gunicorn webserver
2 years ago
1a70096401
run black formatter
1 month ago
1a70096401
run black formatter
1 month ago
63d9d39f13
Merge branch 'staging' into calibrate-update
3 weeks ago
bfa1951cd0
Added gunicorn webserver
2 years ago
1a70096401
run black formatter
1 month ago

readme.md

You have to be logged in to leave a comment. Sign In

Calibrate microservice

To run in a virtual environment.

  1. Add file airqo-250220-5149c2aac8f2.json to jobs/. Obtain from a team member or GCP.
  2. Create a virtual environment
  3. pip install -r requirements.txt
  4. flask run

To build and run with docker desktop.

(Uses "production" dockerfile.)

  1. Add file airqo-250220-5149c2aac8f2.json to jobs/. Obtain from a team member or GCP.
  2. docker build --target=dev -t calibrate .
  3. docker run -d -p 4001:4001 --env FLASK_APP=app.py --env FLASK_ENV=development --env MONGO_URI=mongodb://localhost:27017 calibrate

It is implicit that mongodb should be installed and running.

Calibrate Tool Endpoint

Make a POST request to http://localhost:4001/api/v1/calibrate_tool using form data: Form must contain:

  • A csv file containing the data you want to calibrate.
  • Mapping for datetime, pm2_5, s2_pm2_5, pm10, s2_pm10, humidity, temperature.

Sample contents for csv file containing uncalibrated data

Sample csv file

Sample form data

Sample form data

Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...