Application is designed to make predictions about air alarms in Ukraine based on historical and recent data. It uses Open-Meteo API, Ukraine Alarm API and Institute for the Study of War for fetching necessary recent and real-time data. Application consists of 2 services: Prediction and ML service.
-
Prediction service has the main and the only open to the world server which sends responses to clients' requests. In addition, it is responsible for fetching, processing and sending necessary data to ML service through message queue (RabbitMQ).
-
ML service is responsible for training models, making predictions, and sending them as responses to Prediction service's requests. It also has an HTTP server to establish communication with Prediction service.
Predictions get updated every hour: Prediction service fetches and processes new data, makes a new merged dataset and sends it by chunks through message queue to ML service, which in turn receives the file, initiates a process of updating predictions for all of the regions for the next 12 hours and saves the results in a file.
Application also serves UI which looks like this:
Users can select predictions for specific region or for the all of them. Additionaly, it is possible to initiate an update for predictions manually (this button was made for testing purposes and will be removed in production).
Application requires such environment:
Language | Version |
---|---|
Node.js | 16.X.X |
Python | 3.X.X |
Steps to run an application:
- Install Rush.js:
npm install -g @microsoft/rush
- Install Node.js dependencies:
rush update
- Install Python dependecies:
cd apps/ml-service && pip install -r requirements.txt
cd apps/prediction-service && pip install -r requirements.txt
- Run services (select the
start
options for 3 of them):
rush start
Example: