This section handles the refinement of raw traffic data.
- Navigate to the
2_refine_data
folder. - Move the
.json
files extracted from the first part into thedata
folder inside the2_refine_data
directory. - Fill in the
.env
file with your API and MongoDB credentials. - Install the required dependencies:
pip install -r requirements.txt
- Run the refinement process:
python main.py
This will clean the data and store it in your MongoDB database under the collections TFG -> graphs
and TFG -> dates
.
This section handles the collection and refinement of raw data.
If you prefer not to collect data manually, pre-collected data files (TFG.dates.json
and TFG.graphs.json
) are provided in this repository.
- Ensure your MongoDB instance is running.
- Use the following commands to import the provided
.json
files:mongoimport --db TFG --collection dates --file TFG.dates.json mongoimport --db TFG --collection graphs --file TFG.graphs.json