How exactly Resource_unit works?

23 views
Skip to first unread message

Stelios

unread,
Apr 25, 2013, 7:09:37 PM4/25/13
to opentree...@googlegroups.com
Hello, I have a question.
I understand that each tree will take a value, according to its DBH and the i-tree code assignment.
For example,talking about hydro_interception, I can see in the Resource_unit.xls, in the sheet"hydro_interception",for BDL other
BDL OTHER    0,025      0,390      1,380      3,101      5,218      7,666      10,268      10,268      10,268 

San Francisco DBH classes 3,8 11,4 22,9 38,1 53,3 68,6 83,82 99,06 114,3

So, if i insert a tree, with tree diameter 19.10 inches I get water intercepted 1201.17 gallons.
How is this generated? I thought it would multiply 19.1 inches with 1,380, but this isn't right.

Can you help me understand how I get this result?

Adam Hinz

unread,
Apr 25, 2013, 11:08:21 PM4/25/13
to opentree...@googlegroups.com
Hi,

Each value on a given resource unit line represents the eco benefit at a given diameter. For example, a DBH of 3.8 represents a hydro interception (HI) of 0.025 and a DBH of 38.1 represents a HI of 3.101. For values that aren't a specific DBH we do a simple linear interpolation.

If your DBH is d and it falls between DBH classes d1 and d2 (and corresponding resources r1 and r2) (in your case d=19.1,  d1=11.4, d2=22.9, r1=0.390, r2=1.380) we can, essentially, determine the percentage d is between d1 and d2 and apply the same percentage to r1 and r2:

p = (d - d1) / (d2 - d1)         <==> p = (19.1 - 11.4) / (22.9 - 11.4) = 0.66957
r = (r2 - r1)*p + r1                <==> r = (1.380 - 0.390)*0.66957 + 0.390 = 1.0529

I'm not sure why the value you got (1.201) is so much higher. Perhaps you have the wrong resource row?

-Adam

--
You received this message because you are subscribed to the Google Groups "opentreemap-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentreemap-us...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Stelios Kalogridis

unread,
Apr 26, 2013, 7:01:09 AM4/26/13
to opentree...@googlegroups.com
Thanks a lot for the answer.
What I get is 1201 gallons, not 1.201.So then it is multiplied by 1000?
Also, about electricity, the electricity classes are
[0.83, 20.15, 84.76, 189.9, 281.53, 368.61, 455.28, 455.28, 455.28]
So I should get r = (r2 - r1)*p + r1 = (84.76-20.15)*0.66857+20,15=64,346.
But I get Energy conserved 274.41 kWh.



--
You received this message because you are subscribed to a topic in the Google Groups "opentreemap-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opentreemap-user/9TILuYTjWc8/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to opentreemap-us...@googlegroups.com.

Stelios Kalogridis

unread,
Apr 26, 2013, 7:45:49 AM4/26/13
to opentree...@googlegroups.com
**EDIT: maybe my DBH classes are different and not those I wrote before?
1.How can I see and change my DBH classes?Are they automatically inserted or I can change them?
2.DBH classes are different for each climate zone?
3.Through admin environment, when I enter /admin/treemap/resource/ , in all resources, I see in Region:NorthernCalifornia. But I inserted all the vallues (Resource_Unit)for InlandValleys, as this was the one I needed. Should I change it manually and write "InlandValleys". Does this have something to do with anything, or it is used nowhere?

Bob Troester

unread,
Apr 28, 2013, 12:33:42 PM4/28/13
to opentree...@googlegroups.com
Stellos, hi.
Re your question about NorthernCalifornia, see question 4 in my second post in  https://groups.google.com/forum/#!topic/opentreemap-user/axAIot4e3Oo. The code in itree_import.py seems to put that fixed value in each new species record it loads in the treemap_resource table.  As far as I can see, it's not used or displayed anywhere, presently, except maybe to link with the area field in the treemap_benefitvalues table. Adam or somebody could say for sure.

