Natura 2000 sites

The Swedish sites as part of the EU-wide Natura 2000 network of protected sites for rare species or habitat types (e.g. special types of forest or grasslands). The sites can be both terrestrial and marine protected areas.

European Commission on Natura 2000.

Data quality 

See the Swedish EPA’s metadata catalogue for details: Natura 2000 SCI/SAC and Natura 2000 SPA (Swedish).

License & conditions 

The data is licensed under Creative Commons Zero, CC0.

Our APIs and data are provided "as is" without guarantees concerning potential errors in the data, availability and performance of the API and similar. We reserve the right to block individual IP addresses or, alternatively, to completely shut down services in the event of obvious abuse.

Data model 

To better understand this data, the following model covers the basic parts:

N2000 data model
  • Site - the geographical area being protected
  • Species - rare species in the site causing it to be protected
  • Species groups - groups of rare species
  • Nature types - rare nature types in the site causing it to be protected
  • Documents - mainly maintainance plans for the site

Distributions 

The OpenApi specification and examples below describe a REST API that exposes the whole data model, but has some limitations in the spatial aspects, e.g. geometries are only available in WKT format and there is no possibility to filter the results spatially.

However, a subset of this data is exposed through OGC Standard Compliant WMS and WFS services. If your use case requires spatial operations we recommend combining this API with either OGC services.

WMS and WFS services 

For more information regarding the data and the OGC services, see this document (Swedish).

The WMS service is available at

The WFS service is available at

REST API 

Example usage 

See the following example for an illustration of how to use the API and data. It’s written in JavaScript, so it’s easy to try without downloading or installing anything. Click the button “Try it!" below each block of code, or the link “Edit in JSFiddle” in the top right corner of the live example to edit, run and play with them further.

Chart protected areas for fish 

Here we combine the data from the API with general data about regions to visualize the amount of protected area in relation to the total area of each region. To examplify the filtering capabilities, we narrowed down the protected areas to those that contain the species group ‘fish’. End result is:

