Skip to content

Commit

Permalink
Addressed comments in issue: #6
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Petryszak committed Jun 9, 2020
1 parent dc7833b commit 26a206c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 62 deletions.
Binary file added user-story-2-software-citations/example_plot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -11781,7 +11781,7 @@
<table>
<thead><tr>
<th style="text-align:left"><img src="https://github.com/datacite/pidgraph-notebooks-python/blob/master/images/freya_200x121.png?raw=true" alt="FREYA Logo"></th>
<th style="text-align:left"><a href="https://www.project-freya.eu/en">FREYA</a> WP2 <a href="https://github.com/datacite/freya/issues/63">User Story 8</a></th>
<th style="text-align:left"><a href="https://www.project-freya.eu/en">FREYA</a> WP2 <a href="https://github.com/datacite/freya/issues/63">User Story 2</a></th>
<th style="text-align:left">As a software author, I want to be able to see the citations of my software aggregated across all versions, so that I see a complete picture of reuse.</th>
</tr>
</thead>
Expand All @@ -11791,11 +11791,11 @@
</tr>
</tbody>
</table>
<p>This notebook uses the <a href="https://api.datacite.org/graphql">DataCite GraphQL API</a> to retrieve software: <a href="https://doi.org/10.5281/zenodo.2799488">Calculation Package: Inverting topography for landscape evolution model process representation</a>, including all its versions, so that its overall reuse can be quantified.</p>
<p>This notebook uses the <a href="https://api.datacite.org/graphql">DataCite GraphQL API</a> to retrieve metadata about software titled: <a href="https://doi.org/10.5281/zenodo.2799488">Calculation Package: Inverting topography for landscape evolution model process representation</a>, including all its versions, so that its overall reuse can be quantified.</p>
<p><strong>Goal</strong>: By the end of this notebook, for a given software you should be able to display:</p>
<ul>
<li>Counts of citations, views and downloads metrics, aggregated across all versions of the software</li>
<li>An interactive stacked bar plot showing how the metric counts of each version contribute to the corresponding aggregated metric counts.</li>
<li>Counts of <ins>citations, views and downloads</ins> metrics, aggregated across all versions of the software</li>
<li>An interactive stacked bar plot showing how the metric counts of each version contribute to the corresponding aggregated metric counts, e.g.<br> <img src="example_plot.png" width="258" height="215" /></li>
</ul>

</div>
Expand All @@ -11812,7 +11812,7 @@ <h2 id="Install-libraries-and-prepare-GraphQL-client">Install libraries and prep
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[51]:</div>
<div class="prompt input_prompt">In&nbsp;[1]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">%%</span><span class="k">capture</span>
Expand All @@ -11827,7 +11827,7 @@ <h2 id="Install-libraries-and-prepare-GraphQL-client">Install libraries and prep
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[46]:</div>
<div class="prompt input_prompt">In&nbsp;[2]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># Prepare the GraphQL client</span>
Expand Down Expand Up @@ -11857,14 +11857,14 @@ <h2 id="Install-libraries-and-prepare-GraphQL-client">Install libraries and prep
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Define-and-run-GraphQL-query">Define and run GraphQL query<a class="anchor-link" href="#Define-and-run-GraphQL-query">&#182;</a></h2><p>Define the GraphQL query to retrieve metadata for software: <a href="https://doi.org/10.5281/zenodo.2799488">Calculation Package: Inverting topography for landscape evolution model process representation</a>.</p>
<h2 id="Define-and-run-GraphQL-query">Define and run GraphQL query<a class="anchor-link" href="#Define-and-run-GraphQL-query">&#182;</a></h2><p>Define the GraphQL query to retrieve metadata for the software titled: <a href="https://doi.org/10.5281/zenodo.2799488">Calculation Package: Inverting topography for landscape evolution model process representation</a> using its DOI.</p>

