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.

Python code7:

seaborn.countplot(x='DIAM_CIRCLE_GROUPS', data=sub10)
plt.xlabel('Size of circle diameter for each crater category')
plt.title('Number of craters for each category')

Python Results7:

To describe the Table above, I need to use python .describe() function.

Python code8:

print('Describe Table')
desc1=sub10['DIAM_CIRCLE_GROUPS'].describe()
print(desc1)

Python Results8:

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.

Python code9:

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')

Python Results9:

Conclusion9: Due to 4K fold difference between the crater diameter and rim floor depth, the scatter plot code fails to show a graph that can be interpreted.

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.

Python code10:

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')

Python Results10:

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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.