If Adam or somebody could also comment on my question 3 in that same post, to clarify whether it is necessary to manually update the treemap_benefitvalues table (possible through the admin interface, as I see now) or whether loading the appropriate region iTree treemap_resource values essentially covers that need, that would be appreciated too.

Thanks,
Bob

Stelios Kalogridis

unread,
Apr 29, 2013, 2:18:11 PM4/29/13
to opentree...@googlegroups.com
*I actually found out why I got these results.
I saw in treemap/models.py in line 217-244 in my file the following rows..
So,resources for each tree,are then multiplied by some numbers (264.1 for stormwater and annual_energy_conserved 0.293, everything else(except electricity) 2.2)
What do these numbers represent and why do we multiply by them?and why for electricity we have no number?
Thanks a lot.

def calc_resource_summaries(self, br):
        summaries = {}
        summaries['annual_stormwater_management'] = br['hydro_interception_dbh'] * 264.1
        summaries['annual_electricity_conserved'] = br['electricity_dbh']
        # http://sftrees.securemaps.com/ticket/25#comment:7
        summaries['annual_natural_gas_conserved'] = br['natural_gas_dbh'] * 0.293
        summaries['annual_air_quality_improvement'] = (
            br['aq_ozone_dep_dbh'] +
            br['aq_nox_dep_dbh'] +
            br['aq_pm10_dep_dbh'] +
            br['aq_sox_dep_dbh'] +
            br['aq_nox_avoided_dbh'] +
            br['aq_pm10_avoided_dbh'] +
            br['aq_sox_avoided_dbh'] +
            br['aq_voc_avoided_dbh'] +
            br['bvoc_dbh']) * 2.2
        summaries['annual_ozone'] = br['aq_ozone_dep_dbh'] * 2.2
        summaries['annual_nox'] = br['aq_nox_dep_dbh'] + br['aq_nox_avoided_dbh'] * 2.2
        summaries['annual_pm10'] = br['aq_pm10_dep_dbh'] + br['aq_pm10_avoided_dbh'] * 2.2
        summaries['annual_sox'] = br['aq_sox_dep_dbh'] + br['aq_sox_avoided_dbh'] * 2.2
        summaries['annual_voc'] = br['aq_voc_avoided_dbh'] * 2.2
        summaries['annual_bvoc'] = br['bvoc_dbh'] * 2.2
        summaries['annual_co2_sequestered'] = br['co2_sequestered_dbh'] * 2.2
        summaries['annual_co2_avoided'] = br['co2_avoided_dbh'] * 2.2
        summaries['annual_co2_reduced'] = (br['co2_sequestered_dbh'] + br['co2_avoided_dbh']) * 2.2
        summaries['total_co2_stored'] = br['co2_storage_dbh'] * 2.2
        summaries['annual_energy_conserved'] = br['electricity_dbh'] + br['natural_gas_dbh'] * 0.293
        return summaries

Adam Hinz

unread,
Apr 29, 2013, 3:09:27 PM4/29/13
to opentree...@googlegroups.com
Hey Stelios,

A lot of the eco code was written way before my time and it's a bit
murky. To make things a bit easier to follow I've re-written all of the
eco benefit code as a standalone library:

https://github.com/azavea/eco.py

Initially the random multipliers threw me off a little as well but if
you check out:

https://github.com/azavea/eco.py/blob/master/eco/core.py#L13

You'll see the number are actually just unit conversions (with very poor
significant figures):

WATTS_PER_BTU = 0.29307107
GAL_PER_CUBIC_M = 264.172052
LBS_PER_KG = 2.20462

-Adam

On 04/29, Stelios Kalogridis wrote:
> **I actually found out why I got these results.*
> >>> So I should get r = (r2 - r1)*p + r1 = (84.76-20.15)*0.66857+20,15=**
> >>> 64,346.
> >>> But I get Energy conserved 274.41 kWh.
> >>>
> >>>
> >>>
> >>> On Fri, Apr 26, 2013 at 6:08 AM, Adam Hinz <ah...@azavea.com> wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> Each value on a given resource unit line represents the eco benefit at
> >>>> a given diameter. For example, a DBH of 3.8 represents a hydro interception
> >>>> (HI) of 0.025 and a DBH of 38.1 represents a HI of 3.101. For values that
> >>>> aren't a specific DBH we do a simple linear interpolation.
> >>>>
> >>>> If your DBH is d and it falls between DBH classes d1 and d2 (and
> >>>> corresponding resources r1 and r2) (in your case d=19.1, d1=11.4, d2=22.9,
> >>>> r1=0.390, r2=1.380) we can, essentially, determine the percentage d is
> >>>> between d1 and d2 and apply the same percentage to r1 and r2:
> >>>>
> >>>> p = (d - d1) / (d2 - d1) <==> p = (19.1 - 11.4) / (22.9 - 11.4)
> >>>> = 0.66957
> >>>> r = (r2 - r1)*p + r1 <==> r = (1.380 - 0.390)*0.66957 +
> >>>> 0.390 = 1.0529
> >>>>
> >>>> I'm not sure why the value you got (1.201) is so much higher. Perhaps
> >>>> you have the wrong resource row?
> >>>>
> >>>> -Adam
> >>>>
> >>>> On Apr 25, 2013, at 7:09 PM, Stelios <stelios.k...@gmail.com> wrote:
> >>>>
> >>>> Hello, I have a question.
> >>>> I understand that each tree will take a value, according to its DBH and
> >>>> the i-tree code assignment.
> >>>> For example,talking about hydro_interception, I can see in the
> >>>> Resource_unit.xls, in the sheet"hydro_interception",for BDL other
> >>>> BDL OTHER 0,025 0,390 *1,380* 3,101 5,218
> >>>> 7,666 10,268 10,268 10,268
> >>>>
> >>>> San Francisco DBH classes 3,8 11,4 22,9 38,1 53,3 68,6 83,82 99,06
> >>>> 114,3
> >>>> So, if i insert a tree, with tree diameter 19.10 inches I get water
> >>>> intercepted 1201.17 gallons.
> >>>> How is this generated? I thought it would multiply 19.1 inches with *
> >>>> 1,380*, but this isn't right.
> >>>>
> >>>> Can you help me understand how I get this result?
> >>>>
> >>>>
> >>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> >>>> .
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> You received this message because you are subscribed to a topic in the
> >>>> Google Groups "opentreemap-user" group.
> >>>> To unsubscribe from this topic, visit https://groups.google.com/d/**
> >>>> topic/opentreemap-user/**9TILuYTjWc8/unsubscribe?hl=en-**US<https://groups.google.com/d/topic/opentreemap-user/9TILuYTjWc8/unsubscribe?hl=en-US>
> >>>> .
> >>>> To unsubscribe from this group and all its topics, send an email to
> >>>> opentreemap-us...@**googlegroups.com.
> >>>>
> >>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> >>>> .
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >> --
> > You received this message because you are subscribed to a topic in the
> > Google Groups "opentreemap-user" group.
> > To unsubscribe from this topic, visit
> > https://groups.google.com/d/topic/opentreemap-user/9TILuYTjWc8/unsubscribe?hl=en-US
> > .
> > To unsubscribe from this group and all its topics, send an email to
> > opentreemap-us...@googlegroups.com.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
> >
>

--

Adam Hinz
Software Engineer, Azavea
ad...@adamhinz.com | c: 608-445-8391 | Twitter: @ahinz

Adam Hinz

unread,
Apr 29, 2013, 3:14:21 PM4/29/13
to opentree...@googlegroups.com
Hey Bob,

You are correct, the region isn't used anywhere directly. However, the
actual benefit values rely heavily on the region that you exported from
the original iTree data.

As for "question 3":
> 3)And for extra bonus points! - in the External Data wiki page there is the comment, 'OpenTreeMap requires cost values for 10 benefits trees bring to the urban landscape. Defaults for each region can be found in iTree's data files, however you may be able to locate more accurate data for your specific city or area. Enter the following values in the "treemap_benefitvalues" table. (etc.)'
>
> The fields in the treemap_benefitvalues tables as I see them are
> uniformly 0.01 - like electricity 0.01 dollar per kWh. Does doing the
> itree_import somehow automatically override those numbers with the
> treemap_resource data, or are the appropriate numbers to be found
> elsewhere in other iTree data files? If it is necessary to update
> treemap_benefitvalues, does one do it directly with pgadmin3 or psql
> or is there a form that I've missed?

iTree import will *not* override values in this particular
table. Benefit values should be set in the admin (or directly via
psql). The values in the table are used to convert from benefit units
(kwh) to dollars (or whatever currency). In this case, OTM requires that
the deployer put in appropriate values.

Good luck- let me know if you need any more help.

-Adam
> >> On Fri, Apr 26, 2013 at 6:08 AM, Adam Hinz <ah...@azavea.com<javascript:>
> >> > wrote:
> >>
> >>> Hi,
> >>>
> >>> Each value on a given resource unit line represents the eco benefit at a
> >>> given diameter. For example, a DBH of 3.8 represents a hydro interception
> >>> (HI) of 0.025 and a DBH of 38.1 represents a HI of 3.101. For values that
> >>> aren't a specific DBH we do a simple linear interpolation.
> >>>
> >>> If your DBH is d and it falls between DBH classes d1 and d2 (and
> >>> corresponding resources r1 and r2) (in your case d=19.1, d1=11.4, d2=22.9,
> >>> r1=0.390, r2=1.380) we can, essentially, determine the percentage d is
> >>> between d1 and d2 and apply the same percentage to r1 and r2:
> >>>
> >>> p = (d - d1) / (d2 - d1) <==> p = (19.1 - 11.4) / (22.9 - 11.4)
> >>> = 0.66957
> >>> r = (r2 - r1)*p + r1 <==> r = (1.380 - 0.390)*0.66957 +
> >>> 0.390 = 1.0529
> >>>
> >>> I'm not sure why the value you got (1.201) is so much higher. Perhaps
> >>> you have the wrong resource row?
> >>>
> >>> -Adam
> >>>
> >>> On Apr 25, 2013, at 7:09 PM, Stelios <stelios.k...@gmail.com<javascript:>>
> >>> wrote:
> >>>
> >>> Hello, I have a question.
> >>> I understand that each tree will take a value, according to its DBH and
> >>> the i-tree code assignment.
> >>> For example,talking about hydro_interception, I can see in the
> >>> Resource_unit.xls, in the sheet"hydro_interception",for BDL other
> >>> BDL OTHER 0,025 0,390 *1,380* 3,101 5,218
> >>> 7,666 10,268 10,268 10,268
> >>>
> >>> San Francisco DBH classes 3,8 11,4 22,9 38,1 53,3 68,6 83,82 99,06 114,3
> >>> So, if i insert a tree, with tree diameter 19.10 inches I get water
> >>> intercepted 1201.17 gallons.
> >>> How is this generated? I thought it would multiply 19.1 inches with *
> >>> 1,380*, but this isn't right.
> >>>
> >>> Can you help me understand how I get this result?
> >>>
> >>>
> >>> For more options, visit https://groups.google.com/groups/opt_out.
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> You received this message because you are subscribed to a topic in the
> >>> Google Groups "opentreemap-user" group.
> >>> To unsubscribe from this topic, visit
> >>> https://groups.google.com/d/topic/opentreemap-user/9TILuYTjWc8/unsubscribe?hl=en-US
> >>> .
> >>> To unsubscribe from this group and all its topics, send an email to
> >>> opentreemap-us...@googlegroups.com <javascript:>.
> >>> For more options, visit https://groups.google.com/groups/opt_out.
> >>>
> >>>
> >>>
> >>
> >>
> >
>

--

Reply all
Reply to author
Forward
0 new messages