How danielpyds/easy-statistics works
Purpose and execution
Easy Statistics is a local Windows-oriented Python desktop application for introductory dataset exploration and OLS linear regression. It is started directly with python main.py; releases may package this entry point as EasyStatistics.exe. There is no server, database, or web/API layer.
• Application entry/UI orchestration: main.py
• Analysis and UI-support logic: funciones.py
Desktop UI and application state
main.py provides the Tkinter graphical interface: dataset import, navigation to data/description/regression views, selection of dependent and explanatory variables, and presentation of results. The loaded dataset is application state shared across enabled views; analysis actions depend on a successful import.
• Tkinter application and event handlers: main.py
• Shared data/analysis operations: funciones.py
Dataset ingestion boundary
The import workflow accepts local .xlsx, .csv, and Stata .dta files. pandas is the boundary between external files and the in-memory tabular dataset. After loading, the UI exposes row/column counts and available column names, then enables exploration and modeling actions.
• Import-triggering UI: main.py
• File-reading/dataframe functions: funciones.py
Data exploration stage
The application renders the full pandas dataframe in a spreadsheet-like view and derives dataset metadata and descriptive statistics for inspection. This stage operates on the imported dataframe before any regression is requested.
• Data and description views: main.py
• Dataframe inspection/statistics logic: funciones.py
Regression pipeline
A user chooses one dependent variable (Y) and one or more explanatory variables (X). The selected dataframe columns are passed to statsmodels OLS, producing coefficient estimates, standard errors, p-values, R², and the model summary for the results view. Missing-value validation is a known boundary: inputs are not automatically cleaned before modeling.
• Regression selection/results UI: main.py
• OLS construction and result extraction: funciones.py
Visualization outputs
Regression-derived and exploratory visualizations are generated with matplotlib/seaborn: predicted-versus-observed values, residual histogram, and variable correlation matrix. These plots are presentation outputs embedded or displayed from the desktop workflow rather than persisted analytics artifacts.
• Plot invocation/display integration: main.py
• Plot and correlation generation: funciones.py
Runtime and dependencies
The runtime is Python 3.10+ with Tkinter for desktop UI, pandas for data handling, statsmodels for OLS, and matplotlib/seaborn for charts. Dependency installation is defined in requirements.txt; PyInstaller is the intended Windows executable packaging mechanism.
• Python dependency manifest: requirements.txt
• Runtime entry point: main.py
Main entry points: main.py Tkinter UI · funciones.py OLS analysis · requirements.txt Dependencies
Components 13
Desktop application
- Application entry · Starts the local desktop application.
main.py - Tkinter UI · Coordinates import, navigation, selections, and result presentation.
main.py - Loaded dataset state · Enables exploration and modeling after import.
main.py - Import workflow
main.py - Data and description views
main.py - Regression views · Collects Y and X selections and presents OLS results.
main.py - Plot display
main.py
Analysis pipeline
- Dataset readers · Loads supported files into a dataframe.
funciones.py - Inspection and statistics · Derives metadata and descriptive statistics.
funciones.py - OLS analysis · Builds OLS models and extracts estimates, diagnostics, and summaries.
funciones.py - Charts and correlation · Generates exploratory and regression visualizations.
funciones.py
Other components
- Local datasets
- Dependencies · Defines the desktop and analysis runtime packages.
requirements.txt
Connections 17
- Application entry → Tkinter UI: launches
- Dependencies → Application entry: runtime packages
- Tkinter UI → Import workflow: handles
- Tkinter UI → Data and description views: navigates to
- Tkinter UI → Regression views: navigates to
- Import workflow → Local datasets: selects
- Import workflow → Dataset readers: loads through
- Dataset readers → Loaded dataset state: returns dataframe
- Loaded dataset state → Data and description views: supplies data
- Data and description views → Inspection and statistics: requests
- Loaded dataset state → Regression views: supplies columns
- Regression views → OLS analysis: passes selected Y and X · Missing values are not automatically cleaned.
- OLS analysis → Regression views: results and summary
- Loaded dataset state → Charts and correlation: provides data
- OLS analysis → Charts and correlation: provides predictions and residuals
- Charts and correlation → Plot display: renders
- Tkinter UI → Plot display: displays