[R-sig-Geo] How to order statistical data (spatial panel)

Kent Johnson kent3737 at gmail.com
Sat Sep 16 19:02:02 CEST 2017


>
>
> Date: Fri, 15 Sep 2017 11:45:59 -0500
> From: Rolando Valdez <rvaldezr at gmail.com>
> To: r-sig-geo at r-project.org
> Subject: [R-sig-Geo] How to order statistical data (spatial panel)
> Message-ID:
>         <CAFvJtoHnwOqtd8oWj_P3sfLRAX-uCHgGhDTi8Hr8TgDJkT++-w at mail.
> gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hello all,
>
> I will to perform a spatial panel data, I have statistical data of 2000+
> territories in 5 years ordered as typical simple panel data (Each
> territoriy has a unique geocode).
>
> In the other hand I have a shapefile with those 2000+ territories, but,
> when I've opened the dbf file, the order of units seems to have not order
> criteria. These ones have geocode too (same than statistical).
>
> The question is, how should I order my data to garantee a right matching
> between statistical and geographical data?
>

I would think you would do a merge or join of the spatial data with your
statistical data using geocode as the key, rather than a cbind or similar
operation that depends on order. See ?sp::merge or ?sf::merge.sf.

Kent

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list