<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>DataONE Usage Statistics &#8212; v2.1.0-beta</title>
    
    <link rel="stylesheet" href="../_static/dataone.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '2.1.0-beta',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="../_static/mathjax_pre.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="DataONE APIs" href="../apis/index.html" />
    <link rel="prev" title="Supporting Online Citation Managers through COinS" href="CitationManagerSupport.html" />
   
  
  <link media="only screen and (max-device-width: 480px)" href="../_static/small_dataone.css" type= "text/css" rel="stylesheet" />

  </head>
  <body role="document">
  
    <div class="version_notice">
      <p>
      <span class='bold'>Warning:</span> These documents are under active 
      development and subject to change (version 2.1.0-beta).<br />
      The latest release documents are at:
      <a href="https://purl.dataone.org/architecture">https://purl.dataone.org/architecture</a>
      </p>
    </div>

    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../apis/index.html" title="DataONE APIs"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="CitationManagerSupport.html" title="Supporting Online Citation Managers through COinS"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html"></a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="dataone-usage-statistics">
<h1>DataONE Usage Statistics<a class="headerlink" href="#dataone-usage-statistics" title="Permalink to this headline">¶</a></h1>
<div class="section" id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h2>
<p>DataONE Member Nodes and Coordinating Nodes record access events that result
from DataONE API calls. A  list of access events and the API calls that logged
these events is shown in <em>Table 1</em>.</p>
<p><em>Table 1</em> Access Events</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="49%" />
<col width="29%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Access event</th>
<th class="head">DataONE MN API call</th>
<th class="head">Metacat API call</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>create</td>
<td>MNStorage.create()</td>
<td>action=insert</td>
</tr>
<tr class="row-odd"><td>delete</td>
<td>MNStorage.delete()</td>
<td>action=delete</td>
</tr>
<tr class="row-even"><td>read</td>
<td>MNRead.get()</td>
<td>action=read</td>
</tr>
<tr class="row-odd"><td>replicate</td>
<td>MNReplication.replicate()</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td>update</td>
<td>MNStoreage.update()</td>
<td>action=update</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>The content of the access event log records are described here: <a class="reference external" href="LoggingSchema.html">LoggingSchema.html</a>.</p>
<p>The access event log records are harvested from each MN in the network and
aggregated into a common search index by the Log Aggregation Facility which is
described here: <a class="reference external" href="LogAggregator.html">LogAggregator.html</a>. The Event Log Index is implemented as
an Apache Solr instance and can be queried using standard Solr queries using the
DataONE service endpoint https://cn.dataone.org/cn/v1/query/logsolr.</p>
<p>The Solr search platform provides query capabilities such as field faceting,
range filtering, numeric field statistics and more that provide usage
information based on the access events, harvest from the MN, thereby providing
network wide statistics from one search index.</p>
<p>The section <em>Example Queries</em> gives several examples of usage information that
can be obtained from the Event Log Index.</p>
</div>
<div class="section" id="event-log-index">
<h2>Event Log Index<a class="headerlink" href="#event-log-index" title="Permalink to this headline">¶</a></h2>
<p><em>Table 2.</em> Solr index schema</p>
<table border="1" class="docutils" id="id2">
<caption><span class="caption-text">Solr index schema</span><a class="headerlink" href="#id2" title="Permalink to this table">¶</a></caption>
<colgroup>
<col width="17%" />
<col width="9%" />
<col width="74%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Solr Type</th>
<th class="head">Comment</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>id</td>
<td>string</td>
<td>added after harvest</td>
</tr>
<tr class="row-odd"><td>dateAggregated</td>
<td>date</td>
<td>added after harvest</td>
</tr>
<tr class="row-even"><td>isPublic</td>
<td>boolean</td>
<td>added after harvest, obtained from systemmetadata</td>
</tr>
<tr class="row-odd"><td>readPermission</td>
<td>string</td>
<td>added after harvest, obtained from systemmetadata, filtered during query</td>
</tr>
<tr class="row-even"><td>entryId</td>
<td>string</td>
<td>obtained from MN event log</td>
</tr>
<tr class="row-odd"><td>pid</td>
<td>string</td>
<td>added after harvest, obtained from systemmetadata</td>
</tr>
<tr class="row-even"><td>ipAddress</td>
<td>string</td>
<td>obtained from MN event log, filtered during query</td>
</tr>
<tr class="row-odd"><td>userAgent</td>
<td>string</td>
<td>obtained from MN event log</td>
</tr>
<tr class="row-even"><td>subject</td>
<td>string</td>
<td>obtained from MN event log, filtered during query</td>
</tr>
<tr class="row-odd"><td>event</td>
<td>string</td>
<td>obtained from MN event log</td>
</tr>
<tr class="row-even"><td>dateLogged</td>
<td>date</td>
<td>obtained from MN event log</td>
</tr>
<tr class="row-odd"><td>nodeId</td>
<td>string</td>
<td>obtained from MN event log</td>
</tr>
<tr class="row-even"><td>rightsHolder</td>
<td>string</td>
<td>added after harvest, obtained from systemmetadata, filtered during query</td>
</tr>
<tr class="row-odd"><td>formatId</td>
<td>string</td>
<td>added after harvest, obtained from systemmetadata</td>
</tr>
<tr class="row-even"><td>formatType</td>
<td>string</td>
<td>added after harvest, obtained from systemmetadata</td>
</tr>
<tr class="row-odd"><td>size</td>
<td>slong</td>
<td>added after harvest, obtained from systemmetadata</td>
</tr>
<tr class="row-even"><td>country</td>
<td>string</td>
<td>added after harvest, determined from ipAddress</td>
</tr>
<tr class="row-odd"><td>region</td>
<td>string</td>
<td>added after harvest, determined from ipAddress</td>
</tr>
<tr class="row-even"><td>city</td>
<td>string</td>
<td>added after harvest, determined from ipAddress</td>
</tr>
<tr class="row-odd"><td>geohash_1</td>
<td>string</td>
<td>added after harvest, determined from ipAddress</td>
</tr>
<tr class="row-even"><td>geohash_2</td>
<td>string</td>
<td>added after harvest, determined from ipAddress</td>
</tr>
<tr class="row-odd"><td>geohash_3</td>
<td>string</td>
<td>added after harvest, determined from ipAddress</td>
</tr>
<tr class="row-even"><td>geohash_4</td>
<td>string</td>
<td>added after harvest, determined from ipAddress</td>
</tr>
<tr class="row-odd"><td>geohash_5</td>
<td>string</td>
<td>added after harvest, determined from ipAddress</td>
</tr>
<tr class="row-even"><td>geohash_6</td>
<td>string</td>
<td>added after harvest, determined from ipAddress</td>
</tr>
<tr class="row-odd"><td>geohash_7</td>
<td>string</td>
<td>added after harvest, determined from ipAddress</td>
</tr>
<tr class="row-even"><td>geohash_8</td>
<td>string</td>
<td>added after harvest, determined from ipAddress</td>
</tr>
<tr class="row-odd"><td>geohash_9</td>
<td>string</td>
<td>added after harvest, determined from ipAddress</td>
</tr>
<tr class="row-even"><td>location</td>
<td>location</td>
<td>added after harvest, determined from ipAddress</td>
</tr>
<tr class="row-odd"><td>inFullRobotList</td>
<td>boolean</td>
<td>added after harvest, determined based on log processing for COUNTER compliance</td>
</tr>
<tr class="row-even"><td>inPartialRobotList</td>
<td>boolean</td>
<td>added after harvest, determined based on log processing for COUNTER compliance</td>
</tr>
<tr class="row-odd"><td>isRepeatVisit</td>
<td>boolean</td>
<td>added after harvest, determined based on log processing for COUNTER compliance</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="access-to-event-log-index">
<h2>Access to Event Log Index<a class="headerlink" href="#access-to-event-log-index" title="Permalink to this headline">¶</a></h2>
<p>Access to the Event Log Index adheres to the DataONE identity and authentication
protocols described here: <a class="reference external" href="Authentication.html">Authentication.html</a>. The level of access allowed
when querying the index is determined by your DataONE Authentication Session
Identity</p>
<p><em>CN Administrators</em></p>
<p>CN Administrators have full access to the index and can therefor select index
entries based on any field and can view the entire contents of the index
entries.</p>
<p><em>Authenticated session access</em></p>
<p>Clients (i.e. web browsers) that have established an authenticated session using
a DataONE identity have access to information for any pids for which they are
the rightsholder, or pids for which they have an access policy granting write
access. For example, if the authenticated subject is
<code class="docutils literal"><span class="pre">'uid=smith,o=NCEAS,dc=ecoinformatics,dc=org'</span></code> then the client can query index
entries for pids that have access policies allowing write access to the
authenticated subject. This level of access allows  summary information to be
viewed, so the full content of index entries cannot be viewed.</p>
<p><em>Public Access</em></p>
<p>All other access is considered non-privileged public access in which case only
index entries associated with pids that have an access policy granting public
read can be queried. This level of access only allows summary information to be
viewed, so the full content of index entries cannot be viewed.</p>
<p>In addition to these access rules, certain fields are considered sensitive such
that they cannot be included in Solr field queries (i.e. <code class="docutils literal"><span class="pre">&amp;fq=&lt;field</span> <span class="pre">name&gt;</span></code>)
or included in Solr facet queries (i.e. <code class="docutils literal"><span class="pre">&amp;facet.field=&lt;field</span> <span class="pre">name&gt;</span></code>). The
fields from the Event Log Index that are considered sensitive are
<em>rightsHolder</em>, <em>ipAddress</em>, <em>subject</em> and <em>readPermission</em>.</p>
</div>
<div class="section" id="counter-compliance">
<span id="id1"></span><h2>COUNTER Compliance<a class="headerlink" href="#counter-compliance" title="Permalink to this headline">¶</a></h2>
<p>While unfiltered log records are useful for some system monitoring and related
activities, scientifically-meaningful  analysis of log records requires that we
correct log records for common events that would otherwise artificially inflate
the statistics, such as access by web-indexing robots and multiple accesses from
the same individual.  Within the publishing community, the <a class="reference external" href="http://www.projectcounter.org/">COUNTER</a> standard
has been used to provide a consistent set of guidelines as to how resource
access statistics should be reported.  To be COUNTER-compliant, DataONE provides
three filters on log files:</p>
<ol class="arabic">
<li><p class="first">Only allow status 200 and 304 on READ requests</p>
<p>This ensures that redirect requests (302) are only counted once, and that
unsuccessful requests are ignored.</p>
</li>
<li><p class="first">Exclude robots</p>
<p>This ensures that the myriad web-robots that constantly index web-accessible
content do not artificially inflate results.</p>
</li>
<li><p class="first">Exclude repeat visits within certain time window</p>
<p>This ensures that accidental double-clicks on a link or repeated requests
from a client tool in a short time period are only counted once.</p>
</li>
</ol>
<p>Compliance with these three <a class="reference external" href="http://www.projectcounter.org/">COUNTER</a> requirements is implemented as two
boolean index field (<code class="docutils literal"><span class="pre">isRepeatVisit</span></code> and <code class="docutils literal"><span class="pre">inFullRobotList</span></code>) which,  for each
record, determines if a given record adheres to the <a class="reference external" href="http://www.projectcounter.org/">COUNTER</a> standards
outlined above.  Client queries  which wish to only report COUNTER-compliant
results just add a filter expression to their query (<code class="docutils literal"><span class="pre">isRepeatVisit=false</span></code>,
<code class="docutils literal"><span class="pre">inFullRobotList=false</span></code>),  and all non-compliant records will be removed from
the usage statistics reports.</p>
<p>The field <code class="docutils literal"><span class="pre">inFullRobotList</span></code> indicates whether or not the logged event
originated from a request issued by a user agent found in the full list of web
robots, with the value <code class="docutils literal"><span class="pre">true</span></code>  indicating that the user agent is a web robot,
and thus the event record is not <a class="reference external" href="http://www.projectcounter.org/">COUNTER</a> compliant.</p>
<p>DataONE will maintain a list on known Internet robots to be used for filtering
addresses, and this list will be updated periodically as new robots become
known, at least annually.</p>
<p>The field <code class="docutils literal"><span class="pre">isRepeatVisit</span></code> indicates whether or not a duplicate request has
occurred for the same IP address and pid within a certain time window (currently
30 seconds), with a value of <code class="docutils literal"><span class="pre">true</span></code> indicating that an entry is a repeat
request.</p>
<p>The following query will return the count of all read events that have passed the COUNTER compliance tests:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=event:read&amp;fq=inFullRobotList:false&amp;fq=isRepeatVisit:false
</pre></div>
</div>
<p>The event index is updated once a day with event entries from all active member
nodes, with the most current information being from the previous day.</p>
<p>In addition to the &#8216;<a class="reference external" href="http://www.projectcounter.org/">COUNTER</a>&#8216; related fields, the field <code class="docutils literal"><span class="pre">inPartialRobotList</span></code>
indicates whether or not the user agent was found in a list that contains a
subset of the full robots list,  and represents a less strict interpretation of
which user agents are considered web robots, and does not include user agents
such as &#8216;java&#8217;, &#8216;libwww&#8217;, &#8216;Wget&#8217;. A value of <code class="docutils literal"><span class="pre">true</span></code> indicates that a match was
found in the less strict web robots list. This field is not used in <a class="reference external" href="http://www.projectcounter.org/">COUNTER</a>
compliance filtering.</p>
</div>
<div class="section" id="statistics-service-usage">
<h2>Statistics Service Usage<a class="headerlink" href="#statistics-service-usage" title="Permalink to this headline">¶</a></h2>
<p>The following sections shows example queries that can be sent to the Event Log
Solr index. Note: in order to make the examples easier to read, the output of
some of the examples queries has been editied, with removed lines replaced with
ellipses, i.e. &#8216;...&#8217;.</p>
<p><strong>Retrieve pids for a specified subject</strong></p>
<p>The following example shows a query for download volume for pids created by
subjects matching <code class="docutils literal"><span class="pre">uid*smith*</span></code> with download size statistics aggregated by
pid:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=*:*&amp;fq=subject:uid*smith*&amp;fq=event:read&amp;stats=true&amp;stats.field=size&amp;rows=0&amp;stats.facet=pid
</pre></div>
</div>
<p>The following result is returned:</p>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;response&gt;</span>
  ...
  <span class="nt">&lt;result</span> <span class="na">name=</span><span class="s">&quot;response&quot;</span> <span class="na">numFound=</span><span class="s">&quot;96&quot;</span> <span class="na">start=</span><span class="s">&quot;0&quot;</span><span class="nt">/&gt;</span>
  <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;stats&quot;</span><span class="nt">&gt;</span>
    <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;stats_fields&quot;</span><span class="nt">&gt;</span>
      <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;size&quot;</span><span class="nt">&gt;</span>
        <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;min&quot;</span><span class="nt">&gt;</span>135.0<span class="nt">&lt;/double&gt;</span>
        <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;max&quot;</span><span class="nt">&gt;</span>1.5209072E8<span class="nt">&lt;/double&gt;</span>
        <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;sum&quot;</span><span class="nt">&gt;</span>1.082767665E9<span class="nt">&lt;/double&gt;</span>
        <span class="nt">&lt;long</span> <span class="na">name=</span><span class="s">&quot;count&quot;</span><span class="nt">&gt;</span>96<span class="nt">&lt;/long&gt;</span>
        <span class="nt">&lt;long</span> <span class="na">name=</span><span class="s">&quot;missing&quot;</span><span class="nt">&gt;</span>0<span class="nt">&lt;/long&gt;</span>
        <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;sumOfSquares&quot;</span><span class="nt">&gt;</span>1.13751276670495792E17<span class="nt">&lt;/double&gt;</span>
        <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;mean&quot;</span><span class="nt">&gt;</span>1.127882984375E7<span class="nt">&lt;/double&gt;</span>
        <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;stddev&quot;</span><span class="nt">&gt;</span>3.2692977584385287E7<span class="nt">&lt;/double&gt;</span>
        <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facets&quot;</span><span class="nt">&gt;</span>
          <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;pid&quot;</span><span class="nt">&gt;</span>
            <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;doi:10.6085/AA/pisco_intertidal.45.1&quot;</span><span class="nt">&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;min&quot;</span><span class="nt">&gt;</span>2.8738045E7<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;max&quot;</span><span class="nt">&gt;</span>2.8738045E7<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;sum&quot;</span><span class="nt">&gt;</span>2.8738045E7<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;long</span> <span class="na">name=</span><span class="s">&quot;count&quot;</span><span class="nt">&gt;</span>1<span class="nt">&lt;/long&gt;</span>
              <span class="nt">&lt;long</span> <span class="na">name=</span><span class="s">&quot;missing&quot;</span><span class="nt">&gt;</span>0<span class="nt">&lt;/long&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;sumOfSquares&quot;</span><span class="nt">&gt;</span>8.25875230422025E14<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;mean&quot;</span><span class="nt">&gt;</span>2.8738045E7<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;stddev&quot;</span><span class="nt">&gt;</span>0.0<span class="nt">&lt;/double&gt;</span>
            <span class="nt">&lt;/lst&gt;</span>
            <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;doi:10.6085/AA/MLPA_intertidal.30.10&quot;</span><span class="nt">&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;min&quot;</span><span class="nt">&gt;</span>2984.0<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;max&quot;</span><span class="nt">&gt;</span>2984.0<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;sum&quot;</span><span class="nt">&gt;</span>11936.0<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;long</span> <span class="na">name=</span><span class="s">&quot;count&quot;</span><span class="nt">&gt;</span>4<span class="nt">&lt;/long&gt;</span>
              <span class="nt">&lt;long</span> <span class="na">name=</span><span class="s">&quot;missing&quot;</span><span class="nt">&gt;</span>0<span class="nt">&lt;/long&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;sumOfSquares&quot;</span><span class="nt">&gt;</span>3.5617024E7<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;mean&quot;</span><span class="nt">&gt;</span>2984.0<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;stddev&quot;</span><span class="nt">&gt;</span>0.0<span class="nt">&lt;/double&gt;</span>
            <span class="nt">&lt;/lst&gt;</span>
            <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;doi:10.6085/AA/pisco_snbs.19.1&quot;</span><span class="nt">&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;min&quot;</span><span class="nt">&gt;</span>52335.0<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;max&quot;</span><span class="nt">&gt;</span>52335.0<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;sum&quot;</span><span class="nt">&gt;</span>104670.0<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;long</span> <span class="na">name=</span><span class="s">&quot;count&quot;</span><span class="nt">&gt;</span>2<span class="nt">&lt;/long&gt;</span>
              <span class="nt">&lt;long</span> <span class="na">name=</span><span class="s">&quot;missing&quot;</span><span class="nt">&gt;</span>0<span class="nt">&lt;/long&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;sumOfSquares&quot;</span><span class="nt">&gt;</span>5.47790445E9<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;mean&quot;</span><span class="nt">&gt;</span>52335.0<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;stddev&quot;</span><span class="nt">&gt;</span>0.0<span class="nt">&lt;/double&gt;</span>
            <span class="nt">&lt;/lst&gt;</span>
            ...
            <span class="nt">&lt;/lst&gt;</span>
          <span class="nt">&lt;/lst&gt;</span>
        <span class="nt">&lt;/lst&gt;</span>
      <span class="nt">&lt;/lst&gt;</span>
    <span class="nt">&lt;/lst&gt;</span>
  <span class="nt">&lt;/lst&gt;</span>
