Former-commit-id: 212406a503bbd13eaf54a61f315fbb77a3766aba
This commit is contained in:
Michael T. Kelbaugh
2020-02-11 16:42:44 -05:00
9 changed files with 14 additions and 17 deletions

View File

@@ -1 +1 @@
{"directed": true, "multigraph": false, "graph": {}, "nodes": [{"id": "UnitedStates"}, {"id": "state"}, {"id": "county"}, {"id": "NERC"}, {"id": "HUC8"}, {"id": "climate"}, {"id": "NERC^state"}, {"id": "HUC8^state"}, {"id": "climate^state"}, {"id": "HUC8^NERC"}, {"id": "NERC^climate"}, {"id": "NERC^county"}, {"id": "HUC8^climate"}, {"id": "HUC8^county"}, {"id": "climate^county"}], "links": [{"source": "UnitedStates", "target": "state"}, {"source": "UnitedStates", "target": "NERC"}, {"source": "UnitedStates", "target": "HUC8"}, {"source": "UnitedStates", "target": "climate"}, {"source": "state", "target": "county"}, {"source": "state", "target": "NERC^state"}, {"source": "state", "target": "HUC8^state"}, {"source": "state", "target": "climate^state"}, {"source": "county", "target": "NERC^county"}, {"source": "county", "target": "HUC8^county"}, {"source": "county", "target": "climate^county"}, {"source": "NERC", "target": "NERC^state"}, {"source": "NERC", "target": "HUC8^NERC"}, {"source": "NERC", "target": "NERC^climate"}, {"source": "NERC", "target": "NERC^county"}, {"source": "HUC8", "target": "HUC8^state"}, {"source": "HUC8", "target": "HUC8^NERC"}, {"source": "HUC8", "target": "HUC8^climate"}, {"source": "HUC8", "target": "HUC8^county"}, {"source": "climate", "target": "climate^state"}, {"source": "climate", "target": "NERC^climate"}, {"source": "climate", "target": "HUC8^climate"}, {"source": "climate", "target": "climate^county"}, {"source": "NERC^state", "target": "NERC^county"}, {"source": "HUC8^state", "target": "HUC8^county"}, {"source": "climate^state", "target": "climate^county"}]}
{"directed": true, "multigraph": false, "graph": {"id": "d26744a8-2dfd-4bae-8e14-221fb96fb92b", "projection": 3085, "granularities": ["UnitedStates", "state", "NERC", "HUC8", "latlon", "county"], "minimum_intersect_area": 1, "nodes": 35614, "links": 65720, "counts": {"UnitedStates": 1, "state": 49, "NERC": 22, "HUC8": 2118, "latlon": 209, "county": 3108, "UnitedStates^state": 0, "NERC^UnitedStates": 0, "HUC8^UnitedStates": 0, "UnitedStates^latlon": 0, "UnitedStates^county": 0, "NERC^state": 126, "HUC8^state": 2830, "latlon^state": 428, "county^state": 0, "HUC8^NERC": 2643, "NERC^latlon": 350, "NERC^county": 3219, "HUC8^latlon": 4016, "HUC8^county": 11700, "county^latlon": 4795}, "areas": {"UnitedStates": 7792222.205781722, "state": 7792129.761006697, "NERC": 7792222.20578146, "HUC8": 7790895.333544435, "latlon": 7792221.132959093, "county": 7792129.761006684, "UnitedStates^state": 0, "NERC^UnitedStates": 0, "HUC8^UnitedStates": 0, "UnitedStates^latlon": 0, "UnitedStates^county": 0, "NERC^state": 7792119.496465746, "HUC8^state": 7790787.976451337, "latlon^state": 7792125.899565454, "county^state": 0, "HUC8^NERC": 7790884.9456620645, "NERC^latlon": 7792219.4876443455, "NERC^county": 7791903.372250843, "HUC8^latlon": 7790880.130752959, "HUC8^county": 7790559.405443681, "county^latlon": 7792114.229985136}}, "nodes": [{"id": "UnitedStates"}, {"id": "state"}, {"id": "county"}, {"id": "NERC"}, {"id": "HUC8"}, {"id": "latlon"}, {"id": "NERC^state"}, {"id": "HUC8^state"}, {"id": "latlon^state"}, {"id": "HUC8^NERC"}, {"id": "NERC^latlon"}, {"id": "NERC^county"}, {"id": "HUC8^latlon"}, {"id": "HUC8^county"}, {"id": "county^latlon"}], "links": [{"source": "UnitedStates", "target": "state"}, {"source": "UnitedStates", "target": "NERC"}, {"source": "UnitedStates", "target": "HUC8"}, {"source": "UnitedStates", "target": "latlon"}, {"source": "state", "target": "county"}, {"source": "state", "target": "NERC^state"}, {"source": "state", "target": "HUC8^state"}, {"source": "state", "target": "latlon^state"}, {"source": "county", "target": "NERC^county"}, {"source": "county", "target": "HUC8^county"}, {"source": "county", "target": "county^latlon"}, {"source": "NERC", "target": "NERC^state"}, {"source": "NERC", "target": "HUC8^NERC"}, {"source": "NERC", "target": "NERC^latlon"}, {"source": "NERC", "target": "NERC^county"}, {"source": "HUC8", "target": "HUC8^state"}, {"source": "HUC8", "target": "HUC8^NERC"}, {"source": "HUC8", "target": "HUC8^latlon"}, {"source": "HUC8", "target": "HUC8^county"}, {"source": "latlon", "target": "latlon^state"}, {"source": "latlon", "target": "NERC^latlon"}, {"source": "latlon", "target": "HUC8^latlon"}, {"source": "latlon", "target": "county^latlon"}]}

View File

@@ -1 +1 @@
b9a4ec463f5fa11e23a0b0fd2f142ef913ba9860
0e80818e3e9aaf580248a07fd4eb12586301e5e9

View File

@@ -5,14 +5,14 @@
"type": "object",
"properties":{
"data": {"type": "object"},
"granularity": {"type": "string", "value": "HUC8"}
"granularity": {"type": "string", "value": "latlon"}
}
},
"evaporation": {
"type": "object",
"properties":{
"data": {"type": "object"},
"granularity": {"type": "string", "value": "HUC8"}
"granularity": {"type": "string", "value": "latlon"}
}
},
"global_temp": {

View File

@@ -43,15 +43,16 @@ def temp_inc(init_data, year):
translated_ev = {}
for lat, lat_values in single_year_US.items():
for lon, lon_values in lat_values.items():
lat = float(lat)
lon = float(lon)
if lon < 0:
lon += 180
translated_pr["lat_" + str(lat) + "_lon_" + str(lon)] = lon_values[
0
]
translated_ev["lat_" + str(lat) + "_lon_" + str(lon)] = lon_values[
1
]
translated_pr[
f"lat_{int(lat*100)}_lon_{int(lon*100)}"
] = lon_values[0]
translated_ev[
f"lat_{int(lat*100)}_lon_{int(lon*100)}"
] = lon_values[1]
return (
weighted_sum - 273.15,

View File

@@ -16,7 +16,7 @@ class InnerWrapper(OuterWrapper):
def configure(self, **kwargs):
self.raw_data = kwargs['rcp26data']
if 'rcp26data' in kwargs.keys():
self.mean_temp, self.climate_data0, self.climate_data1 = temp_inc(
self.global_temp, self.precipitation, self.evaporation = temp_inc(
self.raw_data, self.incstep
)
else:
@@ -35,11 +35,11 @@ class InnerWrapper(OuterWrapper):
},
'precipitation': {
'data': self.precipitation,
'granularity': 'climate',
'granularity': 'latlon',
},
'evaporation': {
'data': self.evaporation,
'granularity': 'climate',
'granularity': 'latlon',
},
}
}

View File

@@ -2,4 +2,3 @@ pandas
numpy
statsmodels
scipy==1.2.1
bokeh

View File

@@ -1,2 +1 @@
pandas
bokeh

View File

@@ -1,2 +1 @@
pandas
bokeh

View File

@@ -1,2 +1 @@
pandas
bokeh