This guide provides step-by-step instructions for setting up the project environment and running the script.
-
Step 1: Install Python
Download Python's last version from the official website: https://www.python.org/downloads/
Run the installer and ensure to check the option "Add Python to PATH". -
Step 2: Set Up a Virtual Environment
Open Command Prompt (Windows) or Terminal (macOS/Linux).
Navigate to your project folder: cd path/yourproject/folder
Create a virtual environment named venv: python -m venv venv
Activate the virtual environment:
On Windows: .\venv\Scripts\activate
On macOS/Linux: source venv/bin/activate -
Step 3: Install Required Libraries
pip install:
pandas
ipeadatapy
rpy2
statsmodels
duckdb
geobr
geopandas
plotly
folium
streamlit
streamlit-folium
patsy -
Step 4: Install R Software
Download R from the official website: https://cran.r-project.org/
Follow the installation instructions for your operating system. -
Step 5: Install Required R Packages
Install IpeaDataR: install.packages("ipeadatar")
There is README files with additional support. Don't hesitate to ask for assistance.