[R-sig-Geo] setting up a spatial data frame
Alexandre Villers
villers.alexandre at gmail.com
Wed Feb 22 09:52:16 CET 2012
Hi Erin,
You should provide us with more information: with no lat / lon data, it
is going to be pretty difficult to turn your data frame into a Spatial
Object... were the data collected on a regular grid, is it somehow
linked to a Spatial object that could be imported into R? From the last
columns, it seems to come from a shapefile... Do you have this file ?
Alex
On 21/02/2012 20:06, Hodgess, Erin wrote:
> Dear R Sig Geo People:
>
> I have a data frame with the following columns;
>
>> str(sup1.df)
> 'data.frame': 88 obs. of 34 variables:
> $ OBJECTID : int 1 2 3 4 5 6 7 8 9 10 ...
> $ POLYID : int 60 63 61 59 21 5 78 73 17 22 ...
> $ SUM_POP100 : int 3881 13471 16716 2497 49277 33973 22317 49757 54978 26285 ...
> $ SUM_HU100 : int 2104 5120 3664 1133 31563 15192 7411 17530 28365 14911 ...
> $ SUM_TotPop : int 3881 13471 16716 2497 49277 33973 22317 49757 54978 26285 ...
> $ SUM_HispPop : int 711 10603 3266 603 7311 15914 15338 34780 12827 7890 ...
> $ SUM_NonHispPop: int 3170 2868 13450 1894 41966 18059 6979 14977 42151 18395 ...
> $ SUM_NHOneRace : int 3091 2798 13347 1880 41129 17769 6806 14786 40969 17991 ...
> $ SUM_NH_White : int 1353 1063 6092 15 34063 4920 1824 3805 19487 14604 ...
> $ SUM_NH_Black : int 1396 1623 6562 1853 2291 12080 4364 9403 12911 1530 ...
> $ SUM_NH_AmInd : int 11 21 29 5 69 80 12 70 105 72 ...
> $ SUM_NH_Asian : int 321 78 355 6 4551 638 574 1434 8290 1725 ...
> $ SUM_NH_HawPacI: int 1 2 1 0 11 5 6 6 16 11 ...
> $ SUM_NH_Other : int 9 11 308 1 144 46 26 68 160 49 ...
> $ SUM_NH_2orMore: int 79 70 103 14 837 290 173 191 1182 404 ...
> $ SUM_VAP_TotPop: int 3103 9734 16202 1859 42519 23857 14707 34648 42986 23200 ...
> $ SUM_VAP_HispPo: int 544 7525 3141 343 5966 10149 9720 22766 9211 6228 ...
> $ SUM_VAP_NonHis: int 2559 2209 13061 1516 36553 13708 4987 11882 33775 16972 ...
> $ SUM_VAP_NHOneR: int 2510 2161 12973 1505 35936 13536 4886 11758 33023 16674 ...
> $ SUM_VAP_NH_Whi: int 1310 956 5960 15 29948 4402 1563 3391 16611 13659 ...
> $ SUM_VAP_NH_Bla: int 885 1104 6344 1480 1960 8519 2837 7167 9687 1356 ...
> $ SUM_VAP_NH_AmI: int 11 20 29 3 55 52 8 56 73 66 ...
> $ SUM_VAP_NH_Asi: int 296 74 333 6 3850 533 461 1091 6533 1547 ...
> $ SUM_VAP_HawPac: int 1 1 1 0 10 5 5 6 15 8 ...
> $ SUM_VAP_NH_Oth: int 7 6 306 1 113 25 12 47 104 38 ...
> $ SUM_VAP_NH_2or: int 49 48 88 11 617 172 101 124 752 298 ...
> $ SUM_TotHousing: int 2104 5120 3664 1133 31563 15192 7411 17530 28365 14911 ...
> $ SUM_OccHU : int 1978 4406 2921 940 27432 11484 6734 15549 24994 13595 ...
> $ SUM_VacantHU : int 126 714 743 193 4131 3708 677 1981 3371 1316 ...
> $ Name : Factor w/ 88 levels "ACRES HOME","ADDICKS PARK TEN",..: 26 68 16 14 35 33 32 27 22 82 ...
> $ Shape : logi NA NA NA NA NA NA ...
> $ Shape_Length : num 16572 43119 39256 59785 75759 ...
> $ Shape_Area : num 1.30e+07 8.04e+07 7.55e+07 7.66e+07 2.30e+08 ...
> $ DENS10 : num 0.188 0.652 0.809 0.121 2.384 ...
> There is no Longitude and latitude.
>
> How do I convert it to a spatial object, please?
>
> Thanks,
> Erin
>
> Erin M. Hodgess, PhD
> Associate Professor
> Department of Computer and Mathematical Sciences
> University of Houston - Downtown
> mailto: hodgesse at uhd.edu
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
More information about the R-sig-Geo
mailing list