Skip to content

Commit

Permalink
final changes chris
Browse files Browse the repository at this point in the history
  • Loading branch information
henchc committed Oct 12, 2017
1 parent ec5b027 commit 044cec1
Showing 1 changed file with 48 additions and 43 deletions.
91 changes: 48 additions & 43 deletions 01-BNHM-Data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -92,17 +92,9 @@
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Hello, World!\n"
]
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(\"Hello, World!\")"
]
Expand All @@ -116,17 +108,9 @@
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"👋, 🌏!\n"
]
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(\"\\N{WAVING HAND SIGN}, \\N{EARTH GLOBE ASIA-AUSTRALIA}!\")"
]
Expand All @@ -144,20 +128,9 @@
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"10"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"2 + 2\n",
"\n",
Expand Down Expand Up @@ -1129,7 +1102,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This looks like the time series data we want for each record (the unique ID numbers as the columns). Each record has the projected temperature in Fahrenheit for 170 years (every row!). We can plot predictions for a given record:"
"This looks like the time series data we want for each record (the unique ID numbers as the columns). Each record has the projected temperature in Fahrenheit for 170 years (every row!). We can plot predictions for few random records:"
]
},
{
Expand All @@ -1153,7 +1126,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"It looks like temperature is increasing across the board wherever these observations are occuring. We can calculate the average temperature for each year across observations:"
"It looks like temperature is increasing across the board wherever these observations are occuring. We can calculate the average temperature for each year across observations in California:"
]
},
{
Expand All @@ -1170,7 +1143,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"What's happening to the average temperature that *Argia agrioides* is going to experience in the coming year?"
"What's happening to the average temperature that *Argia agrioides* is going to experience in the coming years across California?"
]
},
{
Expand All @@ -1186,7 +1159,19 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Is there a temperature at which the *Argia agrioides* cannot survive?\n",
"Is there a temperature at which the *Argia agrioides* cannot survive? Is there one in which they particularly thrive?"
]
},
{
"cell_type": "raw",
"metadata": {},
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"What if we look specifically at the field stations and reserves? We can grab our same code that checked whether a record was within a station, and then map those `gbifID`s back to this temperature dataset:"
]
Expand Down Expand Up @@ -1223,7 +1208,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we subset the temperature dataset:"
"Now we subset the temperature dataset for only the observations that occurr within the bounds of a reserve or field station:"
]
},
{
Expand All @@ -1236,6 +1221,13 @@
"ca_df[station_obs]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's graph these observations from Santa Cruz Island against the average temperature across California where this species was observed:"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -1250,8 +1242,21 @@
"\n",
"# Use matplotlib to add labels to the x and y axes of your plot.\n",
"plt.xlabel('Year', fontsize=18)\n",
"plt.ylabel('Degrees (Fahrenheit)', fontsize=16)"
"plt.ylabel('Degrees (Fahrenheit)', fontsize=16)\n",
"plt.legend([\"CA Average\", \"Santa Cruz Island\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What does this tell you about Santa Cruz Island? As time goes on and the temperature increases, might Santa Cruz Island serve as a refuge for *Argia agrioides*?"
]
},
{
"cell_type": "raw",
"metadata": {},
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 044cec1

Please sign in to comment.