Value of Water



In [2]:
using DataFrames
df = readtable("../../results/shadowprice.csv")


Out[2]:
x1x2fips
10.00.01001
20.00.01003
30.00.01005
40.00.01007
50.00.01009
6-3.78945111378095-0.86920095189750581011
70.00.01013
80.00.01015
9-3.7345764162987303-0.86920095189750581017
100.00.01019
110.00.01021
120.00.01023
130.00.01025
140.00.01027
150.00.01029
160.00.01031
170.00.01033
180.00.01035
190.00.01037
200.00.01039
210.00.01041
220.00.01043
230.00.01045
240.00.01047
250.00.01049
260.00.01051
270.00.01053
280.00.01055
290.00.01057
300.00.01059
&vellip&vellip&vellip&vellip

In [3]:
include("../../src/lib/graphing.jl")
include("../../src/lib/datastore.jl")


INFO: Precompiling module RCall...
ERROR: LoadError: LoadError: Could not find R installation. Try setting "R_HOME" environmental variable.
 in locate_rhome at /Users/jrising/.julia/v0.4/RCall/src/setup.jl:83
 in include at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in include_from_node1 at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in include at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in include_from_node1 at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 [inlined code] from none:2
 in anonymous at no file:0
 in process_options at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in _start at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
while loading /Users/jrising/.julia/v0.4/RCall/src/setup.jl, in expression starting on line 86
while loading /Users/jrising/.julia/v0.4/RCall/src/RCall.jl, in expression starting on line 21
LoadError: LoadError: Failed to precompile RCall to /Users/jrising/.julia/lib/v0.4/RCall.ji
while loading /Users/jrising/research/water/awash/src/lib/graphing-rcall.jl, in expression starting on line 1
while loading /Users/jrising/research/water/awash/src/lib/graphing.jl, in expression starting on line 2

 in error at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in compilecache at loading.jl:383
 in require at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in include at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in include_from_node1 at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in include at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in include_from_node1 at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib

In [11]:
include("../../src/lib/readconfig.jl")
config = readconfig("../configs/standard-1year.yml")
suffix = getsuffix()


Out[11]:
""

In [12]:
usmap(DataFrame(fips=df[:fips], value=df[:x1]))


WARNING: RCall.jl: Warning: package ‘ggplot2’ was built under R version 3.2.5
Use suppressPackageStartupMessages() to eliminate package startup
messages.
WARNING: RCall.jl: 
-----------------------------------------------------------
PBS Mapping 2.69.76 -- Copyright (C) 2003-2017 Fisheries and Oceans Canada

PBS Mapping comes with ABSOLUTELY NO WARRANTY;
for details see the file COPYING.
This is free software, and you are welcome to redistribute
it under certain conditions, as outlined in the above file.

A complete user guide 'PBSmapping-UG.pdf' is located at 
/Library/Frameworks/R.framework/Versions/3.2/Resources/library/PBSmapping/doc/PBSmapping-UG.pdf

Packaged on 2015-04-23
Pacific Biological Station, Nanaimo

All available PBS packages can be found at
http://code.google.com/p/pbs-software/

To see demos, type '.PBSfigs()'.
-----------------------------------------------------------


WARNING: RCall.jl: Loading required package: maptools
Loading required package: sp
Warning: package ‘sp’ was built under R version 3.2.5
Checking rgeos availability: TRUE
Loading required package: foreign
Out[12]:
RCall.RObject{RCall.VecSxp}

Now we change the objective so it costs \$100/$m^3$ to extract groundwater.


In [13]:
df = readtable("../results/shadowprice-1000.csv")


Out[13]:
x1x2fips
1-100.0-100.01001
2-100.0-99.999999999999991003
3-100.0-100.01005
4-100.0-99.999999999999991007
5-100.00000000000001-100.01009
6-100.0-100.01011
7-100.0-100.01013
8-100.0-100.01015
9-100.0-100.01017
10-100.0-100.01019
11-100.0-99.999999999999991021
12-100.0-100.01023
13-100.0-100.01025
14-100.0-100.01027
15-100.00000000000001-100.000000000000011029
16-100.0-100.01031
17-100.0-100.000000000000011033
18-100.00000000000001-100.01035
19-100.0-100.01037
20-100.0-99.999999999999991039
21-100.0-100.01041
22-100.00000000000001-99.999999999999991043
23-100.0-100.000000000000011045
24-100.0-100.01047
25-100.0-100.000000000000011049
26-100.0-100.000000000000011051
27-100.0-100.01053
28-100.00000000000001-100.000000000000011055
29-100.0-100.01057
30-100.0-100.000000000000011059
&vellip&vellip&vellip&vellip

In [14]:
usmap(DataFrame(fips=df[:fips], value=df[:x1]))


Out[14]:
RCall.RObject{RCall.VecSxp}

In [15]:
df = readtable("../results/shadowprice-1e6.csv")
usmap(DataFrame(fips=df[:fips], value=df[:x1]))


Out[15]:
RCall.RObject{RCall.VecSxp}

In [ ]: