# Is the following code using some regression technique?

**URL:** <https://discourse.julialang.org/t/is-the-following-code-using-some-regression-technique/26636>\
**Category:** Statistics\
**Created:** [July 22, 2019, 3:42pm UTC](https://discourse.julialang.org/t/is-the-following-code-using-some-regression-technique/26636 "2019-07-22T15:42:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [July 22, 2019, 3:42pm UTC](https://discourse.julialang.org/t/is-the-following-code-using-some-regression-technique/26636/1 "2019-07-22T15:42:58Z")

</div>

The following piece of code is from the OpenStreetMapX package. The logic is pretty straightforward to follow. I was just wondering, where is the constant 3.6 from? Does it come from some statistical fittings? Any comments are greatly appreciated.

```julia
### Transpose distances to times ###
function network_travel_times(m::OpenStreetMapX.MapData, class_speeds::Dict{Int,Float64} = OpenStreetMapX.SPEED_ROADS_URBAN)
    @assert length(m.e) == length(m.w.nzval)
    indices = [(m.v[i],m.v[j]) for (i,j) in m.e]
    w = Array{Float64}(undef,length(m.e))
    for i = 1:length(w)
        w[i] = 3.6 * (m.w[indices[i]]/class_speeds[m.class[i]])
    end
    return w
end

```

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [July 22, 2019, 3:57pm UTC](https://discourse.julialang.org/t/is-the-following-code-using-some-regression-technique/26636/2 "2019-07-22T15:57:32Z")

</div>

3.6 is converting km/h to m/s so could be something with that.
