<jupyter_start><jupyter_text>Do opioid overdoes tend to be associated with less affluent areas—that is, areas where families have lower incomes?Yes, there appears to be a negative relationship between families with lower incomes and higher opioid overdoses. I chose a scatterplot to examine the relationship between the two numeric variables (MedianHouseholdIncome and FPOO-Rate) since it clearly identifies a cluster of data points in the lower-end of the income scale associated with higher overdose rates.<jupyter_code>fig, ax = plt.subplots()

ax.scatter(df_op['MedianHouseholdIncome'], df_op['FPOO-Rate'], alpha=0.5, c = 'g')  
fig.suptitle('Median Income vs. Opioid Overdose Rate ')   
ax.xaxis.set_label_text('Median Household Income')  
ax.yaxis.set_label_text('Opioid Overdose Rate')       
fig.set_size_inches(7,5)
plt.show()<jupyter_output><empty_output><jupyter_text>Some people who start with opioid addictions are reported to transition to heroin use. What is the relationship in Virginia counties between opioid overdoses and heroin overdoses? The scatterplot of opioid overdose vs herion overdose rates does appear to present a pattern of higher heroin overdoses in the lower range of opioid overdoses which could be evidence to support a hypothesis of opioid acting as a gateway drug to heroin.<jupyter_code>fig, ax = plt.subplots()

ax.scatter(df_op['FPOO-Rate'], df_op['FFHO-Rate'], alpha=0.5, c = 'r')  
fig.suptitle('Opioid Overdose Rate vs. Heroin Overdose Rate ')   
ax.xaxis.set_label_text('Opioid Overdose Rate')  
ax.yaxis.set_label_text('Heroin Overdose Rate')       
fig.set_size_inches(7,5)
plt.show()
df_prez = pd.read_csv('presidents.csv')
df_prez
df_prez.describe()<jupyter_output><empty_output><jupyter_text>Which states are associated with the greatest number of United States presidents in terms of the presidents’ birthplaces?The states with the most U.S. Presidents' birthplace are Virginia, Ohio, New York, and Massachusetts<jupyter_code>import numpy as np
df_prez.sort_values('State', inplace=True)
x = df_prez['State']
plt.hist(x, bins=15)
plt.title('Histogram of U.S. Presidents and Birth States')
plt.ylabel('Frequency')
plt.xlabel('State')
plt.show()

df_cars = pd.read_csv('TOTALNSA.csv')
df_cars.head()
df_cars.columns
df_cars.columns.values<jupyter_output><empty_output><jupyter_text>How have vehicle sales in the United States varied over time?The U.S. vehicle sales trend appears to be cyclical and perhaps closely follow overall economic trends in the U.S. I chose a line chart for this time series data for its ease in visualizing the data trend overtime.<jupyter_code>from pandas import read_csv
from matplotlib import pyplot
series = read_csv('TOTALNSA.csv', header=0, index_col=0, parse_dates=True, squeeze=True)
series.plot()
plt.title('US Vehicle Sales')
plt.xlabel('Year')
plt.ylabel('Total Sales')
pyplot.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08868184955141477, 'fraction_numerical': 0.004140786749482402, 'mean_word_length': 6.036407766990291, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '179052', 'license': 'CC0-1.0', 'n_tokens_mistral': 960, 'n_tokens_neox': 888, 'n_words': 310, 'path': 'exampleContent/BasicGraphAssignment.ipynb', 'repo_name': 'maj0hns0n/maj0hns0n.github.io', 'size': '2898'}