Spatial autocorrelation & Regression

Through the application of Moran's I and Geographic Weighted Regression (GWR) using PySAL geospatial analysis library, several observations were made regarding the distribution of wasted votes for Democrats during the 2020 presidential election in Madison, WI. The image below depicts the distribution of these wasted votes, which are defined as votes cast for a candidate that did not win, and therefore did not contribute to the candidate's victory Ballotpedia. The analysis using Moran's I revealed hotspots with a high concentration of wasted votes in certain regions of Madison, indicating a strong spatial autocorrelation. On the other hand, coldspots showed a weak spatial correlation of wasted votes. Additionally, the GWR results demonstrated that the relationship between wasted votes and key predictors, such as race and education, varied geographically, indicating the need for targeted strategies to address this issue in specific areas. This information can be useful for improving the efficiency and fairness of the election process in Madison, WI.

** Visit my GitHub to view the code for analysis steps and visualization.


  • Here I took Airbnb raw data and analyzed the Airbnb median price variation in Austin, Texas based on mean bedrooms and review score values was generated using Geographic Weighted Regression (GWR). GWR is a spatial regression technique that allows the relationship between variables to vary geographically, enabling the identification of local variations in the relationship between the variables of interest. The snapshot reveals the median price variation of Airbnb listings in different areas of Austin, Texas, highlighting the impact of mean bedrooms and review score values on the pricing of Airbnb listings. This information can be useful for both hosts and guests in making informed decisions regarding pricing and rental choices in Austin, Texas.