darribas / gds_course

Geographic Data Science, the course
https://darribas.org/gds_course
92 stars 36 forks source link

Different slope in manual Moran's plot and moran_scatterplot(mi) #4

Open MarcosDemetry opened 3 years ago

MarcosDemetry commented 3 years ago

In Lab F (https://github.com/darribas/gds_course/blob/master/content/bF/lab_F.ipynb) there is a Moran Plot created using the standardised variables of Pct_leave. When we calculate Moran's I without using the standardised variables, we get a value of 0.62. Running __moran_scatterplot(mi) gives a different (steeper) slope than the first Moran Plot with the standardised variables. It also seems that even if we were to use the standardised variables when creating mi__, we don't get the same slope as the first plot we created manually.

As a suggestion: Clarify that the value of 0.62 refers to the slope as seen in __moran_scatterplot(mi)__, or perhaps explain why they the slopes in the figures differ.

Again, thank you so much for your wonderful work!

darribas commented 3 years ago

Thank you very much for the report @MarcosDemetry, will fix it asap!