{% extends 'base.html' %}

{% block title %}{{ _('Datasets') }} - MetaBrainz Foundation{% endblock %}

{% block content %}
  <h1 class="page-title">MetaBrainz Database Dumps</h1>

  <p>
    All data dumps are available under Creative Commons licenses.
  </p>

  <p>
    In order to keep the MetaBrainz Foundation operating, and these datasets maintained and
    updated, <b>we require <a href="{{ url_for('supporters.account_type') }}">financial support</a>
    from our commercial supporters</b>. Without this support maintaining these datasets would not be possible.
    As such, even when a dataset is available under the Creative Commons Zero (CC0) license (public
    domain), we need the support of commercial supporters.
  </p>

  <h3 id="musicbrainz">MusicBrainz PostgreSQL Data Dumps</h3>

  <p> 
     MusicBrainz data dumps include all public data from our MusicBrainz project. This includes artists,
     releases, labels and the relationships between them and much, much more. In addition, we provide a
     full history of changes that the MusicBrainz community has made to the data, and the average ratings
     and tag counts (including genre tags) added by the community.
  </p> 

  <p>
     These data dumps are intended to be imported into a PostgreSQL database; we recommend that you use
     the <a href="https://github.com/metabrainz/musicbrainz-docker">musicbrainz-docker</a> project to
     import these dumps. We do not recommend working with them on their own, or attempting to import the
     data into a different database system than PostgreSQL, which represents a non-trivial amount of work.
  </p> 


  <p>
     MetaBrainz provides full database exports of the MusicBrainz database twice a week. More regular (and
     comfortable) updates are available via the <a href="https://musicbrainz.org/doc/Live_Data_Feed">Live Data Feed</a>,
     which allows keeping a local mirror in sync with the main MusicBrainz database every hour.
  </p> 

  <div class="dataset-summary">
    <div class="pull-right">
      <a href="{{ url_for("index.signup") }}">
       <button type="button"
               class="btn btn-success btn-lg"
               style="background: #5aa854;color: #fffbfe; border-color: #326b30">
         Download
       </button>
      </a>
    </div>
    <div class="dataset-summary-heading">Dataset summary</div>
    <table>
        <tr>
            <td>Documentation:</td>
            <td><a href="https://musicbrainz.org/doc/MusicBrainz_Database/Download">MusicBrainz Database page</a></td>
        </tr>
        <tr>
            <td>Commercial use:</td>
            <td>
              Allowed, but <a href="{{ url_for('supporters.account_type') }}">financial support</a>
              strongly urged, even for CC0 data.
            </td>
        </tr>
        <tr>
            <td>Update frequency:</td>
            <td>Twice a week, Wednesdays and Saturdays.</td>
        </tr>
        <tr>
            <td>Licenses:</td>
            <td>
              <a href="http://creativecommons.org/publicdomain/zero/1.0/">Creative Commons Zero (CC0)</a> for core data / <br>
              <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC Attribution-NonCommercial-ShareAlike 3.0</a>
              for supplementary data.
            </td>
        </tr>
        <tr>
            <td>Format:</td>
            <td>XZ compressed custom PostgreSQL table dumps</td>
        </tr>
    </table>
  </div>

  <a id="musicbrainz-json"><h3>MusicBrainz JSON Data Dumps</h3></a>
  <p>
     MetaBrainz provides access to the music metadata in the MusicBrainz database in the easily consumable
     format of JSON documents. If you cannot work with PostgreSQL or you prefer to work with a document
     oriented data store, then this data dump is for you.
    </p> 

  <p>
     There are individual dump files for each of the following data entities in MusicBrainz: Area, Artist,
     Event, Instrument, Label, Place, Recording, Release Group, Release, Series and Work. Please note that
     the data is not normalized and will contain duplicate data, in order to make the data dumps easy to import.
  </p>

  <div class="dataset-summary">
    <div class="pull-right">
      <a href="{{ url_for("index.signup") }}">
        <button type="button"
                class="btn btn-success btn-lg"
                style="background: #5aa854;color: #fffbfe; border-color: #326b30">
          Download
        </button>
      </a>
    </div>
    <div class="dataset-summary-heading">Dataset summary</div>
    <table>
        <tr>
            <td>Documentation:</td>
            <td><a href="https://musicbrainz.org/doc/Development/JSON_Data_Dumps">JSON Data Dumps page</a></td>
        </tr>
        <tr>
            <td>Commercial use:</td>
            <td>
              Allowed, but <a href="{{ url_for('supporters.account_type') }}">financial support</a>
              strongly urged, even for CC0 data.
            </td>
        </tr>
        <tr>
            <td>Update frequency:</td>
            <td>Twice a week, Saturdays and Wednesdays.</td>
        </tr>
        <tr>
            <td>Licenses:</td>
            <td><a href="http://creativecommons.org/publicdomain/zero/1.0/">Creative Commons Zero (CC0)</a></td>
        </tr>
        <tr>
            <td>Format:</td>
            <td>XZ compressed JSONL (one JSON document per line)</td>
        </tr>
    </table>
  </div>

  <a id="listenbrainz"><h3>ListenBrainz PostgreSQL Data Dumps</h3></a>

  <p>
    The ListenBrainz project serves as an archive where users can store their music listening history.
    ListenBrainz provides these users with insights into their listening behaviors by creating detailed
    statistics reports, as well as providing other music-focused social features.
  </p> 

  <p>
    This dataset can be used to create and study music consumption patterns, and to create new music
    datasets. ListenBrainz itself is using this data to power a music recommendation engine and to create
    other derived datasets.
  </p> 

  <p>
    The data dumps are large, containing hundreds of millions of listens. Due to its size, we cannot provide
    this data in other formats and we update the full dumps only twice a month. Incremental dumps are also
    available daily, which provide all the listen data that was added since the last full dump.
  </p> 

  <div class="dataset-summary">
    <div class="pull-right">
      <a href="{{ url_for("index.signup") }}">
       <button type="button"
               class="btn btn-success btn-lg"
               style="background: #5aa854;color: #fffbfe; border-color: #326b30">
         Download
       </button>
      </a>
    </div>
    <div class="dataset-summary-heading">Dataset summary</div>
    <table>
        <tr>
            <td>Documentation:</td>
            <td><a href="https://listenbrainz.readthedocs.io/en/latest/users/listenbrainz-dumps.html">ListenBrainz data dumps documentation</a></td>
        </tr>
        <tr>
            <td>Commercial use:</td>
            <td>
              Allowed, but <a href="{{ url_for('supporters.account_type') }}">financial support</a>
              strongly urged, even for CC0 data.
            </td>
        </tr>
        <tr>
            <td>Update frequency:</td>
            <td>Twice a month, on the 1st and 15th, with incremental dumps daily.</td>
        </tr>
        <tr>
            <td>Licenses:</td>
            <td><a href="http://creativecommons.org/publicdomain/zero/1.0/">Creative Commons Zero (CC0)</td>
        </tr>
        <tr>
            <td>Format:</td>
            <td>XZ compressed PostgreSQL table dumps</td>
        </tr>
    </table>
  </div>
  
  <a id="critiquebrainz"><h3>CritiqueBrainz PostgreSQL Data Dumps</h3></a>

  <p>
    CritiqueBrainz is a repository for Creative Commons licensed music and book reviews. It connects
    factual metadata from the MusicBrainz and BookBrainz databases with opinions from critics, listeners,
    and readers by providing a platform for their reviews.
  </p> 
  <p>
    MetaBrainz provides full dumps of the CritiqueBrainz database as well as JSON dumps containing reviews
    in an easily consumable format. These datasets are updated every day.
  </p> 

  <div class="dataset-summary">
    <div class="pull-right">
      <a href="{{ url_for("index.signup") }}">
       <button type="button"
               class="btn btn-success btn-lg"
               style="background: #5aa854;color: #fffbfe; border-color: #326b30">
         Download
       </button>
      </a>
    </div>
    <div class="dataset-summary-heading">Dataset summary</div>
    <table>
        <tr>
            <td>Update frequency:</td>
            <td>Daily</td>
        </tr>
        <tr>
            <td>Commercial use:</td>
            <td>
              Allowed, but <a href="{{ url_for('supporters.account_type') }}">financial support</a>
              strongly urged, even for CC0 data.
            </td>
        </tr>
        <tr>
            <td>Licenses:</td>
            <td>
              <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC Attribution-NonCommercial-ShareAlike 3.0</a> and 
              <a href="http://creativecommons.org/licenses/by-sa/3.0/">CC Attribution-ShareAlike 3.0</a>
            </td>
        </tr>
        <tr>
            <td>Format:</td>
            <td>bzip2 compressed PostgreSQL table dumps and JSON dumps</td>
        </tr>
    </table>
  </div>

{% endblock %}
