info.laji.fi

Knowledge base of the FinBIF

OGC API in QGIS, Python or R

How to fetch data from geoapi.laji.fi?

Option 1: Connect API to QGIS

Follow the instructions in the image below and connect the API to QGIS:

Note: API has a lot of data so it might be a good idea to filter data. See the instructions below.

1. Open Data Source Manager and the tab WFS / OGC API – Features

2. Click New.

3. Fill Name and URL. You can decide the name by yourself but the URL should be https://geoapi.laji.fi/.

4. Set the Max. number of features to prevent QGIS from downloading all the occurrences. Otherwise it may crash. After that, click Ok.

5. Click Connect.

6. Select the collection from the list. Occurrences have been grouped by biogeographical provinces. Some occurrences might be in multiple collections at the same time as 10 kilometers buffer were used around the areas.

7. Click Add and enjoy the data in the map view.

NOTE! You can also filter data using SQL filters or bounding boxes. See the instructions below.

Filtering occurrences in QGIS.

1. Once you have connected the API to QGIS, select the collection you want in Data Source Manager and click Build Query.

3. In the Query Builder window, select the field you want to query to. Then select the operator. The LIKE operator is used for case-insensitive pattern matching. You can also use equals sign (=) if you know the exact value.

"English_name" LIKE 'European Greenfinch'

4. You can click Test to see if your query returns any features.

5. Click Ok and Add to add selected occurrences to the map view.

Option 2: Use Python programming language

import geopandas as gpd

gdf = gdp.read_file("https://geoapi.laji.fi/collections/uusimaa_points/items?Englanninkielinen_nimi=European Greenfinch")

print(gdf)

Option 3: Use R programming language

library(httr)

library(jsonlite)

response <- GET("https://geoapi.laji.fi/collections/uusimaa_points/items?Englanninkielinen_nimi=European Greenfinch")

content <- content(response, as="text", encoding=”utf-8”)

json_data <- fromJSON(content)

print(json_data)

Hint: You can also use FinBIF R package to access occurrence data in R. See more from our GitHub-repository.

Scroll to top