<span class="nt">&lt;/response&gt;</span>
</pre></div>
</div>
<p>The previous query can be constrained to a specific time by adding a time range,
i.e.:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">&amp;</span><span class="n">fq</span><span class="o">=</span><span class="n">dateLogged</span><span class="p">:[</span><span class="mi">2013</span><span class="o">-</span><span class="mi">01</span><span class="o">-</span><span class="mi">01</span><span class="n">T23</span><span class="p">:</span><span class="mi">59</span><span class="p">:</span><span class="mi">59</span><span class="n">Z</span> <span class="n">TO</span> <span class="mi">2013</span><span class="o">-</span><span class="mi">12</span><span class="o">-</span><span class="mi">31</span><span class="n">T23</span><span class="p">:</span><span class="mi">59</span><span class="p">:</span><span class="mi">59</span><span class="n">Z</span><span class="p">]</span>
</pre></div>
</div>
<p>or using Solr date range key words:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">&amp;</span><span class="n">fq</span><span class="o">=</span><span class="n">dateLogged</span><span class="p">:[</span><span class="n">NOW</span><span class="o">-</span><span class="mi">1</span><span class="n">MONTH</span> <span class="n">TO</span> <span class="n">NOW</span><span class="p">]</span>
</pre></div>
</div>
<p><strong>Data upload counts</strong></p>
<p>The following query shows counts of data uploads by format type by a specified rightsHolder (PISCO):</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?&amp;q=*:*&amp;facet=true&amp;fq=rightsHolder:uid*PISCO*&amp;fq=event:create&amp;facet.field=formatId&amp;facet.mincount=1
</pre></div>
</div>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;response&gt;</span>
  ...
  <span class="nt">&lt;result</span> <span class="na">name=</span><span class="s">&quot;response&quot;</span> <span class="na">numFound=</span><span class="s">&quot;40928&quot;</span> <span class="na">start=</span><span class="s">&quot;0&quot;</span><span class="nt">/&gt;</span>
  <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_counts&quot;</span><span class="nt">&gt;</span>
    <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_queries&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_fields&quot;</span><span class="nt">&gt;</span>
      <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;formatId&quot;</span><span class="nt">&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;eml://ecoinformatics.org/eml-2.0.1&quot;</span><span class="nt">&gt;</span>32932<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;text/csv&quot;</span><span class="nt">&gt;</span>5236<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;application/octet-stream&quot;</span><span class="nt">&gt;</span>2570<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;eml://ecoinformatics.org/eml-2.0.0&quot;</span><span class="nt">&gt;</span>100<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;eml://ecoinformatics.org/eml-2.1.0&quot;</span><span class="nt">&gt;</span>28<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN&quot;</span><span class="nt">&gt;</span>19<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;-//ecoinformatics.org//eml-entity-2.0.0beta6//EN&quot;</span><span class="nt">&gt;</span>12<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;-//ecoinformatics.org//eml-attribute-2.0.0beta6//EN&quot;</span><span class="nt">&gt;</span>11<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;-//ecoinformatics.org//eml-access-2.0.0beta6//EN&quot;</span><span class="nt">&gt;</span>7<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;-//ecoinformatics.org//eml-physical-2.0.0beta6//EN&quot;</span><span class="nt">&gt;</span>6<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;image/jpeg&quot;</span><span class="nt">&gt;</span>3<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;text/plain&quot;</span><span class="nt">&gt;</span>3<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;-//ecoinformatics.org//eml-project-2.0.0beta6//EN&quot;</span><span class="nt">&gt;</span>1<span class="nt">&lt;/int&gt;</span>
      <span class="nt">&lt;/lst&gt;</span>
    <span class="nt">&lt;/lst&gt;</span>
    <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_dates&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_ranges&quot;</span><span class="nt">/&gt;</span>
  <span class="nt">&lt;/lst&gt;</span>
<span class="nt">&lt;/response&gt;</span>
</pre></div>
</div>
<p><strong>Data download counts by month</strong></p>
<p>The following query shows data download counts by a specific user for each month
in 2013:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v1/query/logsolr/?q=*:*&amp;fq=rightsHolder:uid*PISCO*&amp;fq=event:read&amp;facet=true&amp;facet.range=dateLogged&amp;facet.range.start=2013-01-01T01:01:01Z&amp;facet.range.end=2013-12-31T24:59:59Z&amp;facet.range.gap=%2B1MONTH
</pre></div>
</div>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;response&gt;</span>
   ...
  <span class="nt">&lt;result</span> <span class="na">name=</span><span class="s">&quot;response&quot;</span> <span class="na">numFound=</span><span class="s">&quot;3623404&quot;</span> <span class="na">start=</span><span class="s">&quot;0&quot;</span><span class="nt">/&gt;</span>
  <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_counts&quot;</span><span class="nt">&gt;</span>
    <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_queries&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_fields&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_dates&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_ranges&quot;</span><span class="nt">&gt;</span>
      <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;dateLogged&quot;</span><span class="nt">&gt;</span>
        <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;counts&quot;</span><span class="nt">&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-01-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>56962<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-02-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>23656<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-03-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>46167<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-04-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>58562<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-05-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>65192<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-06-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>203082<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-07-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>66013<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-08-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>92320<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-09-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>23059<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-10-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>16135<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-11-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>73831<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-12-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>44968<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;/lst&gt;</span>
        <span class="nt">&lt;str</span> <span class="na">name=</span><span class="s">&quot;gap&quot;</span><span class="nt">&gt;</span>+1MONTH<span class="nt">&lt;/str&gt;</span>
        <span class="nt">&lt;date</span> <span class="na">name=</span><span class="s">&quot;start&quot;</span><span class="nt">&gt;</span>2013-01-01T01:01:01Z<span class="nt">&lt;/date&gt;</span>
        <span class="nt">&lt;date</span> <span class="na">name=</span><span class="s">&quot;end&quot;</span><span class="nt">&gt;</span>2014-01-01T01:01:01Z<span class="nt">&lt;/date&gt;</span>
      <span class="nt">&lt;/lst&gt;</span>
    <span class="nt">&lt;/lst&gt;</span>
  <span class="nt">&lt;/lst&gt;</span>
<span class="nt">&lt;/respones&gt;</span>
</pre></div>
</div>
<p><strong>Read counts for format type EML</strong></p>
<p>The following query shows all EML metadata activity by a specific user for each
month in 2013:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=*:*&amp;fq=rightsHolder:uid*PISCO*&amp;fq=formatId:eml*&amp;facet=true&amp;facet.field=event&amp;facet.range=dateLogged&amp;facet.range.start=2013-01-01T01:01:01Z&amp;facet.range.end=2013-12-31T24:59:59Z&amp;facet.range.gap=%2B1MONTH
</pre></div>
</div>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="nt">&lt;response&gt;</span>
  ...
  <span class="nt">&lt;result</span> <span class="na">name=</span><span class="s">&quot;response&quot;</span> <span class="na">numFound=</span><span class="s">&quot;3504705&quot;</span> <span class="na">start=</span><span class="s">&quot;0&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_counts&quot;</span><span class="nt">&gt;</span>
      <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_queries&quot;</span><span class="nt">/&gt;</span>
      <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_fields&quot;</span><span class="nt">&gt;</span>
      <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;event&quot;</span><span class="nt">&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;read&quot;</span><span class="nt">&gt;</span>3327009<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;delete&quot;</span><span class="nt">&gt;</span>51249<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;update&quot;</span><span class="nt">&gt;</span>47593<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;synchronization_failed&quot;</span><span class="nt">&gt;</span>45752<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;create&quot;</span><span class="nt">&gt;</span>33060<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;replicate&quot;</span><span class="nt">&gt;</span>42<span class="nt">&lt;/int&gt;</span>
      <span class="nt">&lt;/lst&gt;</span>
    <span class="nt">&lt;/lst&gt;</span>
    <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_dates&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facet_ranges&quot;</span><span class="nt">&gt;</span>
      <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;dateLogged&quot;</span><span class="nt">&gt;</span>
        <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;counts&quot;</span><span class="nt">&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-01-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>54815<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-02-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>18652<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-03-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>45043<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-04-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>58420<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-05-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>64208<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-06-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>136014<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-07-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>65417<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-08-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>92103<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-09-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>22899<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-10-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>15522<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-11-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>73340<span class="nt">&lt;/int&gt;</span>
          <span class="nt">&lt;int</span> <span class="na">name=</span><span class="s">&quot;2013-12-01T01:01:01Z&quot;</span><span class="nt">&gt;</span>44745<span class="nt">&lt;/int&gt;</span>
        <span class="nt">&lt;/lst&gt;</span>
        <span class="nt">&lt;str</span> <span class="na">name=</span><span class="s">&quot;gap&quot;</span><span class="nt">&gt;</span>+1MONTH<span class="nt">&lt;/str&gt;</span>
        <span class="nt">&lt;date</span> <span class="na">name=</span><span class="s">&quot;start&quot;</span><span class="nt">&gt;</span>2013-01-01T01:01:01Z<span class="nt">&lt;/date&gt;</span>
        <span class="nt">&lt;date</span> <span class="na">name=</span><span class="s">&quot;end&quot;</span><span class="nt">&gt;</span>2014-01-01T01:01:01Z<span class="nt">&lt;/date&gt;</span>
      <span class="nt">&lt;/lst&gt;</span>
    <span class="nt">&lt;/lst&gt;</span>
  <span class="nt">&lt;/lst&gt;</span>
