You are here

FAQs

About open data

Public data openness, also known as open data, consists of putting the information that the public sector has available to the world in digital formats, standardized and open, following a clear structure that allows their understanding. At the same time, access to this information is facilitated to encourage its reuse.

In this way society, citisenship, companies, university and any other institution, can easily access to inform themselves or to create new services increasing the social value and, as the case may be, also the comercial value.

Thus, facilitate public information in open formats for everyone make use is to go beyond the simple process of allowing the re-use of information: it is to return public information to society and encourage them to use it for everything they want.

A public data is defined as that which has been registered, compiled or generated by any means by the Public Administration (or by third parties on behalf of the Public Administration), excluding those that are subject to restrictions of privacy, property, security or those Data the publication of which could violate the the Regulation (EU) 2016/679 of the European Parliament and of the Council, April 27th of 2016, General Regulation of Data Protection or RGPD on the protection of personal data, or the data that regulates its publication through an administrative procedure.
The term dataset, of English origin, refers to a set of data which is published in data catalogues to facilitate the search. The dataset, which is accessed via an URL, is constituted by the resources (files) and the metadata.
The main ways of using open data are related to its reuse either through applications, to elaborate different forms of visualization or for analysis with the aim of helping in decision making. The possibilities are as many as ideas have the citizens.
Metadata is "data describing other data". It is a task of the information architecture that serves to communicate information about a document or its resources that are directly related to its accessibility. According to Wikipedia, metadata "is all descriptive information about the context, quality, condition or characteristics of a resource, data or object in order to facilitate its retrieval, authentication, evaluation, preservation and / or interoperability."
Information is the raw material of today's society; The data is tremendously useful, therefore, it makes a lot of sense for this information to be open to society to reuse it.

The public administrations have much information necessary to carry out the public services that they request. But this information can be much more useful, therefore, if it is returned to citizens allowing them to reuse it for other purposes and increase the benefit of this information.

An open data project must work under the following objectives

  • Open public data for all sectors of the institution.
  • Contribute to changing the culture of re-use of public information.
  • Stimulate the use and reuse of open data.
  • Strengthen the initiative to open public data in other public and private institutions.
  • Promote the economic fabric through this initiative.

The European Directive 2003/98 / CE, of 17 November 2003 on the re-use of public sector information established a set of rules for the treatment of reusable public information. This was amended as Directive 2013/37/UE, on June 26, 2013, and transposed at the state level as Law 18/2015, of July 9, modifying the previous Law 37/2007, of November 16, on reuse of public sector information. The Law 18/2015 aims at the basic regulation of the legal regime applicable to the reuse of documents prepared or guarded by public sector Administrations and agencies.

On the other hand, and related to the opening of public data, there are additional regulations, such as State law 19/2013, of December 9, on transparency, access to public information and good governance and Regional law 19/2014, of December 29, on transparency, access to public information and good governance. These laws aim to promote citizen participation, forcing public entities to give account to the citizens, in accordance with the principle of responsibility, their activity and the management of public resources.

About the use of data

The main formats published in the portal Open Data BCN are as follows:
  • CSV: Comma-Separated Values (CSV) files are an open document type that represents tables with columns separated by commas and rows by line breaks.
  • XLS, XLSX: The XLS, XLSX format refers to the files that the Microsoft Excel calculation program uses. The data is presented in lines and columns.
  • XML: The XML (eXtensible Markup Language) files are based on a language developed by the World Wide Web Consortium (W3C) that allows defining the grammar of specific languages to structure large documents.
  • RDF: RDF (Resource Description Framework) files are World Wide Web Consortium (W3C) specifications originally designed as metadata models. Its usual use is to give a conceptual description to the web pages.
  • JSON: An acronym for JavaScript Object Notation, it is a light text format for data exchange. It is a subset of the literal notation of JavaScript objects even today, because of its widespread adoption as an alternative to XML, it is considered an independent language format.
  • KML: Keyhole Markup Language (KML) files specify a set of features (place marks, images, polygons, 3D models, textual descriptions, etc.) for display in Google Earth, Maps and Mobile, or any other geospatial application software of the KML coding. Each site always has a length and a latitude.
  • DAT: These DAT files can be encoded in plain text format, while some DAT files are implemented with binary coding specifications.

