I am currently doing a research project and using data showing individuals who have been referred for being victims of modern slavery.
My original plan was just to do simple bar charts for each of the headers with counts. However I need to show the relationships (for example most of the child referrals are British females, for sexual exploitation). I have played around with scatter graphs but can't get my head around it when using non-numerical data. Ive used 'group-by' to get a count but then do not know what to do with the counts in relation to graphs!
here is a df i made - the actual data is much larger
test = {'Gender': ['Female','Female','Male','Male', 'Female'],
'Age': ['Adult', 'Adult', 'Child', 'Child', 'Adult'],
'Nationality': ['British', 'British', 'Vietnamese', 'Albanian', 'British'],
'Type': ['Sexual', 'Sexual', 'Sexual', 'Labour', 'Criminal'],
}
df = pd.DataFrame(test, columns = ['Gender', 'Age', 'Nationality','Type',])
dfcount=df.groupby(["Gender", "Age", "Nationality", "Type"]).Age.count().reset_index(name="count")