Skip to content

Commit

Permalink
Merge pull request #2 from jalperin/master
Browse files Browse the repository at this point in the history
updated old almviz for paperbuzz (incomplete)
  • Loading branch information
norlab authored Mar 9, 2018
2 parents dd221e5 + 1fad484 commit cb206d1
Show file tree
Hide file tree
Showing 3 changed files with 333 additions and 157 deletions.
135 changes: 135 additions & 0 deletions css/paperbuzzviz.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
.alm {
font-size: 1em;

margin-bottom: 15px;
}

.title {
font-size: 1.5em;
color: #789aa1;
text-decoration: underline;
}

.paperbuzz-chart-area {
font-size: 11px;
}

.axis line,
.axis path {
fill: none;
stroke: black;
stroke-width: 1;
shape-rendering: crispEdges;
}
.barsForTooltip {
fill: ffffff;
fill-opacity: 0;
}

.bar.main{
fill: #789aa1;
}

.bar.alt{
fill: #304345;
}

.paperbuzz-row {
margin-bottom: 1em;
}

.paperbuzz-category-row-heading {
font-size: 1.2em;
}

.paperbuzz-category-row-info {
display: inline-block;
width: 14px;
height: 14px;
border: none;
background-color: transparent;
position: relative;
top: -5px;
left: 2px;
margin-top: 5px;
}

.paperbuzz-count-label {
width: 100px;
float: left;
margin-top: .5em;
margin-right: 2em;
padding: 0.8em;
text-align: center;
border: 1px solid #c5dbec;
background: #c8d7d7;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
color: #304345;

}

.paperbuzz-count-label a {
text-decoration: none;
}

.paperbuzz-count-label a:hover {
background-color: transparent !important;
color: #555555 !important;
}

.paperbuzz-count-label img {
padding-right:0.5em;
}

.paperbuzz-count {
font-size: 1.15em;
padding-bottom: 0.4em;
padding-top: 0.4em;
font-weight: bold;
vertical-align: middle;
}

.paperbuzz-control {
text-decoration: underline;
color: blue;
}

.paperbuzz-control.active {
text-decoration: none;
}

.paperbuzz-control.disabled {
cursor: default;
text-decoration: none;
color: grey;
}

.paperbuzz-control:hover {
background-color: transparent;
}

.label-img {
vertical-align: middle;
}

#built-with {
float: right;
font-size: .75em;
}

#paperbuzzTooltip {
position: absolute;
text-align: center;
width: 80px;
height: 28px;
padding: 2px;
font: 9px sans-serif;
background: lightsteelblue;
border: 0px;
border-radius: 8px;
pointer-events: none;
}


31 changes: 19 additions & 12 deletions index2.html
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta charset="utf-8"/>
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.tooltip.min.js"></script>

Expand All @@ -14,7 +15,7 @@
</style>

<link rel="stylesheet" type="text/css" href="css/bootstrap.tooltip.min.css" />
<link rel="stylesheet" type="text/css" href="css/almviz.css" />
<link rel="stylesheet" type="text/css" href="css/paperbuzzviz.css" />
<link rel="stylesheet" type="text/css" href="css/jqueryUi.css" />
</head>
<body>
Expand All @@ -25,25 +26,31 @@ <h1>Paperbuzz Visualizations</h1>
<script type="text/javascript" src="script5.js"></script>

<script type="text/javascript">
options = {
var options = {
baseUrl: 'http://pkp-alm.lib.sfu.ca',
minItemsToShowGraph: {
minEventsForYearly: 6,
minEventsForMonthly: 6,
minEventsForDaily: 6,
minYearsForYearly: 6,
minMonthsForMonthly: 6,
minDaysForDaily: 6
minEventsForYearly: 1,
minEventsForMonthly: 1,
minEventsForDaily: 1,
minYearsForYearly: 1,
minMonthsForMonthly: 1,
minDaysForDaily: 1
},
showTitle: true,

}

d3.json('https://api.paperbuzz.org/v0/doi/10.1371/journal.pone.0000308', function(data) {

var paperbuzzviz = undefined;
var doi = '10.1371/journal.pmed.0020124';
var doi = '10.7287/peerj.preprints.3119v1';
var doi = '10.1007/s00266-017-0820-4';

d3.json('https://api.paperbuzz.org/v0/doi/' + doi, function(data) {
options.paperbuzzStatsJson = data
var paperbuzzviz = new PaperbuzzViz(options);
paperbuzzviz = new PaperbuzzViz(options);
paperbuzzviz.initViz();
});
});

</script>
<div id="built-with"><p>Built with <a href="http://d3js.org/">d3.js</a></p></div>
</body>
Expand Down
Loading

0 comments on commit cb206d1

Please sign in to comment.