Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PRISM ADRIO Data Estimation and Progress #168

Merged
merged 6 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 68 additions & 11 deletions doc/devlog/2024-08-26-prism-adrio-demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,22 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 6,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ADRIO data usage estimation:\n",
"- epymorph.adrio.us_tiger.GeometricCentroid will download 0 Bytes and write 0 Bytes to disk\n",
"- epymorph.adrio.prism.Precipitation will download 1.2 MB and write 1.2 MB to disk\n",
"In total we will:\n",
"- Download 1.2 MB, taking a second (assuming 1.0 MB/s)\n",
"- Write 1.2 MB to disk cache (you have 249.1 GB free space)\n"
]
}
],
"source": [
"from epymorph.geography.us_census import CountyScope\n",
"from epymorph import *\n",
Expand Down Expand Up @@ -77,12 +90,22 @@
" },\n",
")\n",
"\n",
"precipitation = evaluate_param(rume, \"precipitation\")"
"rume.estimate_data()\n"
]
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"with sim_messaging():\n",
" precipitation = evaluate_param(rume, \"precipitation\")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -164,9 +187,22 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 9,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ADRIO data usage estimation:\n",
"- epymorph.adrio.prism.Temperature will download 51.0 MB and write 51.0 MB to disk\n",
"- epymorph.adrio.us_tiger.GeometricCentroid will download 0 Bytes and write 0 Bytes to disk\n",
"In total we will:\n",
"- Download 51.0 MB, taking 51 seconds (assuming 1.0 MB/s)\n",
"- Write 51.0 MB to disk cache (you have 249.1 GB free space)\n"
]
}
],
"source": [
"from epymorph.geography.us_census import StateScope\n",
"from epymorph import *\n",
Expand All @@ -186,25 +222,46 @@
" scope=state_scope,\n",
" time_frame=time_period,\n",
" params={\n",
" \"temperature\": prism.Temperature(time_period, \"Mean\"),\n",
" \"population\": acs5.Population(),\n",
" \"centroid\": us_tiger.GeometricCentroid(),\n",
" \"temperature\": prism.Temperature(time_period, \"Mean\"),\n",
" },\n",
")\n",
"\n",
"temperature = evaluate_param(rume, \"temperature\")"
"rume.estimate_data()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"States: ['04']\n",
"Loading epymorph.adrio.us_tiger.GeometricCentroid:\n",
" |####################| 100% (4.787s)\n",
"Loading epymorph.adrio.prism.Temperature:\n",
" |####################| 100% (21.742s)\n"
]
}
],
"source": [
"with sim_messaging():\n",
" temperature = evaluate_param(rume, \"temperature\")"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Counties: ['04']\n",
"\n",
"Temperature in Celsius:\n",
" [[18.10199928]\n",
Expand Down Expand Up @@ -242,7 +299,7 @@
}
],
"source": [
"print(f\"States: {geoids}\\n\")\n",
"print(f\"Counties: {geoids}\\n\")\n",
"\n",
"print(f\"Temperature in Celsius:\\n {temperature}\\n\")"
]
Expand Down
Loading