<span class="nt">&lt;/response&gt;</span>
</pre></div>
</div>
<p><strong>Download volume for pids</strong></p>
<p>The following query shows all pids created by rightsHolder <em>PISCO</em> with upload
size statistics aggregated by formatId:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=*:*&amp;fq=rightsHolder:uid=*PISCO*&amp;fq=event:create&amp;stats=true&amp;stats.field=size&amp;rows=0&amp;stats.facet=formatId
</pre></div>
</div>
<div class="highlight-xml"><div class="highlight"><pre><span></span><span class="nt">&lt;result</span> <span class="na">name=</span><span class="s">&quot;response&quot;</span> <span class="na">numFound=</span><span class="s">&quot;14721&quot;</span> <span class="na">start=</span><span class="s">&quot;0&quot;</span><span class="nt">/&gt;</span>
  ...
        <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;facets&quot;</span><span class="nt">&gt;</span>
          <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;formatId&quot;</span><span class="nt">&gt;</span>
            <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;eml://ecoinformatics.org/eml-2.0.0&quot;</span><span class="nt">&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;min&quot;</span><span class="nt">&gt;</span>3582.0<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;max&quot;</span><span class="nt">&gt;</span>29176.0<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;sum&quot;</span><span class="nt">&gt;</span>604461.0<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;long</span> <span class="na">name=</span><span class="s">&quot;count&quot;</span><span class="nt">&gt;</span>43<span class="nt">&lt;/long&gt;</span>
              <span class="nt">&lt;long</span> <span class="na">name=</span><span class="s">&quot;missing&quot;</span><span class="nt">&gt;</span>0<span class="nt">&lt;/long&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;sumOfSquares&quot;</span><span class="nt">&gt;</span>1.1348783711E10<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;mean&quot;</span><span class="nt">&gt;</span>14057.232558139534<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;stddev&quot;</span><span class="nt">&gt;</span>8240.051522137841<span class="nt">&lt;/double&gt;</span>
            <span class="nt">&lt;/lst&gt;</span>
            <span class="nt">&lt;lst</span> <span class="na">name=</span><span class="s">&quot;eml://ecoinformatics.org/eml-2.0.1&quot;</span><span class="nt">&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;min&quot;</span><span class="nt">&gt;</span>938.0<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;max&quot;</span><span class="nt">&gt;</span>646484.0<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;sum&quot;</span><span class="nt">&gt;</span>2.37265549E8<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;long</span> <span class="na">name=</span><span class="s">&quot;count&quot;</span><span class="nt">&gt;</span>14668<span class="nt">&lt;/long&gt;</span>
              <span class="nt">&lt;long</span> <span class="na">name=</span><span class="s">&quot;missing&quot;</span><span class="nt">&gt;</span>0<span class="nt">&lt;/long&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;sumOfSquares&quot;</span><span class="nt">&gt;</span>7.985322030167E12<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;mean&quot;</span><span class="nt">&gt;</span>16175.72600218162<span class="nt">&lt;/double&gt;</span>
              <span class="nt">&lt;double</span> <span class="na">name=</span><span class="s">&quot;stddev&quot;</span><span class="nt">&gt;</span>16815.75005078953<span class="nt">&lt;/double&gt;</span>
            <span class="nt">&lt;/lst&gt;</span>
            ...
          <span class="nt">&lt;/lst&gt;</span>
        <span class="nt">&lt;/lst&gt;</span>
      <span class="nt">&lt;/lst&gt;</span>
    <span class="nt">&lt;/lst&gt;</span>
  <span class="nt">&lt;/lst&gt;</span>