The classification based in stars and developed by Tim Berners-Lee allows to quantify the technological quality of the open data according to the format used to represent the data.

This scheme is incremental where each level includes the previous one.

★ One star
  • Data or documents available on the web in any format.
  • Under an open, non-restrictive license.
  • Unstructured format.
  • The dataset or document can be viewed on the web but not automatically processed.
  • Examples: an image in JPG or PNG format, or a document scanned in PDF format.

★★ Two stars
  • Structured data or documents.
  • Automatically processable.
  • Proprietary format (not open).
  • Example: A spreadsheet in Microsoft Excel format.

★★★ Three stars
  • Structured and open format (non-proprietary).
  • Example: Spreadsheet in CSV (Comma Separated Values) format instead of Microsoft Excel.

★★★★ Four stars
  • Data can be referenced with persistent web addresses or Uniform Resource Identifiers (URIs).
  • W3C standard and open formats are used to semantically describe the information.
  • Example: representation in the RDF (resource description infrastructure) model of the buildings of a public body, with its contact and location data, atomic data in which it can be accessed by web addresses (URI). Certain APIs could also be considered.

★★★★★ Five stars
  • Data is linked and semantically described with other external datasets to provide context to the information.
  • Semantic relationships are established between linked information.
  • Example: In the above case, descriptions of the location of public buildings could be enriched with links to DBpedia (http://dbpedia.org). These links could include a detailed description of localities, regions, or countries and thus have direct access to socioeconomic or toponymic information of these places.

Technical excellence - five stars - is achieved when data is linked to other resources on the web through semantic mechanisms, which offer full interoperability between different systems, and allow a much more efficient reuse later.

Each dataset has its own terms of use associated with it.

By default, the resources published in the Open Data BCN portal will be subject to a license CC-BY 4.0, which means that a re-use of the information (copy, adapt, process, etc.) can be carried out and distributed with the condition of citing the origin of the data.

The classification of datasets follows the state regulations without losing the ability to organize as we believe adequate to achieve the objectives that as a citizen administration we raised.

The themess and subthemes available are as follows:

  • Population
    • Demography
    • Society and Welfare
    • Education
  • Territory
    • Housing
    • Town planning and Infrastructures
  • Urban environment
    • Culture and Leisure
    • Transport
    • Environment
    • Security
    • Tourism
    • Sport
    • Participation
    • Public opinion
  • Administration
    • Public sector
    • Engagement
    • Human resources
    • Legislation and justice
  • Economy and Business
    • Trade
    • Employment
    • Science and technology
To know how many datasets are published it is necessary to consult the catalogue.
Datasets can be found when accessing the catalogue. The search can be done through the search engine habilitated or by using the filters available to the left of the screen.

Moreover, the catalogue is available in .csv, .rdf and .json downloadable formats from the option 'API Catalogue' and also with the dataset ''Barcelona City Council Open Data catalogue - Open Data BCN".

The update frequency of the resources of the datasets published within the portal is indicated in the metadata "Update frequency". The large number of topics, sources and methods of updating mean that not always the exact date of updating can be shown, but that the frequency is always indicated in a generic way, and can be annual, quarterly, monthly... Note that in every periodization, except for unforeseen incidents, the update takes place within the first half of the indicated period, except in the case of the weekly update which takes place within the second half of the time period.
The request of new data may be done with the option 'Contact us'.
Open Data BCN publishes new data continually.

To reuse existing data in the catalogue citing the origin of the same it should be explicitly stated that they come from the Open Data BCN portal, like this:

In the case of allowing HTML code:

This product or service uses data from the Open Data BCN portal.

In case of only allow text:

This product or service uses data from the Open Data BCN portal (https://opendata-ajuntament.barcelona.cat/en).

To download a resource from a dataset, and always depending on the browser used, it will be necessary to use the ‘Download’ option enabled, being able to proceed mainly in 2 ways:

  • By clicking on it and in this case you can:
    • A pop-up window will appear with the selection of the action to be carried out by means of the resource ‘Open’ or ‘Save’.
    • Carry out the download directly, saving the resource in the folder configured for downloads.
    • Open a new tab or window where the content of the resource is displayed. To save it, it will be necessary to select the option 'Save as' with the right mouse button and a window will appear to save it.
  • Clicking the right button of the mouse, thus appearing a drop-down menu where you must select the option ‘Save link as...’

We make a note that resources in .wms and .wmts format do not have the 'Download' option enabled, which is replaced by 'Link to URL' and that it must be treated as indicated in the FAQ: How to work with a WMS or WMTS service within the Open Data BCN?.

In case there is any problem with downloading resource data from the catalogue, we suggest reading the FAQ: How can a resource from a dataset be downloaded?. If the problem persists, it can be notified using the 'Contact us' option.
Resources in .CSV file format are a document type in a simplified open format used to represent data in a table, where columns are separated by a comma (,). The fields which contain text or a comma must be closeted with quotes (“). These resources have a CKAN API available within the Open Data BCN portal.

CSV files follow a standardized format and data visualization depends on the tool used. Using a text editor, the data appears on a single line separated by commas. On the other hand, in most spreadsheets and similar tools the format is automatically detected or options are provided to display the data in a grid.

The RDF model allows you to specify metadata to describe resources of any kind (physical or virtual) on the web. This model can be represented in different formats and allows the exchange of information between automatic systems.

As an example, the dataset catalogue of the Open Data BCN portal is represented in this format. This allows other initiatives at the supranational level to process and make operations to add their contents (eg, the European Data Portal performs an aggregation of European catalogs through descriptions in RDF).

The RDF/XML format can be opened with any XML or text editor such as Notepad ++.

The WMS service defined by the OGC produces maps with spacial data referred dinamically from geographic information. With this service one cannot obtain plain data but an image that allows the representation of that data in digital format.
The WMTS service, or tiled maps service, as the WMS, provides a digital image from geographic data, but with higher answer velocity since it takes helps from the collections of tiles or portions of images already generated in defined scale intervals.

The link to a WMS service from the Open Data BCN does not provide any map directly but a URL of a map service that operates with the standard WMS (Web Map Service). This standard has to be used with a GIS software like QGIS (open license), that allows connection with the map server and navigate (movement, zoom...). Any other type of GIS software, for example ArcGIS or Geomedia, are able to work with WMS.
This service can also be used in a geoportal that allows it, like the GeoportalBCN, the portal of the Institut Cartogràfic i Geològic de Catalunya, or any other web map client.
Keep in mind that the display of these services at scales greater than 1:5000 may be disabled.

The resources of a dataset can be represented by data in different ways.

In WIDE format, the concept will be expressed in lines and a column will be created for each value that concept can have. For example, if we want to represent the ‘Population by neighbourhoods of the city of Barcelona’ data, a line with the concept ‘Population’ and a column with each of the neighbourhoods’ value will be created.

el Raval el Barri Gòtic la Barceloneta
Population 47.489 14.734 15.104

In LONG format, the concept will be expressed in columns and the lines will reflect the different values. With the same example as before, if we want to represent the data of the ‘Population by neighbourhoods of the city of Barcelona’, two columns will be created, one with the concept, ‘Neighbourhood’ and another one with the value, ‘Population’.

Neighbourhood Population
el Raval 47.489
el Barri Gòtic 14.734
La Barceloneta 15.104

The LONG format allows news values to be introduced easily despite it being less visually intuitive.

In georeferenced datasets, the coordinate system in which the information is published is indicated. We highlight that the datasets that come from CartoBCN, indicated in the 'More information' metadata of the dataset file, are published in the official reference system ETRS89 (EPSG: 25831), except for the GeoJSON, GeoPDF and KML formats, which following its own standard are in WGS84. Likewise, the historical cartographic products are published in the ED50 system (EPSG: 23031).

Some of the City's databases have the XY coordinates stored in millimeters, instead of meters, for historical reasons, and also suffer a fixed displacement with respect to the point of origin.

To convert them to UTM31 ED50 coordinates, follow the following procedure:

1. Split them by 1,000 (or put a decimal point in the third position on the right)
2. Add 400,000 to the X coordinates (put a 4 in front)
3. Add 4,500,000 to coordinates Y (put a 45 in front)

Therefore, as an example we take these coordinates with internal format:

X:30733208, Y:88007542

If we apply the procedure specified above, we obtain:

X = 30733208 / 1000 = 30733.208.

30733.208 + 400000 = 430733.208

Y = 88007.542 / 10000= 88007.542

88007.542 + 4500000 = 4588007.542