<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
<span style="color
Step1:  PART 1
Step2:  Run the Code below to create a chart containing all of the Stars with Exoplantes within 100 light years!
Step3:  <span style="color
Step4:  Run the code below to display a chart of Star color and temperatures.
Step5:  <span style="color
Step6:  Choose a Constellation from the list above and insert the 3 letter code below in the " ", for example "Vir".
Step7:  <span style="color
<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
<span style="color:magenta">Pre-Questions</span>
1. How do absolute magnitude (absmag) and apparent magnitude (mag) differ? How is luminosity related?
2. A star’s appearance gives clues about its properties. Since the nearest star would take thousands of years to reach to measure directly, how are these clues helpful to astronomers?
3. Astronomers have made observations of millions of stars, how might knowing the properties of these stars help them understand things like the composition of different parts of the universe or how solar systems form?
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)')
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
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: Run the Code below to create a chart containing all of the Stars with Exoplantes within 100 light years!
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)")
Explanation: <span style="color:magenta">Part 1 Questions</span>
4. The graph you produced shows right ascension on the x-axis and declination on the y-axis. What does the resulting graph actually show?
5. Your code also produced a chart- how are the chart and graph similar to each other? How are they different?
6. Are there any stars you can identify on both of them? What are their names? What aspect of the graph allowed you to do that? Is there
PART 2: Relationships Between Two Properties
End of explanation
Image(url= 'http://hmxearthscience.com/Galaxies%20and%20Stars/HR%20Lab%202.jpg')
Explanation: Run the code below to display a chart of Star color and temperatures.
End of explanation
# These are the abbreviations for all the constellations
data.sort_values('con').con.unique()
Explanation: <span style="color:magenta">Part 2 Questions</span>
7. Each point on the scatter plot shows a star’s temperature and luminosity. What trends do you see in the data?
8. Around what temperature is the largest range of luminosities? Using the chart below the graph you produced determine the most likely color? If a star is blue, what temperature can you infer it is?
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: <span style="color:magenta">Part 3 Question 9</span>
9. Which constellation did you choose? How many stars in it? Is it visible above Miami right now? Is it visible over Sydney?
Use this link to help find your constellation! Can we see your constellation now?
Which types of stars make up your constellation?
End of explanation
<END_TASK>