</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[47]:</div>
<div class="prompt input_prompt">In&nbsp;[3]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># Generate the GraphQL query to retrieve the required software</span>
Expand Down Expand Up @@ -11940,7 +11940,7 @@ <h2 id="Define-and-run-GraphQL-query">Define and run GraphQL query<a class="anch
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[48]:</div>
<div class="prompt input_prompt">In&nbsp;[4]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">import</span> <span class="nn">json</span>
Expand All @@ -11957,14 +11957,14 @@ <h2 id="Define-and-run-GraphQL-query">Define and run GraphQL query<a class="anch
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Display-total-software-metrics">Display total software metrics<a class="anchor-link" href="#Display-total-software-metrics">&#182;</a></h2><p>Display total number of citations, views and downloads across all versions of software: <a href="https://doi.org/10.5281/zenodo.2799488">Calculation Package: Inverting topography for landscape evolution model process representation</a>.</p>
<h2 id="Display-total-software-metrics">Display total software metrics<a class="anchor-link" href="#Display-total-software-metrics">&#182;</a></h2><p>Display total number of <ins>citations, views and downloads</ins> across all versions of software: <a href="https://doi.org/10.5281/zenodo.2799488">Calculation Package: Inverting topography for landscape evolution model process representation</a>.</p>

</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[49]:</div>
<div class="prompt input_prompt">In&nbsp;[5]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># Get the total count per metric, aggregated for across all versions of the software</span>
Expand Down Expand Up @@ -12001,7 +12001,7 @@ <h2 id="Display-total-software-metrics">Display total software metrics<a class="


<div class="output_markdown rendered_html output_subarea ">
<p>Aggregated metric counts for <a href="https://doi.org/10.5281/zenodo.2799488">Calculation Package: Inverting topography for landscape evolution model process representation</a> across all its versions:</p>
<p>Aggregated metric counts for software: <a href="https://doi.org/10.5281/zenodo.2799488">Calculation Package: Inverting topography for landscape evolution model process representation</a> across all its versions:</p>

</div>

Expand Down Expand Up @@ -12048,7 +12048,7 @@ <h2 id="Plot-metric-counts-per-software-version">Plot metric counts per software
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[52]:</div>
<div class="prompt input_prompt">In&nbsp;[6]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">import</span> <span class="nn">plotly.io</span> <span class="k">as</span> <span class="nn">pio</span>
Expand Down Expand Up @@ -12138,7 +12138,7 @@ <h2 id="Plot-metric-counts-per-software-version">Plot metric counts per software
</div>

<div class="output_area">
<div class="prompt output_prompt">Out[52]:</div>
<div class="prompt output_prompt">Out[6]:</div>


<div class="output_html rendered_html output_subarea output_execute_result">
Expand All @@ -12158,19 +12158,6 @@ <h2 id="Plot-metric-counts-per-software-version">Plot metric counts per software
</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span>
</pre></div>

</div>
</div>
</div>