<span class="nt">&lt;/response&gt;</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The examples that follow do not include the result output to improve
legibility. The reader is encouraged to cut/paste the sample queries into a
web browser to view the resulting output.</p>
</div>
<p><strong>Select events using time range based on date of access event</strong></p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=dateLogged:[2014-03-01T00:00:01Z TO 2014-03-31T00:00:01Z]
</pre></div>
</div>
<p><strong>Counts of event types</strong></p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=dateLogged:[* TO NOW]&amp;facet=true&amp;facet.field=event
</pre></div>
</div>
<p><strong>Wildcard search for pids</strong></p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=pid:doi*&amp;facet=true&amp;facet.field=pid&amp;facet.mincount=1
</pre></div>
</div>
<p><strong>Spatial search for events within 10km of the latitude, longitude of Santa Barbara, CA</strong></p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=*:*&amp;fq={!geofilt sfield=location pt=34.4329,-119.837 d=10}
</pre></div>
</div>
<p><strong>Search by city name for events occuring in Albuquerque</strong></p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=*:*&amp;fq=city:Albuquerque
</pre></div>
</div>
<p><strong>Events aggregated by location name</strong></p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=event:create&amp;facet=true&amp;facet.field=city
</pre></div>
</div>
<p><strong>Download (read) counts by month for all data format types</strong></p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=*:*&amp;fq=event:read&amp;formatType=DATA&amp;facet=true&amp;facet.range=dateLogged&amp;facet.range.start=2014-01-01T00:00:00.000Z&amp;facet.range.end=2015-01-01T00:00:00.000Z&amp;facet.range.gap=%2B1MONTH
</pre></div>
</div>
<p><strong>Download (read) counts by month for all format types, counter-compliant</strong></p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=*:*&amp;fq=event:read&amp;counterCompliant=true&amp;facet=true&amp;facet.range=dateLogged&amp;facet.range.start=2014-01-01T00:00:00.000Z&amp;facet.range.end=2015-01-01T00:00:00.000Z&amp;facet.range.gap=%2B1MONTH
</pre></div>
</div>
<p><strong>Metadata read counts by month for all metadata format types</strong></p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=*:*&amp;fq=event:read&amp;formatType=METADATA&amp;facet=true&amp;facet.range=dateLogged&amp;facet.range.start=2014-01-01T00:00:00.000Z&amp;facet.range.end=2015-01-01T00:00:00.000Z&amp;facet.range.gap=%2B1MONTH
</pre></div>
</div>
<p><strong>Byte count for read events for May 2013</strong></p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=event:read&amp;fq=dateLogged:[2013-05-01T00:00:00.000Z TO 2013-05-31T23:59:59.999Z]&amp;stats=true&amp;stats.field=size&amp;sort=size%20desc&amp;rows=0
</pre></div>
</div>
<p><strong>Bytes downloaded for subject=cjones aggregated by formatId</strong></p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=*:*&amp;fq=subject:uid=*cjones*&amp;fq=event:read&amp;stats=true&amp;stats.field=size&amp;rows=0&amp;stats.facet=formatId
</pre></div>
</div>
<p><strong>Download (read) counts for node KNB, excluding web crawler accesses and duplicate (repeat) visits (with a short time interval, i.e. 30 seconds)</strong></p>
<div class="highlight-default"><div class="highlight"><pre><span></span>https://cn.dataone.org/cn/v2/query/logsolr/?q=event:read&amp;fq=inFullRobotList:false&amp;fq=isRepeatVisit:false&amp;fq=nodeId:urn\:node\:KNB
</pre></div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
    <p class="logo"><a href="http://dataone.org">
      <img class="logo" src="../_static/dataone_logo.png" alt="Logo"/>
    </a></p>
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">DataONE Usage Statistics</a><ul>
<li><a class="reference internal" href="#overview">Overview</a></li>
<li><a class="reference internal" href="#event-log-index">Event Log Index</a></li>
<li><a class="reference internal" href="#access-to-event-log-index">Access to Event Log Index</a></li>
<li><a class="reference internal" href="#counter-compliance">COUNTER Compliance</a></li>
<li><a class="reference internal" href="#statistics-service-usage">Statistics Service Usage</a></li>
</ul>
</li>
</ul>
<h3>Related Topics</h3>
<ul>
  <li><a href="../index.html">Documentation Overview</a><ul>
      <li>Previous: <a href="CitationManagerSupport.html" title="previous chapter">Supporting Online Citation Managers through COinS</a></li>
      <li>Next: <a href="../apis/index.html" title="next chapter">DataONE APIs</a></li>
  </ul></li>
