The project uses the following data sources:
- Excel files containing ODD data located in
[ODD_DATA_FOLDER]
- Excel files containing ODN data located in
[ODN_DATA_FOLDER]
- Reference CSV files for mapping series to zones:
votos_por_barrio_pn_mapeado_odd.csv
votos_por_barrio_pn_mapeado_odn.csv
The project consists of two main Jupyter notebooks:
procesamiento de datos ODD.ipynb
: Processes ODD dataprocesamiento de datos ODN.ipynb
: Processes ODN data
For both ODD and ODN data, the following steps are performed:
- Read Excel files from the specified folders
- Combine data from all files into a single DataFrame
- Filter data for the Montevideo department
- Clean and transform the data:
- Rename columns
- Modify party names
- Remove unnecessary columns
- Add zone information based on the series
- Save the processed data to CSV files
The project generates the following output files:
montevideo_odd_dataset.csv
: Initial ODD data for Montevideomontevideo_odd_dataset_modificado.csv
: Cleaned ODD datamontevideo_odd_dataset_con_zona.csv
: Final ODD data with zone informationmontevideo_odn_dataset.csv
: Initial ODN data for Montevideomontevideo_odn_dataset_modificado.csv
: Cleaned ODN datamontevideo_odn_dataset_con_zona.csv
: Final ODN data with zone information
- Ensure all required data files are in their respective folders
- Update the
[ODD_DATA_FOLDER]
and[ODN_DATA_FOLDER]
placeholders in the notebooks with the actual paths on your system - Open the Jupyter notebooks in your preferred environment
- Run all cells in each notebook to process the data
- Check the output CSV files for the results