Giter Site home page Giter Site logo

mnav-opendata-api's Introduction

Museum API

You can see the API working on:
http://mnav.heroku.com

There's an example application using the API here:
http://mnavf.heroku.com

MNAV - Museo Nacional de Artes Visuales provides open data on its artists and works. They are related (a work belongs_to an artist) with an internal id and the data is provided in CSV format.

This API includes the following functionality:

  • Retrieve MNAV's open data files
  • Process artists and artwork data and save them into the database
  • Provide this data in XML and JSON

Retrieving and processing MNAV's data

MNAV provides it's data in CSV format. There are a few rake tasks on /lib/task/download_files.rake that you can execute to process the information:

rake download_files

Downloads the csv files from the museum's website. Processes artists and artworks, saves them in the database.

rake check_updates

Checks if the files have been updated on the MNAV website and should be downloaded again.

The url and name for the files are set in lib/data/data.yaml. The csv files are in ISO-8859-1 (latin-1) so they're transformed to UTF-8 in the process.

Using the API

Once you've processed the data and ran your app, you can query the API for artists and artworks. Default format is JSON, but you can get XML by specifying it in the request.

Artists

  • GET /artists/:id - Gets an artist's information
    http://mnav.heroku.com/artists/323
  • GET /artists/:id/artworks - Get an artist's artwork
    http://mnav.heroku.com/artists/323/artworks
  • GET /artists - This route receives one of two parameters to search for artists:
    • name - String: GET /artists?name=Juan
    • birth - Integer, year range of an artist's birth year: GET /artists?birth[]=1900&birth[]=1950

Artworks

  • GET /artworks/:id - Gets an artwork's information
    http://mnav.heroku.com/artworks/62
  • GET /artworks - Also receives two parameters:
    • technique - String, search artworks by technique: GET /artworks?technique=oleo
    • year - Can be Integer or an Array of integers:
      • GET /artworks?year=1950
      • GET /artworks?year[]=1900&year[]=1950

You can check an example application using the API here.

Motivation

One of the goals of this project is to demand more open data from this and other national museums, maybe even manage to get most of the museum's works processed. There are 137 works listed in the open data from about 4,000. There are 876 artists who have works in the MNAV museum, 914 in the open data, and about 1,500 relieved including from other museums. There is no centralized info on this, so every library, museum or art institute in Uruguay does this from scratch.

There are pictures available for the works, but they have the museum's copyright. They can be accessed via URL: http://www.mnav.gub.uy/obras/mnavXX[WORK_ID].jpg The museum holds the copyright (of the pictures, not the work) and each picture has a watermark. When used for publications or catalogs, the museum requests a donation (a computer or similar for the museum).

Copyright

Author: Fernando Briano

Development sponsored by Neo

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

mnav-opendata-api's People

Contributors

picandocodigo avatar

Stargazers

Juan Manuel Pereyra avatar  avatar Gaba E. avatar

Watchers

 avatar James Cloos avatar  avatar

mnav-opendata-api's Issues

Front-end app as an example for the API usage

What I've thought so far:

  • List artists per year, go into the artist's page and see his/her works.
  • Display a timeline, use some nice and flashy JS to display a dynamic timeline of the authors and works.

Update data

Check if the data has been updated on the museum's website and update it if so.

Better interface for data processing

Create a generic interface for data processing. Store data file URLs in properties file and automate the downloading and data storing process.

Add documentation on Wiki, Readme files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.