Coder Social home page Coder Social logo

CHAPTER: Spatial Inequality about book HOT 14 CLOSED

darribas avatar darribas commented on September 20, 2024
CHAPTER: Spatial Inequality

from book.

Comments (14)

darribas avatar darribas commented on September 20, 2024 1

OK my review is in at #134. I've done quite a bit of editting and I think we can merge and then move forward.

Before the chapter is considered ready for the publisher, here're the steps I'd suggest:

  1. @sjsrey, @ljwolf and @darribas to meet and discuss the actions above (maybe we don't want to do all of them, or not exactly as proposed).
  2. My suggestion is for @sjsrey to have a final go at it before we consider it done. Both Levi and I have changed it substantially and I think Serge's expertise is the ideal to make sure we're not missing anything and we're rounding it up as a chapter that noone else could do better.

from book.

darribas avatar darribas commented on September 20, 2024

Picking up from here

from book.

ljwolf avatar ljwolf commented on September 20, 2024

While working on this chapter, I've noticed that the TheilD chapter works on the whole time series matrix (as does the Theil estimator) but the Gini estimator requires one-dimensional input.

This is a user experience/api inconsistency for giddy, I think?

from book.

ljwolf avatar ljwolf commented on September 20, 2024

I've gotten all the way through the Theil decomposition at this point. There's a lot of text that needed adding, and quite a bit that still needs to be added. It gets very sparse once the decomposition methods start.

I intend to remove:
- the state-based inequality theil decomposition and subsequent exposition for state-within-region parts of the theil section
- the spatial 20:20 section
- change the rank path section to just illustrate the idea of rank paths.

Since there's just not enough space to explain them fully here. Alternatively, I could double down on the spatial 2020 + spatial 2020 rankpaths, but I think that's less informative?

from book.

darribas avatar darribas commented on September 20, 2024

#123 is merged so the first pass to the chapter is over. On to review...

from book.

darribas avatar darribas commented on September 20, 2024

Notes from DAB review:

  • @ljwolf brings this up so will replicate here so we discuss:

we (1) don't discuss wide vs. long anywhere else in the book and (2) don't ever show a wide-to-long pivot using something like pandas.wide_to_long... We also don't need the LineCode filtering, since the final dataframe is already filtered by LineCode so that all LineCode==3.

  • Related comments by DAB:
    • On (1), I'd say that's OK, as we have it now still feels useful and not too out of context. I think (2) would be good but I don't see it as a crucial USP of the book.
    • do we need the 28 extra columns if the analysis is univariate? If not, I'd vote to remote them to slim down the data footprint.
  • My suggestion would be to reproject the data and leave it ready for analysis on the data cleaning process, not halfway the analysis
  • We should agree on a global style for plots (this chapter uses seaborn's whitegrid but I don't know if it's used anywhere else)
  • I'd consider whether we could shorten the development of the Gini index. It's a pretty common, non-spatial measure and currently takes quite a bit of space
  • There are imports in halfway the chapter, when a new section requires them. Do we have a common policy for this across the book? Do we want one?
  • If we need to trim a bit of space, the first comparison of Theil and Gini could be subsumed to that with Moran's I (we're repeating the same plots several times in expensive paper estate)
  • If I get it right, the "Personal Vs Regional" section does not have any code. Is this on purpose? I'm not sure how it plugs into the broader outline of the chapter. To discuss.
  • I'd propose to add the region names to the data prep section rather than intersected in the middle of the chapter, I think it distracts the reader.
  • The function for applying the spatial Gini needs some clarification I have no idea about (potentially Ux expansion in the library itself?)
  • I think the conclusion needs a bit more love
  • I've not had a chance to add questions

from book.

darribas avatar darribas commented on September 20, 2024

#134 merged, sent over from @darribas to @sjsrey

from book.

darribas avatar darribas commented on September 20, 2024

To do, with/before final edits pass:

  • Remove incremental time series plots --> show individual ones and only one comparison at the end of the chapter
  • Adapt narrative text to reflect the above
  • lorenz_curves.head() --> lorenz_curves.T.head() so it reduces the amount of printing
  • Broken math in Theil's index
  • Broken footnote on spatial Gini

from book.

darribas avatar darribas commented on September 20, 2024

@sjsrey is on the first final pass. To complete:

Dani final pass tracker, to be edited as we go along:

Things to ensure (from #152 ):

  • Library imports (first time inline, afterwards at the top of the chapter
  • No aliases on imports (import pandas)
  • Ensure no XXX for citations
  • Ensure matplotlib RC file is picked up and figures are standard
  • Remove %matplotlib inline
  • Graphics
    • No style
    • No title (unless multi-axis titles, but not suptitle)
    • No axes for maps (ax.set_axis_off())
  • Code comments are fine if needed
  • Hide/remove code cells that we want to hide (see docs here)
  • Typesetting check
  • General flow of the text
  • Ensure there is a "next step" section at the end of the chapter pointing to further references for the topic (re. #137)

from book.

ljwolf avatar ljwolf commented on September 20, 2024

This is now ready for the second final pass.

from book.

sjsrey avatar sjsrey commented on September 20, 2024

Need to resync nb and md file #191

from book.

darribas avatar darribas commented on September 20, 2024

Just going over #191 I'm not sure the bits highlighted in my previous comment have been incorporated?

#22 (comment)

Just flagging to make sure we get them in before the three passes (e.g. removing figures with the same plots)

from book.

darribas avatar darribas commented on September 20, 2024

Bits from @darribas last pass:

  • Question for @sjsrey , @ljwolf and @darribas : do we want to mention dynamics in the title?
    • Yes, to be included in the title by the next one
  • GENERAL: How are we dealing with figures inserted in the PDF detached from the code that generates them? At the very least, we need to make a clear statement at the beginning of the book. Ideally, each code cell generating a figure would print the Figure name that generates (or something like that).
  • Do we want refs for the Gini and Theil indices?
  • GENERAL: we need a consistent way to name pysal/PySAL/Pysal across the book
    • Decided over at #213
  • Do we have a citation for the decomposed Theil @sjsrey ?
  • First equation in Section 10.5.3 (p.205) does not have a description of elements (what is $n$ and $\bar{x}$?)

PR with the rest of edits over at #207

from book.

ljwolf avatar ljwolf commented on September 20, 2024

@sjsrey any ideas for further reading on this one?

from book.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.