Files
project_argument/argument.ipynb
mollychi cd30ebdc37 I wrote two different specific questions that use my data, I used the poekmon lab to help A LOT.
I feel confident about what i wrote but I am stuck on the testing portion, everytime i try to test it says i must pick a kernel, but Im not sure what that is or how to do it or what to pick, I would love some assitance on this
2025-11-03 21:04:12 -05:00

343 lines
7.5 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"id": "worldwide-blood",
"metadata": {},
"source": [
"# Introduction"
]
},
{
"cell_type": "markdown",
"id": "understanding-numbers",
"metadata": {},
"source": [
"Learn about the different demographics that make swifties similar and different"
]
},
{
"cell_type": "markdown",
"id": "greater-circular",
"metadata": {},
"source": [
"## How similar are Taylor Swift Fans?"
]
},
{
"cell_type": "markdown",
"id": "appreciated-testimony",
"metadata": {},
"source": [
"As an advid Taylor Swift fan I want to learn more about the swiftie community"
]
},
{
"cell_type": "markdown",
"id": "permanent-pollution",
"metadata": {},
"source": [
"# Data"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "technical-evans",
"metadata": {},
"outputs": [],
"source": [
"#Include any import statements you will need\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "overhead-sigma",
"metadata": {},
"outputs": [],
"source": [
"### 💻 FILL IN YOUR DATASET FILE NAME BELOW 💻 ###\n",
"\n",
"file_name = \"swiftie.csv\"\n",
"dataset_path = \"data/\" + file_name\n",
"\n",
"swiftie = pd.read_csv(\"swiftie.csv\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "heated-blade",
"metadata": {},
"outputs": [],
"source": [
"swiftie.head()"
]
},
{
"cell_type": "markdown",
"id": "continental-franklin",
"metadata": {},
"source": [
"**Data Overview**\n",
"\n",
"The data I have collected is on whether people are Taylor Swift fans and what their gender is, what their age range is, and what their poltical affiliation is to see if there are any partners or correlations"
]
},
{
"cell_type": "markdown",
"id": "infinite-instrument",
"metadata": {},
"source": [
"# Methods and Results"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "basic-canadian",
"metadata": {},
"outputs": [],
"source": [
"#Import any helper files you need here"
]
},
{
"cell_type": "markdown",
"id": "recognized-positive",
"metadata": {},
"source": [
"## First Research Question: What is the percent of democratic people in this survery are Taylor Swift fans?\n"
]
},
{
"cell_type": "markdown",
"id": "graduate-palmer",
"metadata": {},
"source": [
"### Methods"
]
},
{
"cell_type": "markdown",
"id": "endless-variation",
"metadata": {},
"source": [
"\n",
" - We will be utilizing the poltical stance column and the swiftie column\n",
" - We will create a table with just the democratic survery responders\n",
" - Then we will use the mean fuction on the swiftie colounm to see the percent of democratics are swifties\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"id": "portuguese-japan",
"metadata": {},
"source": [
"### Results "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "negative-highlight",
"metadata": {},
"outputs": [],
"source": [
"dem = swiftie[swiftie.political_stance == \"dem\"]\n",
"dem\n",
"dem.Swiftie.mean()"
]
},
{
"cell_type": "markdown",
"id": "collectible-puppy",
"metadata": {},
"source": [
"## Second Research Question: What is the most common age and gender of Taylor Swift fans?\n"
]
},
{
"cell_type": "markdown",
"id": "demographic-future",
"metadata": {},
"source": [
"### Methods"
]
},
{
"cell_type": "markdown",
"id": "incorporate-roller",
"metadata": {},
"source": [
"- we will be utilizing the swiftie colounm, the age column, and the sex colounm\n",
"- We will create a table with just the Taylor Swift fans\n",
"- Then we will use a bar plot to graph the number of responses from each age group and gender "
]
},
{
"cell_type": "markdown",
"id": "juvenile-creation",
"metadata": {},
"source": [
"### Results "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "pursuant-surrey",
"metadata": {},
"outputs": [],
"source": [
"fan = swiftie[swiftie.Swiftie == \"TRUE\"]\n",
"sns.barplot(data=fan, x=\"sex\",y=\"age_range\", errprbar=None)\n",
"<Axes: xlabel='Sex', ylabel='count'>"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "located-night",
"metadata": {},
"outputs": [],
"source": [
"# 💻 YOU CAN ADD NEW CELLS WITH THE \"+\" BUTTON "
]
},
{
"cell_type": "markdown",
"id": "infectious-symbol",
"metadata": {},
"source": [
"# Discussion"
]
},
{
"cell_type": "markdown",
"id": "furnished-camping",
"metadata": {
"code_folding": []
},
"source": [
"## Considerations"
]
},
{
"cell_type": "markdown",
"id": "bearing-stadium",
"metadata": {},
"source": [
"*It's important to recognize the limitations of our research.\n",
"Consider the following:*\n",
"\n",
"- *Do the results give an accurate depiction of your research question? Why or why not?*\n",
"- *What were limitations of your datset?*\n",
"- *Are there any known biases in the data?*\n",
"\n",
"✏️ *Write your answer below:*"
]
},
{
"cell_type": "markdown",
"id": "beneficial-invasion",
"metadata": {},
"source": [
"## Summary"
]
},
{
"cell_type": "markdown",
"id": "about-raise",
"metadata": {},
"source": [
"*Summarize what you discovered through the research. Consider the following:*\n",
"\n",
"- *What did you learn about your media consumption/digital habits?*\n",
"- *Did the results make sense?*\n",
"- *What was most surprising?*\n",
"- *How will this project impact you going forward?*\n",
"\n",
"✏️ *Write your answer below:*"
]
}
],
"metadata": {
"jupytext": {
"cell_metadata_json": true,
"text_representation": {
"extension": ".Rmd",
"format_name": "rmarkdown",
"format_version": "1.2",
"jupytext_version": "1.9.1"
}
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": false,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
},
"varInspector": {
"cols": {
"lenName": 16,
"lenType": 16,
"lenVar": 40
},
"kernels_config": {
"python": {
"delete_cmd_postfix": "",
"delete_cmd_prefix": "del ",
"library": "var_list.py",
"varRefreshCmd": "print(var_dic_list())"
},
"r": {
"delete_cmd_postfix": ") ",
"delete_cmd_prefix": "rm(",
"library": "var_list.r",
"varRefreshCmd": "cat(var_dic_list()) "
}
},
"types_to_exclude": [
"module",
"function",
"builtin_function_or_method",
"instance",
"_Feature"
],
"window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 5
}