Comments (3)
Also, typo here in the original text:
db["w_Pct_Leave_std"] = db["w_Pct_Leave"] - db["Pct_Leave"].mean()
should be db["w_Pct_Leave"].mean()
from book.
The top one we will definitely fix, thanks!
The bottom, though, is indeed correct but unclear in the "Local" chapter, and technically wrong in the global chapter. We've tried to edit this before & clearly failed. I'll change both to be consistent and compute the "spatial lag of centered % leave," as this is what we use and also intend to discuss.
To explain (for @darribas and @sjsrey in future edits...), the original statistic is stated only in terms of z
and w
. There's no mean(Wz)
in the statistic, just in the scatterplot. In the original LISA paper, the mean of W.TOTCON and TOTCON are dashed lines. But, the dashed line for W.TOTCON is above zero on the y-axis:
So, we definitely plot centered x vs. W(centered x)... but what about the "axis" we're plotting onto it?
Well... this is where we may differ from GeoDa (and from Anselin (1995)) is that we also classify based on the original mean of X. spdep also does this afaict. I think this is the correct approach, too: in this scheme, "high-high" classifications reflect observations with higher-than-average x
and also higher-than-average x
nearby. Classifying with respect to mean(Wx)
shifts this latter part to "higher-than-average spatial lag" which is less intuitive...
None of it affects the actual slope of the line in the plot, just the intercept. Our version will give the intercept of the line as the average of the spatial lag when x is at its mean, while the other version would force a regression through the origin.
from book.
Paging this thread which also discussed the matter:
from book.
Related Issues (20)
- Testing framework
- Spatial Weights chapter - small typos HOT 1
- Geographic thinking for data scientists - Small typo HOT 10
- Computational Tools for Geographic Data Science - Small typos HOT 5
- Spatial Data - Small typos HOT 1
- `osmnx` version issues HOT 2
- Running the notebook on Podman HOT 1
- Centrography commented out
- Translations
- Six keywords or phrases for the book HOT 1
- Results from running the book in Jan 2023
- csv link for Brexit results is broken HOT 1
- Ch4: How spatial weights are referenced
- CH 4: Illustrations for weights
- Final Typesetting Edits HOT 1
- New version of `xarray` does not contain `open_rasterio` HOT 2
- EPSG warning
- seaborn.kdeplot is not suitable for point patterns HOT 1
- Write a blog post on 1.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from book.