Learn R Programming

frheritage

Overview

The Atlas du Patrimoine is the official national platform of the French Ministry of Culture that centralizes cultural heritage information. It provides access to a wide range of spatial and descriptive datasets, documenting France’s architectural, archaeological, movable, and intangible heritage.

The Atlas gathers and harmonizes data from several major databases such as:

  • Merimee – architectural and monumental heritage (churches, castles, etc.)

  • Palissy – movable heritage (objects, furniture, sculptures, etc.)

  • Patrimoine Mondial – UNESCO World Heritage sites in France

  • Patrimoine Archeologique – archaeological sites and surveys

  • Musees de France, Joconde, and other cultural inventories

All datasets are available through web services and open data exports provided by the Ministry of Culture. More details and an overview of available datasets can be found at: http://atlas.patrimoines.culture.fr/atlas/trunk/static/presentation.html

Citation and source

Data are provided by the French Ministry of Culture, through the Atlas du Patrimoine platform: http://atlas.patrimoines.culture.fr Please cite both the Atlas du Patrimoine and this package when using data in scientific or professional work.

API and data access disclaimer

The frheritage package is an independent, open-source client designed to facilitate access to public cultural data provided by the French Ministry of Culture. This package is not affiliated with, endorsed by, or officially supported by the Ministry.

All data remain the property of the French Ministry of Culture and are distributed under the Etalab Open License 2.0 (or any equivalent open-data license indicated by the data provider). Users are responsible for complying with the applicable terms of use, attribution requirements, and update policies of the Atlas du Patrimoine datasets.

For official documentation and metadata, please refer to: https://www.culture.gouv.fr/aides-demarches/protections-labels-et-appellations


The frheritage package

Purpose

The frheritage R package provides functions to explore, query, and retrieve datasets from the Atlas du Patrimoine within R. It aims to facilitate spatial analysis and data integration in geographic workflows, particularly for heritage management, cultural mapping, and landscape studies.

It allows to:

  • Retrieve and filter heritage datasets by code (internal nomenclature) and departement

  • Perform spatial queries directly from geometries (sf objects)

  • List all available heritage layers

  • Automatically validate user inputs and ensure compatibility with functions

Main features

The main functions are:

  • get_heritage_layernames() : Returns a data frame listing all available heritage datasets with their internal codes, and labels. Useful for identifying which datasets are accessible through the package.

  • get_heritage(): Downloads one or several datasets from the Atlas du Patrimoine from a given sf object. It can apply spatial filters (intersects, within, etc.) and automatically handle geometries.

  • get_heritage_ids(): Retrieves available heritage IDs from the Atlas du Patrimoine from a given sf object.

The get_heritage() function works with the internal database frheritage::all_ids which contains (normally) all the IDs for metropolitan France.

Getting start

# Just run
devtools::install_github("mucau/frheritage")

# Focus on a city
my_sf_polygon <- frcadastre::get_etalab(72191, data="communes")

# Retrieve the "immeuble classes ou inscrits" by using code "IMMH"
immh <- get_heritage(
  x = my_sf_polygon,
  data_code = "IMMH",
  buffer = 2500,
  spatial_filter = "within"
)

# To ask something else, try an other code !
# You don't know the codes ?
codes <- get_heritage_layernames()

# You don't trust my codes ?
# Okay, that's fine. You can check that I haven't forgotten any.
all_ids <- frheritage::all_ids # <- the internal database
ids <- get_heritage_ids(my_sf_polygon)

Problems and Issues


Have fun ! :)

Copy Link

Version

Install

install.packages('frheritage')

Version

0.1.0

License

GPL (>= 3)

Maintainer

Matthieu Chevereau

Last Published

January 24th, 2026

Functions in frheritage (0.1.0)

zip_download

Download a ZIP file from a given URL
zip_query_build

Build a URL query to download a ZIP
ids_url_build

Build a search URL for the RSS service
get_heritage_layernames

Get heritage layer codes and labels
quiet

Execute an expression completely silently
all_ids

Available layer datasets
extdata_examples

Example files for testing
get_heritage_ids

Retrieve heritage layer IDs for a given sf object
data_filter

Filter layer IDs by internal code and department
geo_spatial_check

Validate a spatial predicate string
geo_object_check

Check that spatial objects are valid sf layers with expected geometry type
geo_cast

Cast geometries to simple types
ids_download

Download and parse heritage metadata from a URL
geo_sf_bind

Bind multiple sf objects into a single sf
ids_to_codes

Determine internal codes from IDs titles
geo_spatial_filter

Filter an sf layer by spatial relationship
geo_shapefiles_read

Read and transform shapefiles from a ZIP archive
geo_dep

Retrieve INSEE department codes for each feature in an sf object
data_check

Check that layer data codes are valid
geo_extent

Compute bounding boxes for each feature in an sf object
geo_prepare

Prepare and aggregate an sf object
geo_object_type

Determine the geometry type of an sf object
geo_too_large

Check if an sf object exceeds size or extent thresholds
get_heritage

Retrieve and download heritage spatial data for a given sf object