<jupyter_start><jupyter_text>Programming Bootcamp 2018 Lesson 8 Exercises--- Note: The subparts for each question are arranged from least difficult to most difficult. If you are stuck on one of the later parts of a question, you should have an easier time starting on the next question. **Earning points (optional)**If you would like to get points/feedback for your work, please **submit your notebook to Piazza**. To do this, follow these steps:1. Click "New Post"2. For "Post Type" select `Question`3. For "Post to" select `Individual Student(s)/Instructors(s)`4. Where is says "Enter one or more names..." type `Instructors`5. For "Select Folder(s)" select `lab5`6. In "Summary" type in "[Your Full Name] Lab5 Submission"7. In the "Details" click "Insert" > "Insert File" and then insert your python notebook.8. You can then write whatever else you want in the Summary.9. Then click "Post My Question to PROGRAMMING BOOTCAMP!":Please also **write your name below**. You do not need to complete all the problems to get points. Points will be assigned, but completion is all that actually matters. Those who consistently participate throughout bootcamp will get a prize.**Due Date:** Sunday 8/18 **Name**:  1.  Importance of Data Visualization**(A)** Calculate the mean of x, the mean of y, and the regression coefficients of each (x,y) pair.**Hint:** The `stats.linregress` function from scipy may be useful here<jupyter_code># RUN ME FIRST
x1 = [10, 8, 13, 9, 11, 14, 6, 4, 12, 7, 5]
y1 = [8.04, 6.95, 7.58, 8.81, 8.33, 9.96, 7.24, 4.26, 10.84, 4.82, 5.68]

x2 = [10, 8, 13, 9, 11, 14, 6, 4, 12, 7, 5]
y2 = [9.14, 8.14, 8.74, 8.77, 9.26, 8.10, 6.13, 3.10, 9.13, 7.26, 4.74]

x3 = [10, 8, 13, 9, 11, 14, 6, 4, 12, 7, 5]
y3 = [7.46, 6.77, 12.74, 7.11, 7.81, 8.84, 6.08, 5.39, 8.15, 6.42, 5.73]
x4 = [8, 8, 8, 8, 8, 8, 8, 19, 8, 8, 8]
y4 = [6.58, 5.76, 7.71, 8.84, 8.47, 7.04, 5.25, 12.50, 5.56, 7.91, 6.89]
# Your code here<jupyter_output><empty_output><jupyter_text>**(B)** Create a scatter plot using each (x,y) dataset<jupyter_code># Your code here<jupyter_output><empty_output><jupyter_text>**(C)** Do these plots look like you expected? **Your answer here**  2. Heatmap**(A)** Create a pandas dataframe from the data stored in heatmap.csv<jupyter_code># Your code here<jupyter_output><empty_output><jupyter_text>**(B)** Create a heatmap from the dataframe<jupyter_code># Your code here<jupyter_output><empty_output><jupyter_text>**(C)** Change the default heatmap colors to a gradient of your favorite color<jupyter_code># Your code here<jupyter_output><empty_output><jupyter_text>**(D)** Add the values of each element in the heatmap as text (hint, `geom_label` will be useful here)<jupyter_code># Your code here<jupyter_output><empty_output><jupyter_text>3. Box Plot**(A)** Create a dataframe from the data in box_plot.tsv<jupyter_code># Your code here<jupyter_output><empty_output><jupyter_text>**(B)** Create a box plot comparing the blood pressure of the case and control groups<jupyter_code># Your code here<jupyter_output><empty_output><jupyter_text>**(C)** Create a violin plot showing the same data<jupyter_code># Your code here<jupyter_output><empty_output><jupyter_text>**(D)** What key feature of the data can you see in the violin plot that is hidden in the box plot? **Your answer here**  4. Histogram**(A)** Create a dataframe from the data in histogram.txt<jupyter_code># Your code here<jupyter_output><empty_output><jupyter_text>**(B)** Create a histogram from the data<jupyter_code># Your code here<jupyter_output><empty_output><jupyter_text>**(C)** Adjust the size of the histogram bins to make them larger and smaller<jupyter_code># Your code here<jupyter_output><empty_output><jupyter_text>**(D)** List an advantage and a disadvantage of using smaller histogram bins **Your answer here**  5. GWAS**(A)** Read a dataframe from the data in gwas.csv (data from [Wojcik et al.](ftp://ftp.ebi.ac.uk/pub/databases/gwas/summary_statistics/WojcikGL_31217584_GCST008025))<jupyter_code># Your code here<jupyter_output><empty_output><jupyter_text>**(B)** Create a scatter plot from the genomic location and negative log p-values<jupyter_code># Your code here<jupyter_output><empty_output><jupyter_text>**(C)** Add a significance threshold line at p=1e-6 (Hint: -log(1e-6) = 6)<jupyter_code># Your code here<jupyter_output><empty_output><jupyter_text>**(D)** Highlight the snps of interest provided by changing their color in the graph<jupyter_code>snps_of_interest = ['rs12752601', 'rs117018967', 'rs188695075', 'rs6604965', 'rs542289952']

# Your code here<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12991527264827288, 'fraction_numerical': 0.06256789050619162, 'mean_word_length': 5.63400576368876, 'pattern_counts': {'":': 1, '<': 65, '<?xml version=': 0, '>': 66, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '16', 'dir': 'jupyter-structured-clean-dedup', 'id': '164661', 'license': 'MIT', 'n_tokens_mistral': 1823, 'n_tokens_neox': 1590, 'n_words': 576, 'path': 'class_materials/Visualization/2019/data_vis_homework_problems.ipynb', 'repo_name': 'sklasfeld/python_bootcamp', 'size': '4603'}