[R-sig-Geo] John Snow's cholera data/map: a more sp-ish way?
Michael Friendly
friendly at yorku.ca
Fri Oct 30 20:19:51 CET 2009
Thanks, Stephane
This has most of the pieces. The Snow.polygons aren't really polygons
-- just a set of line segments
defining the boundaries of the Theissen/Voroni polygons giving the
boundaries of the regions of deaths
"nearest" to each pump. I was just including here what I got from Waldo
Tobler, but there may have
been something more sophisticated than just Euclidean distance used here.
There may be a more sp-ish way to calculate these directly, or do
something similar, from the Snow.deaths
and Snow.pumps. The visual goal is to show the concentration of deaths
around the Broad Street pump.
For the HistData package, I'd like to simplify this a bit, complete it,
at least with a title and mapscale,
and consider if I should include some Spatial objects in the package
directly or else leave this to the
example.
Why don't I get a title using main= below?
# streets
l1=split(Snow.streets[,c("x","y")],as.factor(Snow.streets[,"street"]))
Ll1=lapply(l1,Line)
Lsl1=Lines(Ll1,paste("Street",1:length(Ll1)))
Snow.streets.sp=SpatialLines(list(Lsl1))
plot(Snow.streets.sp, main="Snow's Cholera Map of London")
-Michael
Stéphane Dray wrote:
> Hi Michael,
>
> I tried to play with the streets and transform them into a
> spatialLines by:
>
> l1=split(Snow.streets[,3:4],as.factor(Snow.streets[,1]))
> Ll1=lapply(l1,Line)
> Lsl1=Lines(Ll1,paste("Street",1:length(Ll1)))
> Snow.streets.sp=SpatialLines(list(Lsl1))
> plot(Snow.streets.sp)
>
> For the pumps:
>
> spp=SpatialPoints(Snow.pumps[,3:4])
> Snow.pumps.sp=SpatialPointsDataFrame(spp,Snow.pumps[,1:2])
> plot(Snow.pumps.sp,add=T,col='red',pch=20)
>
> For the deaths:
>
> Snow.death.sp = SpatialPoints(Snow.deaths[,2:3])
> plot(Snow.death.sp,add= T, col ='blue')
>
> For polygons, I think that it should be a little bit more
> complicated.. but I have no time today to have a look at it.
>
> Is it correct Roger?
>
> Cheers.
>
>
> Roger Bivand wrote:
>> On Fri, 30 Oct 2009, Michael Friendly wrote:
>>
>>> Hi
>>>
>>> In a new package, HistData, on R-Forge, I have a collection of
>>> historical data sets, some map-related,
>>> including the map and data related to John Snow's famous map of the
>>> 1854 cholera outbreak in London.
>>> https://r-forge.r-project.org/projects/histdata/
>>>
>>> I have two examples in example(Snow) that re-create the map of
>>> deaths, one showing Theissen polygon
>>> boundaries around the water pumps, the other showing bivariate
>>> density contours, but they are entirely
>>> done using base graphics and ordinary data frames. I'm wondering if
>>> anyone is willing to help me show
>>> a more sp-ish way to organize the data and map info and make these
>>> and other plots.
>>> More generally, I would welcome any other contributions to this
>>> project.
>>
>> Michael,
>>
>> This is good news. I'm sorry that I didn't respond to your message
>> about the Guerry dataset from almost two weeks ago, I ought to have
>> done. I'll try to get back to you on both that question:
>>
>> https://stat.ethz.ch/pipermail/r-sig-geo/2009-October/006673.html
>>
>> and this one. I encourage others to join in, because the R-forge
>> package has the potential to become a valuable resource.
>>
>> Best wishes,
>>
>> Roger
>>
>>>
>>> -Michael
>>>
>>>
>>
>
--
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT M3J 1P3 CANADA
More information about the R-sig-Geo
mailing list