So in three simple steps:

  1. Compile the reference data:

    1
    2
    3
    
    //Region data from https://sv.wikipedia.org/wiki/Sveriges_l%C3%A4n
    //Transformed into json with e.g. https://www.convertcsv.com/csv-to-json.htm
    var regionData = {"Norrbottens län":{"areaKm2":97239},"Västerbottens län":{"areaKm2":54665},"Jämtlands län":{"areaKm2":48935},"Västernorrlands län":{"areaKm2":21549},"Gävleborgs län":{"areaKm2":18118},"Dalarnas län":{"areaKm2":28029},"Uppsala län":{"areaKm2":8190},"Värmlands län":{"areaKm2":17519},"Västmanlands län":{"areaKm2":5118},"Stockholms län":{"areaKm2":6524},"Örebro län":{"areaKm2":8504},"Södermanlands län":{"areaKm2":6075},"Östergötlands län":{"areaKm2":10559},"Jönköpings län":{"areaKm2":10437},"Västra Götalands län":{"areaKm2":23800},"Gotlands län":{"areaKm2":3135},"Kronobergs län":{"areaKm2":8424},"Kalmar län":{"areaKm2":11165},"Hallands län":{"areaKm2":5427},"Blekinge län":{"areaKm2":2931},"Skåne län":{"areaKm2":10968}};
    

    find the species group to filter on:

    1
    2
    3
    4
    
    //make a search query for our term NO2
    fetch("https://nvpub.vic-metria.nu/n2000/rest/artgrupper")
      .then(response => response.json())
      .then(data => document.getElementById("results").innerHTML = JSON.stringify(data, null, 2));
    

    in the resultset we take key: “F - Fiskar” for fish

    1
    2
    3
    4
    5
    6
    
    {
      "typ": {
        "key": "F - Fiskar",
        "value": "F - Fiskar"
      }
    },
    
  2. Get the protected sites data and transform it into chartable data

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    
    //Region data from https://sv.wikipedia.org/wiki/Sveriges_l%C3%A4n
    //Transformed into json with e.g. https://www.convertcsv.com/csv-to-json.htm
    var regionData = {"Norrbottens län":{"areaKm2":97239},"Västerbottens län":{"areaKm2":54665},"Jämtlands län":{"areaKm2":48935},"Västernorrlands län":{"areaKm2":21549},"Gävleborgs län":{"areaKm2":18118},"Dalarnas län":{"areaKm2":28029},"Uppsala län":{"areaKm2":8190},"Värmlands län":{"areaKm2":17519},"Västmanlands län":{"areaKm2":5118},"Stockholms län":{"areaKm2":6524},"Örebro län":{"areaKm2":8504},"Södermanlands län":{"areaKm2":6075},"Östergötlands län":{"areaKm2":10559},"Jönköpings län":{"areaKm2":10437},"Västra Götalands län":{"areaKm2":23800},"Gotlands län":{"areaKm2":3135},"Kronobergs län":{"areaKm2":8424},"Kalmar län":{"areaKm2":11165},"Hallands län":{"areaKm2":5427},"Blekinge län":{"areaKm2":2931},"Skåne län":{"areaKm2":10968}};
    
    var fancyColours = ["#C48793","#E8ADAA","#ECC5C0","#EDC9AF","#FDD7E4","#FCDFFF","#FFDFDD","#FBBBB9","#FAAFBE","#FAAFBA","#F9A7B0","#E7A1B0","#E799A3","#E38AAE","#F778A1","#E56E94","#F660AB","#FC6C85","#F6358A","#F52887","#E45E9D","#E4287C","#F535AA","#FF00FF","#E3319D"];
    
    //Call the API to get the data
    //use /nolinks to avoid retrieving data we won't use
    //filter by species group (i.e. "artgrupp")
    fetch("https://nvpub.vic-metria.nu/n2000/rest/omrade/nolinks?artgrupp=F%20-%20Fiskar")
      .then(response => response.json())
      .then(data => {
        data.forEach(function(item) {
             
          //Sum up sites per region
          if (!regionData[item.omrade.lanAsText].protectedSize) {
            regionData[item.omrade.lanAsText].protectedSize = item.omrade.areaHa;
            regionData[item.omrade.lanAsText].protectedCount = 1;
          } else {
            regionData[item.omrade.lanAsText].protectedSize += item.omrade.areaHa;
            regionData[item.omrade.lanAsText].protectedCount += 1;
          }
        });    
         
        //Create dataset for ChartJs display
        //transform protected area from hectares to km2
        //put region area on x-axis, sum of sites area on the y-axis
        //bubble size set to the count of sites within the region 
        var bubbles = [];
        var i = 0;
        for (var key of Object.keys(regionData)) {
          bubbles.push({
            "label": key,
            "backgroundColor": fancyColours[i],
            "data": [{
              "x": regionData[key].areaKm2,
              "y": Math.round(regionData[key].protectedSize/100),
              "r": regionData[key].protectedCount
            }]
          });
          i++;
        }
        document.getElementById("results").innerHTML = JSON.stringify(bubbles, null, 2);
      });
    
  3. Finally create the bubble chart and populate it with the data prepared

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    
    //Region data from https://sv.wikipedia.org/wiki/Sveriges_l%C3%A4n
    //Transformed into json with e.g. https://www.convertcsv.com/csv-to-json.htm
    var regionData = {"Norrbottens län":{"areaKm2":97239},"Västerbottens län":{"areaKm2":54665},"Jämtlands län":{"areaKm2":48935},"Västernorrlands län":{"areaKm2":21549},"Gävleborgs län":{"areaKm2":18118},"Dalarnas län":{"areaKm2":28029},"Uppsala län":{"areaKm2":8190},"Värmlands län":{"areaKm2":17519},"Västmanlands län":{"areaKm2":5118},"Stockholms län":{"areaKm2":6524},"Örebro län":{"areaKm2":8504},"Södermanlands län":{"areaKm2":6075},"Östergötlands län":{"areaKm2":10559},"Jönköpings län":{"areaKm2":10437},"Västra Götalands län":{"areaKm2":23800},"Gotlands län":{"areaKm2":3135},"Kronobergs län":{"areaKm2":8424},"Kalmar län":{"areaKm2":11165},"Hallands län":{"areaKm2":5427},"Blekinge län":{"areaKm2":2931},"Skåne län":{"areaKm2":10968}};
    
    var fancyColours = ["#C48793","#E8ADAA","#ECC5C0","#EDC9AF","#FDD7E4","#FCDFFF","#FFDFDD","#FBBBB9","#FAAFBE","#FAAFBA","#F9A7B0","#E7A1B0","#E799A3","#E38AAE","#F778A1","#E56E94","#F660AB","#FC6C85","#F6358A","#F52887","#E45E9D","#E4287C","#F535AA","#FF00FF","#E3319D"];
    
    //Call the API to get the data
    //use /nolinks to avoid retrieving data we won't use
    //increase the limit to make sure we get all sites
    //filter by species group (i.e. "artgrupp")
    fetch("https://nvpub.vic-metria.nu/n2000/rest/omrade/nolinks?limit=1000&artgrupp=F%20-%20Fiskar")
      .then(response => response.json())
      .then(data => {
        data.forEach(function(item) {
    
          //Sum up sites per region
          if (!regionData[item.omrade.lanAsText].protectedSize) {
            regionData[item.omrade.lanAsText].protectedSize = item.omrade.areaHa;
            regionData[item.omrade.lanAsText].protectedCount = 1;
          } else {
            regionData[item.omrade.lanAsText].protectedSize += item.omrade.areaHa;
            regionData[item.omrade.lanAsText].protectedCount += 1;
          }
        });    
         
        //Create dataset for ChartJs display
        //transform protected area from hectares to km2
        //put region area on x-axis, sum of sites area on the y-axis
        //bubble size set to the count of sites within the region 
        var bubbles = [];
        var i = 0;
        for (var key of Object.keys(regionData)) {
          bubbles.push({
            "label": key,
            "backgroundColor": fancyColours[i],
            "data": [{
              "x": regionData[key].areaKm2,
              "y": Math.round(regionData[key].protectedSize/100),
              "r": regionData[key].protectedCount
            }]
          });
          i++;
        }
    
        // Create the chart
        new Chart(document.getElementById("myChart"), {
          type: 'bubble',
          data: {
            datasets: bubbles
          },
          options: {
            title: {
              display: true,
              text: 'Protected areas for fish - number of sites and comparison with region area'
            },
            legend: { 
              display: false 
            },
            scales: {
              yAxes: [{ 
                scaleLabel: {
                  display: true,
                  labelString: "Protected area (km²)"
                }
              }],
              xAxes: [{ 
                scaleLabel: {
                  display: true,
                  labelString: "Region area (km²)"
                }
              }]
            },
            tooltips: {
              callbacks: {
                label: function(tooltipItem, data) {
                  var label = data.datasets[tooltipItem.datasetIndex].label || '';
                  if (label) {
                    label += ' (sites: ' + data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index].r + ", protected area: " + tooltipItem.value + ", region area: " + tooltipItem.label;
                }
                        return label;
                    }
                }
            }
          }
        });
      });
    

    Done!