I have a SpatialPolygonsDataFrame (poly) what I would like to attribute values from another dataframe (df). In the poly@polygons slot are a hole bunch of polygons that have a unique ID. This ID corresponds to ID values in df. df has two types of columns. df$ID are unique IDs (that correspond to poly@polygons ID) and df$1988:df$2014 are columns designating the year. Below each year is the value in question.
Any thoughts on how to get that value, and really all the values for all years for a certain ID, into poly? The end goal is to visualize the polygons colored by the value, one for all years combined, and then a GIF showing the change in values from year to year.
poly@polygons$IDYield the polygon ID's for you? Assuming a single ID occurs for many years that could be the way to get at it. Considering you have identified the ID's as unique I'm curious how you would know if the sequential years are the same polygon. Is there another variable to lets you know that the polygon is from a set of sequential polygons?