I have a shapefile with the following attributes:
ID Region
1 Region1
2 Region2
3 Region3
Also I have the following record of events in a CSV file
EventID Year Month RegionID Quantity
001 2015 12 1 6
002 2015 12 2 7
003 2015 12 3 3
004 2015 11 1 4
005 2015 11 3 3
006 2015 10 2 6
007 2014 12 3 3
008 2014 11 2 2
009 2014 10 1 7
... ... ... ... ...
I would like to color my map acording to a filtered record. For instance, say I want to display all the events of November 2015. Then I would have:
ID Region Quantity
1 Region1 4
2 Region2 0
3 Region3 3
Or say I would like to display all the events of 2015. Then I would have the sum of the events:
ID Region Quantity
1 Region1 10
2 Region2 13
3 Region3 6
Is there a way to solve this problem dynamically, without rewriting the attribute table of the shp every time?
Consider that the CSV file is updated frequently.
No comments:
Post a Comment