Using R, I am trying to make a simple stacked bar graph of the counts of different settlement types by date. I have 3 ways of accounting for date. Below is an example of my database
ID Settlement Start End Mid
01 Urban 200 400 300
02 Rural 450 850 650
03 Military 1300 1400 1350
04 Castle 2 1000 501
so far I have
count(ratData, vars = "Settlement")
which returns
Settlement freq
1 78
2 Castle 25
3 Cave 3
4 Fortification 5
5 Hill Fort 2
6 Industrial (quarry) 1
7 Manor 2
8 Military 4
9 Military camp 1
10 Military Camp 3
11 Military site 1
12 Mining 1
13 Monastic 15
14 Monastic/Rural? 1
15 Port 5
16 River-site 2
17 Roman fort 1
18 Roman Fort 1
19 Roman settlement 3
20 Rural 22
21 Settlement 2
22 urban 1
23 Urban 123
24 Villa 4
25 Wic 13
Then to plot
ggplot(v, aes(x=Settlement, y=freq)) + geom_bar(stat='identity', fill='lightblue', color='black')
This however shows settlement type on the x axis instead of stacking the settlement types. This is missing date data. I would like to bin them into 100 year bins from 1-1500 and make a stacked bar graph of settlement types per bin to illustrate presence over time.