</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
" ![FREYA Logo](https://github.com/datacite/pidgraph-notebooks-python/blob/master/images/freya_200x121.png?raw=true) | [FREYA](https://www.project-freya.eu/en) WP2 [User Story 8](https://github.com/datacite/freya/issues/63) | As a software author, I want to be able to see the citations of my software aggregated across all versions, so that I see a complete picture of reuse.\n",
" ![FREYA Logo](https://github.com/datacite/pidgraph-notebooks-python/blob/master/images/freya_200x121.png?raw=true) | [FREYA](https://www.project-freya.eu/en) WP2 [User Story 2](https://github.com/datacite/freya/issues/63) | As a software author, I want to be able to see the citations of my software aggregated across all versions, so that I see a complete picture of reuse.\n",
" :------------- | :------------- | :-------------\n",
"\n",
"This notebook uses the [DataCite GraphQL API](https://api.datacite.org/graphql) to retrieve software: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488), including all its versions, so that its overall reuse can be quantified.\n",
"This notebook uses the [DataCite GraphQL API](https://api.datacite.org/graphql) to retrieve metadata about software titled: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488), including all its versions, so that its overall reuse can be quantified.\n",
"\n",
"**Goal**: By the end of this notebook, for a given software you should be able to display:\n",
"- Counts of citations, views and downloads metrics, aggregated across all versions of the software\n",
"- An interactive stacked bar plot showing how the metric counts of each version contribute to the corresponding aggregated metric counts."
"- Counts of <ins>citations, views and downloads</ins> metrics, aggregated across all versions of the software\n",
"- An interactive stacked bar plot showing how the metric counts of each version contribute to the corresponding aggregated metric counts, e.g.<br> <img src=\"example_plot.png\" width=\"258\" height=\"215\" />"
]
},
{
Expand All @@ -23,7 +23,7 @@
},
{
"cell_type": "code",
"execution_count": 51,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -34,7 +34,7 @@
},
{
"cell_type": "code",
"execution_count": 46,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -60,12 +60,12 @@
"metadata": {},
"source": [
"## Define and run GraphQL query\n",
"Define the GraphQL query to retrieve metadata for software: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488)."
"Define the GraphQL query to retrieve metadata for the software titled: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488) using its DOI."
]
},
{
"cell_type": "code",
"execution_count": 47,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -134,7 +134,7 @@
},
{
"cell_type": "code",
"execution_count": 48,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -147,18 +147,18 @@
"metadata": {},
"source": [
"## Display total software metrics\n",
"Display total number of citations, views and downloads across all versions of software: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488)."
"Display total number of <ins>citations, views and downloads</ins> across all versions of software: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488)."
]
},
{
"cell_type": "code",
"execution_count": 49,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/markdown": [
"Aggregated metric counts for [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488) across all its versions:"
"Aggregated metric counts for software: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488) across all its versions:"
],
"text/plain": [
"<IPython.core.display.Markdown object>"
Expand Down Expand Up @@ -216,7 +216,7 @@
},
{
"cell_type": "code",
"execution_count": 52,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -245,10 +245,10 @@
" "
],
"text/plain": [
"<IPython.lib.display.IFrame at 0x11ed657f0>"
"<IPython.lib.display.IFrame at 0x10e91ce80>"
]
},
"execution_count": 52,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -320,13 +320,6 @@
"display(Markdown(\"Citations, views and downloads counts for software: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488) across all its versions, shown as stacked bar plot:\"))\n",
"IFrame(src=\"./out.html\", width=500, height=500)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
19 changes: 6 additions & 13 deletions user-story-2-software-citations/py-software-citations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
" ![FREYA Logo](https://github.com/datacite/pidgraph-notebooks-python/blob/master/images/freya_200x121.png?raw=true) | [FREYA](https://www.project-freya.eu/en) WP2 [User Story 8](https://github.com/datacite/freya/issues/63) | As a software author, I want to be able to see the citations of my software aggregated across all versions, so that I see a complete picture of reuse.\n",
" ![FREYA Logo](https://github.com/datacite/pidgraph-notebooks-python/blob/master/images/freya_200x121.png?raw=true) | [FREYA](https://www.project-freya.eu/en) WP2 [User Story 2](https://github.com/datacite/freya/issues/63) | As a software author, I want to be able to see the citations of my software aggregated across all versions, so that I see a complete picture of reuse.\n",
" :------------- | :------------- | :-------------\n",
"\n",
"This notebook uses the [DataCite GraphQL API](https://api.datacite.org/graphql) to retrieve software: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488), including all its versions, so that its overall reuse can be quantified.\n",
"This notebook uses the [DataCite GraphQL API](https://api.datacite.org/graphql) to retrieve metadata about software titled: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488), including all its versions, so that its overall reuse can be quantified.\n",
"\n",
"**Goal**: By the end of this notebook, for a given software you should be able to display:\n",
"- Counts of citations, views and downloads metrics, aggregated across all versions of the software\n",
"- An interactive stacked bar plot showing how the metric counts of each version contribute to the corresponding aggregated metric counts."
"- Counts of <ins>citations, views and downloads</ins> metrics, aggregated across all versions of the software\n",
"- An interactive stacked bar plot showing how the metric counts of each version contribute to the corresponding aggregated metric counts, e.g.<br> <img src=\"example_plot.png\" width=\"258\" height=\"215\" />"
]
},
{
Expand Down Expand Up @@ -60,7 +60,7 @@
"metadata": {},
"source": [
"## Define and run GraphQL query\n",
"Define the GraphQL query to retrieve metadata for software: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488)."
"Define the GraphQL query to retrieve metadata for the software titled: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488) using its DOI."
]
},
{
Expand Down Expand Up @@ -147,7 +147,7 @@
"metadata": {},
"source": [
"## Display total software metrics\n",
"Display total number of citations, views and downloads across all versions of software: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488)."
"Display total number of <ins>citations, views and downloads</ins> across all versions of software: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488)."
]
},
{
Expand Down Expand Up @@ -257,13 +257,6 @@
"display(Markdown(\"Citations, views and downloads counts for software: [Calculation Package: Inverting topography for landscape evolution model process representation](https://doi.org/10.5281/zenodo.2799488) across all its versions, shown as stacked bar plot:\"))\n",
"IFrame(src=\"./out.html\", width=500, height=500)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 26a206c

Please sign in to comment.