<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Properties of the Stars
Analyzing Appearance and Properties
Importing the functions and getting the data...
Step1:  PART 1
Step2:  PART 2
Step3:  PART 3
Step4:  Choose a Constellation from the list above and insert the 3 letter code below in the " ", for example "Vir".
Step5:  Links for Question #9
Can we see your constellation now?
Which types of stars make up your constellation?
<ASSISTANT_TASK:>
Python Code:
# Import modules that contain functions we need
import pandas as pd
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt
# Read in data that will be used for the calculations.
# Using pandas read_csv method, we can create a data frame
data = pd.read_csv("https://github.com/adamlamee/CODINGinK12-data/raw/master/stars.csv")
# We wish too look at the first 3 rows of our data set
data.head(3)
Explanation: Properties of the Stars
Analyzing Appearance and Properties
Importing the functions and getting the data...
End of explanation
fig = plt.figure(figsize=(15, 6))
plt.scatter(data.ra,data.dec, s=0.01)
plt.xlim(24, 0)
plt.title("All the Stars in the Catalogue")
plt.xlabel('Right Ascension (Hours)')
plt.ylabel('Declination (Degrees)')
from IPython.display import Image
from IPython.core.display import HTML 
Image(url= 'http://www.hpcf.upr.edu/~abel/phl/nearby_stars_with_exoplanets.png')
Explanation: PART 1: All the Stars in Our Catalogue
<b>Declination</b> is the distance a star is North or South of the Celestial Equator, similar to <u><i>lattitude</u></i> on Earth. <b>Right</b> <b>Ascension</b> is how far east or west a star is, similar to <u><i>longitude</u></i> on Earth.
End of explanation
# format the points on the graph
transparency = 1
size = 1
# draws a scatter plot
fig = plt.figure(figsize=(20, 4.5))
plt.scatter(data.temp, data.lum, s=size, edgecolors='none', alpha=transparency)
plt.xlim(2000,15000)
plt.ylim(0,1000)
plt.title("Does hotter mean brighter?")
plt.ylabel("Luminosity")
plt.xlabel("Temperature (K)")
Image(url= 'http://hmxearthscience.com/Galaxies%20and%20Stars/HR%20Lab%202.jpg')
Explanation: PART 2: Relationships Between Two Properties
End of explanation
# These are the abbreviations for all the constellations
data.sort_values('con').con.unique()
Explanation: PART 3: Constellations and Star Properties
End of explanation
# This shows just one constellation
data_con = data.query('con == "Vir"')
# This plots where the brightest 10 stars are in the sky
data_con = data_con.sort_values('mag').head(10)
plt.scatter(data_con.ra,data_con.dec)
plt.gca().invert_xaxis()
plt.title("A constellation in the sky")
plt.xlabel('Right Ascension (degrees)')
plt.ylabel('Declination (Hours)')
Explanation: Choose a Constellation from the list above and insert the 3 letter code below in the " ", for example "Vir".
End of explanation
# format the points on the graph
transparency = 0.2
size = 1
# draws a scatter plot
fig = plt.figure(figsize=(6, 4.5))
plt.scatter(data.temp, data.absmag, s=size, edgecolors='none', alpha=transparency)
plt.scatter(data_con.temp, data_con.absmag, color='red', edgecolors='none')
plt.xlim(17000,2000)
plt.ylim(18,-18)
plt.title("Types of stars in a constellation")
plt.ylabel("Absolute Magnitude")
plt.xlabel("Temperature (K)")
Explanation: Links for Question #9
Can we see your constellation now?
Which types of stars make up your constellation?
End of explanation
<END_TASK>