</ul>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>

    <div class="footer">
      <div id="copyright">
      &copy; Copyright <a href="http://www.dataone.org">2009-2017, DataONE</a>.
        [ <a href="../_sources/design/UsageStatistics.txt"
               rel="nofollow">Page Source</a> |
          <a href='https://redmine.dataone.org/projects/d1/repository/changes/documents/Projects/cicore/architecture/api-documentation/source/design/UsageStatistics.txt'
            rel="nofollow">Revision History</a> ]&nbsp;&nbsp;
      </div>
      <div id="acknowledgement">
        <p>This material is based upon work supported by the National Science Foundation
          under Grant Numbers <a href="http://www.nsf.gov/awardsearch/showAward?AWD_ID=0830944">083094</a> and <a href="http://www.nsf.gov/awardsearch/showAward?AWD_ID=1430508">1430508</a>.</p>
        <p>Any opinions, findings, and conclusions or recommendations expressed in this
           material are those of the author(s) and do not necessarily reflect the views
           of the National Science Foundation.</p>
      </div>
    </div>
    <!--
    <hr />
     <div id="HCB_comment_box"><a href="http://www.htmlcommentbox.com">HTML Comment Box</a> is loading comments...</div>
     <link rel="stylesheet" type="text/css" href="_static/skin.css" />
     <script type="text/javascript" language="javascript" id="hcb">
     /*<! -*/
     (function()
     {s=document.createElement("script");
     s.setAttribute("type","text/javascript");
     s.setAttribute("src", "http://www.htmlcommentbox.com/jread?page="+escape((typeof hcb_user !== "undefined" && hcb_user.PAGE)||(""+window.location)).replace("+","%2B")+"&mod=%241%24wq1rdBcg%24Gg8J5iYSHJWwAJtlYu/yU."+"&opts=21407&num=10");
     if (typeof s!="undefined") document.getElementsByTagName("head")[0].appendChild(s);})();
      /* ->*/
     </script>
   -->
  </body>
</html>