Week4 – Creating Graphs for your Data
Step12: Graphing individual variables
I’m interested to represent in histograms all the 10 craters categories of step 11. In step 11, I organised all the craters into 10 groups based on their diameter (0-10, 11-20, 21-30, 31-40, 41-50, 51-60, 61-70, 71-80, 81-90, 91-100). Now, I want to see all those groups visualised as histograms.
plt.xlabel('Size of circle diameter for each crater category')
plt.title('Number of craters for each category')
To describe the Table above, I need to use python .describe() function.
Conclusion7-8: The table contains 384343 elements (count), divided into 10 categories (unique). Among these 10 groups, the most populated is 31-40 group (top) that contains craters whose diameter varies between 31 and 40 km. The most frequent group contains 40849 craters in total (freq).
Step13: Graphing combined variables
I’m interested to find how if a direct relationship exists between the crater diameter and the floor rim. To do this, I’ll use a scatter plot graph.
scat1= seaborn.regplot(x='DIAM_CIRCLE_IMAGE', y='DEPTH_RIMFLOOR_TOPOG', fit_reg=False, data=data) plt.xlabel('DIAM_CIRCLE_IMAGE') plt.ylabel('DEPTH_RIMFLOOR_TOPOG') plt.title('Relationship diameter and depth rimfloor')
I’m interested to find how if a direct relationship exists between the longitude and the crater diameter. To do this, I’ll use a scatter plot graph.
scat3= seaborn.regplot(x='LONGITUDE_CIRCLE_IMAGE', y='DIAM_CIRCLE_IMAGE', fit_reg=False, data=data) plt.xlabel('LONGITUDE_CIRCLE_IMAGE') plt.ylabel('DIAM_CIRCLE_IMAGE') plt.title('Relationship longitude and crater diameter')
Conclusion10: As shown before the 4K fold difference between the longitude and the crater diameter, the scatter plot fails to display a graph that can be interpreted. Additional data manipulation is required.