Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
timebars
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nesstar
timebars
Commits
b5c8ae12
Commit
b5c8ae12
authored
Feb 14, 2014
by
Kjetil Thuen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Manhandled Nesstar data into something useable
parent
a940a0a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
src/app/nesstarloader.coffee
src/app/nesstarloader.coffee
+13
-4
src/app/timebars.coffee
src/app/timebars.coffee
+1
-1
No files found.
src/app/nesstarloader.coffee
View file @
b5c8ae12
...
...
@@ -64,11 +64,20 @@ prepareFuncFactory = (callback) ->
valuesByYear
=
lodash
.
groupBy
saneValueStore
,
(
cell
)
->
parseInt
(
cell
.
tid
)
valuesByYearAnd
Gender
=
lodash
.
mapValues
valuesByYear
,
(
cell
s
)
->
lodash
.
groupBy
cell
s
,
(
cell
)
->
parseInt
(
cell
.
Kjnn
)
valuesByYearAnd
BirthYear
=
lodash
.
mapValues
valuesByYear
,
(
year
s
)
->
lodash
.
groupBy
year
s
,
(
cell
)
->
parseInt
(
cell
.
tid
)
-
parseInt
(
cell
.
alder
)
callback
valuesByYearAndGender
flattenedValuesByYearAndBirthYear
=
lodash
.
mapValues
valuesByYearAndBirthYear
,
(
years
)
->
lodash
.
map
years
,
(
birthYear
)
->
{
birthyear
:
parseInt
(
birthYear
[
0
].
tid
)
-
parseInt
(
birthYear
[
0
].
alder
)
rvalue
:
birthYear
[
0
].
value
lvalue
:
birthYear
[
1
].
value
}
callback
flattenedValuesByYearAndBirthYear
prepareDataForTimeBar
...
...
src/app/timebars.coffee
View file @
b5c8ae12
...
...
@@ -46,7 +46,7 @@ updateChart = (containerId, frameNum) ->
data
=
valuesFromFrame
containerId
,
frameNum
chart
=
d3
.
select
containerId
+
" svg.chart"
valuepoints
=
chart
.
selectAll
"g.valuepoint"
.
data
data
,
(
d
)
->
d
.
lvalue
+
","
+
d
.
rvalue
.
data
data
,
(
d
)
->
d
.
birthyear
valuepoints
.
transition
()
.
ease
"linear"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment