Osteoarchaeology | Drawing Skeletal Element Statistics in QGIS

Jie Shen

Thanks to a friend’s generous sharing, I found a tutorial developed by members of a French archaeological research institute for making vector diagrams of animal skeletal element frequencies in QGIS (as below). Compared with drawing manually in other software, QGIS may have advantages in image quality and ease of updating data. So I’ve put together a brief translated introduction to share. The originals are all in French, and I used Google Translate to help; please bear with any unclear explanations or mistakes.

I. Project Members, Citation Formats and Original Links

Membres

Coordinatrices : Céline Bemilli (Inrap et UMR7209) et Carine Carpentier (Inrap)

Collaborateurs GDR : Michel Coutureau (Inrap), Maxime Danger (Université Paris 1 Panthéon – Sorbonne et UMR 8215 Trajectoires), Emmanuel Discamps (CNRS UMR 5608 TRACES), Émeline Le Goff (Inrap)

Collaborateurs hors GDR : Cédric Beauval (Archéosphère), Aurélien Creuzieux et Etienne Hofmann (SAVL)

References

Inrap (18 décembre 2020). Illustration de profils squelettiques et représentation de données statistiques automatisées via un SIG (logiciel QGIS) (Illustrating skeletal profiles and automating statistical data representation with GIS [QGIS]). Rencontres scientifiques et techniques de l’Inrap. Consulté le 4 juin 2025 à l’adresse https://doi.org/10.58079/ujyd

Inrap (1 avril 2021). Utilisation d’outils numériques pour faciliter l’illustration de profils squelettiques et automatiser la représentation des données statistiques : dessins vectorisés, SIG, référentiels en ligne (UNIR) (Using digital tools to facilitate skeletal profile illustration and automate statistical data representation: vector drawings, GIS and online repositories [UNIR]). GDR 3644 Bioarcheodat. Consulté le 4 juin 2025 à l’adresse https://doi.org/10.58079/m0xq

Video tutorial:

Émeline Le Goff, Représentations squelettiques animales via QGIS (projet UNIR) — Animal skeleton representations in QGIS (UNIR project)

More vector image resources here:

https://www.archeozoo.org/archeozootheque

II. How Vector Drawings of Animal Skeletons Work in GIS

Maps drawn in GIS have a dynamic link to a recording system (a spreadsheet or database). This means that when data changes in the database, the map display—such as point locations or colour mappings in a heat map—can update automatically from it.

The project uses digitised skeletal profiles, turns each skeletal element into a separate graphic entity in QGIS, and records them by species in vector layers (or shapefiles).

As below, turning each skeletal element into a graphic entity and relating (joining) it to a table of skeletal element statistics lets us make vector diagrams of these statistics in GIS. It saves us the time and effort of manually changing fill colours in drawing software whenever the data changes.

These integrated statistical tools can also calculate the value classes to apply directly from an existing dataset. The project simplifies and systematises all these steps using GIS, specifically the open-source software QGIS.

Below, Figure A is a conventional histogram showing the frequency of preservation of each skeletal element. Figure B is the GIS base map before data is added, and the third image is the vector diagram generated after importing the data.

Example of data visualisation. Solutré site, 2004, Aurignacian (Connet et al., 2010).

It can also automatically generate proportional circles representing numbers. Below, for example, each circle represents the number of cuts observed on a different skeletal element.

III. Tutorial on Drawing Animal Skeletons in QGIS

1. Tutorial Contents and Notes

The original tutorial includes the following topics, all as videos. I won’t translate the basic operations here, such as the introduction to the QGIS interface. If you’re unfamiliar with QGIS, find a Chinese tutorial; a little basic learning should get you started.

The videos are explained in French with no English subtitles, so I worked out the purpose and procedure from the operations and their results. I left out some parts I couldn’t understand, but I’ve checked that all the operations described here work.

The end of the post includes disarticulated skeleton diagrams and outlines for several common animal families or subfamilies. You can download them yourself from the website.

2. QGIS Setup

Please note: it’s best to keep all layer files, QGIS project files and data tables used for the diagrams in the same folder, without moving them. Otherwise the software may have trouble reading the files. Use copies of data tables for drawing and editing rather than your originals.

After downloading the base map files from the website, extract them to your chosen folder and open the .qgz file to load that species’ QGIS project. Taking the deer skeletal outline as an example, the project contains two .shp layers: one of line features for the skeletal outlines and one of polygon features for the skeletal elements.

Then set the coordinate reference system (CRS) in the lower-right corner. The project creator used EPSG:2154, so we should use the matching CRS to avoid distortion.

Open the polygon layer’s attribute table to see that each skeletal element corresponds to a polygon feature. Select a row to highlight the corresponding skeletal element in the diagram.

Right-click the layer, open Properties, then Labels. Select Single Labels at the top and COD_RA as the Value. Below, choose the label style, font size, colour and size as needed; skeletal element abbreviations will appear on the diagram. To distinguish individual teeth, vertebral positions and so on, select COD_EA as the Value to display more detailed element codes.

Comparison of the two label options

3. Updating Selectable Attribute Values

The skeletal element codes in the attribute table can be changed. As below, you can choose from values that have already been entered. To add other values or Chinese element names, right-click the layer, go to Properties–Attribute Form–Fields, select the relevant column, and scroll down to the empty row to add new values.

Below, I’ve added the Chinese values “antler” in COD_RA and “left antler” in COD_EA.

After applying, you can select “antler” and “left antler” in the attribute table and display them on the diagram.

4. Importing a Spreadsheet and Joining Attributes

First, copy the skeletal element layer and name the new layer after the site (or whatever you like). Here I’ve called it “test” for now.

Save the layer as a new .shp file so that subsequent changes can be made in this new layer. Remember to check the CRS.

Next, prepare a data table with a UID column matching the skeletal element layer so the two tables can align. I’ve chosen COD_EA because COD_RA can repeat: for example, all teeth have the code TTH, whereas COD_EA distinguishes LI1, LI2, LI3, UCAN, etc.

Once the UID is set, record the corresponding counts, frequencies, proportions, NISP, MNE and so on for each element. Make sure entries with no data have a value of 0, so they’re easy to display later.

Here I’ve thrown together a simple table of counts and proportions, called it “test”, and exported it as a .csv file.

In QGIS, select Layer–Add Layer–Add Delimited Text Layer at the top:

Click the three dots beside File name, choose our “test” data table, select CSV as the format, and check the field types. Under Geometry Definition, select No geometry: the imported table doesn’t contain skeletal element coordinates, only other attributes of existing elements (such as counts and proportions).

After importing, a new data table called “test” appears in the layer list on the left.

Now we need to join the data table to the layer, giving the skeletal element graphics attributes such as NISP, MNE and proportions. Right-click the “test” skeletal element layer–Properties–Joins–the small plus sign at the lower left. For Join layer, select the imported “test” data table; for Join field, select a UID field present in both the original layer and the new table. I’ve chosen COD_EA. You can also check Custom field name prefix (optional) to add a prefix to the new column headers in the layer’s attribute table so they’re distinguishable.

Click Apply, and three new columns appear in the skeletal element attribute table, corresponding to COD_RA, element count and proportion in the added data table.

5. Statistical Queries on the Data Table

I really couldn’t understand this part. The general idea seems to be doing statistical calculations on table data, such as totals and proportions. I’d suggest looking up Chinese or English QGIS data table tutorials for whatever you need.

6. Density Map

Layer Properties–Symbology–select Graduated as the type–choose the data field you want to display as the Value. Here I’ve chosen Count;

Choose a colour you like under Color ramp. Under Mode at the lower left, choose Natural Breaks, Equal Interval or Fixed Interval according to your needs.

Click Classify below. You can double-click Values in the middle box to adjust the data intervals as you like.

And then you’ve got yourself a heat map.

7. Categorised Colour Map

If your data is qualitative rather than quantitative—for example, preservation conditions or working traces—you can make a categorised colour map. I added a “Marks” field to the data table with some marks such as burn, cut and bite. Then I imported it into QGIS and joined it to the layer following the previous section.

Open Properties–Symbology–select Categorized as the type–choose Marks as the Value. This time I chose random color for the Color ramp and set the colour for no data to white.

Click Classify and apply to get a map of working traces.

8. Proportional Circles

To use circles of different sizes to show proportions on skeletal elements, click Processing–Toolbox at the top. Search for Point on Surface in the Toolbox panel on the right to create a new layer.

Open Point on Surface, choose “test” as the Input Layer, and save the new point layer to a file. Here I’ve saved it as “test_point.shp”.

Click the three dots beside Input Layer, and under parameters select Skip features with invalid geometries.

Click Run to generate a new layer. You’ll see a corresponding point on each skeletal element.

Open the point layer’s Properties–Symbology–Single Symbol, and select Assistant beside Size.

For Input source, select the field you want circle sizes to represent. Here I’ve chosen “ratio”. Then click the blue refresh button to preview circle sizes for different data intervals. Under output below, you can change the circles’ sizes, range and so on.

Once that’s done, choose the circle colour and other attributes in the Symbology window, and click Advanced to add a legend.

The legend can show the values represented by different circle sizes separately, or combine them to save space.

That gives you a proportional circle diagram for different skeletal elements.

9. Generating an Image File

This step is the same as exporting any other map: Project–Layouts–the current project’s name.

You can export a preset diagram with a title (editable at the upper left), image source, references and scientific name. Add a legend or other information as needed.

If you’d rather not use the project creator’s template, choose Project–New Print Layout. This creates a blank layout where you can arrange the layers, legend, title and other information yourself.

Osteoarchaeology | 利用QGIS绘制骨骼部位统计图的方法

沈劼 · 2025/6/5 16:11

中文原文

得益于我一位朋友的慷慨分享,我找到了一个由法国某考古研究所的成员开发的一个教程,可以用QGIS软件绘制矢量化的动物骨骼部位统计图(如下图所示)。相比其他软件手动绘图的方式,利用QGIS绘图在数据更新的便捷性和图像质量上可能会更有优势。所以我将教程简单译介了一下,分享给大家。原文皆为法语,我利用谷歌翻译进行译介,如果说明不清或错误还请谅解。

一、项目成员、教程引用格式及原文网址

Membres

Coordinatrices : Céline Bemilli (Inrap et UMR7209) et Carine Carpentier (Inrap)

Collaborateurs GDR : Michel Coutureau (Inrap), Maxime Danger (Université Paris 1 Panthéon – Sorbonne et UMR 8215 Trajectoires), Emmanuel Discamps (CNRS UMR 5608 TRACES), Émeline Le Goff (Inrap)

Collaborateurs hors GDR : Cédric Beauval (Archéosphère), Aurélien Creuzieux et Etienne Hofmann (SAVL)

References

Inrap (18 décembre 2020). Illustration de profils squelettiques et représentation de données statistiques automatisées via un SIG (logiciel QGIS) (骨骼轮廓图解和通过 GIS(QGIS 软件)自动统计数据表示). Rencontres scientifiques et techniques de l’Inrap. Consulté le 4 juin 2025 à l’adresse https://doi.org/10.58079/ujyd

Inrap (1 avril 2021). Utilisation d’outils numériques pour faciliter l’illustration de profils squelettiques et automatiser la représentation des données statistiques : dessins vectorisés, SIG, référentiels en ligne (UNIR) (使用数字工具来促进骨骼轮廓的说明并自动表示统计数据:矢量化绘图、GIS、在线存储库(UNIR)). GDR 3644 Bioarcheodat. Consulté le 4 juin 2025 à l’adresse https://doi.org/10.58079/m0xq 

视频教程:

Émeline Le Goff, Représentations squelettiques animales via QGIS (projet UNIR) 通过 QGIS 呈现的动物骨骼(UNIR 项目)

更多矢量图像资源可见这里:

我之前写过的一些关于GIS的基础知识可见这里:

文科出身的考古学生如何入门科技分析方法 | 考古GIS基本概念

文科出身的考古学生如何入门科技分析方法 | 考古GIS学习思路

GIS笔记 | 基础空间分析 Basic Spatial Analysis (上)

GIS笔记 | 基础空间分析 Basic Spatial Analysis (下)

二、使用GIS软件实现动物骨骼的矢量化绘图原理

由于GIS软件所绘制的地图与记录系统(电子表格或数据库)之间存在动态链接,也就是说数据库中的数据发生改变的时候,地图上的显示(比如说标点的位置,热力图中的颜色映射等)就可以根据数据库进行自动更新。

该项目使用数字化的骨骼剖面图,并将每个骨骼部分在QGIS 软件中转换为独立的图形实体,然后按物种记录在矢量图层(或Shapefile)中。

如下图所示,通过将每个骨骼部位转换为图形实体,并与骨骼部位的统计数据表建立关系(连接),就可以实现利用GIS软件绘制矢量的骨骼部位统计图,且节省了利用绘图软件绘图时每次数据变化需要手动修改填色的时间和精力。

此外,这些集成的统计工具可以根据现有数据集直接计算要应用的值类别。该项目使用 GIS 软件(结合使用开源软件QGIS)简化并系统化了所有这些工作步骤。

如下图所示,图A为经典直方图,用于展示各骨骼部位的保存频率。图B是GIS所用的未填充数据的底图,图三为导入数据后生成的矢量图。

数据可视化示例。索卢特雷遗址,2004 年,奥瑞纳阶(Connet 等人,2010 年)

还可以生成填充自动生成填充代表数字的比例圆圈,例如下图所示,每个圆圈代表不同骨骼部位上观察到的切割次数。

三、通过QGIS绘制动物骨骼教程:

1 教程内容及说明

原教程包含以下内容,皆为视频教程,此处对QGIS界面介绍等基础操作不做译介,大家不熟悉QGIS的可以另找中文教程,简单学习即可上手。

因为视频为法语说明,没有英文字幕,所以我是根据操作和操作后的结果复原操作目的和过程,有一部分我听不懂的就未做翻译,但是我写在这里的操作都是经我验证可行的。

文后有几种常见动物科或亚科的骨骼分解图和轮廓图,大家可以自行在网页端下载使用。

2 QGIS设置

请注意,绘图过程中涉及的所有图层文件、QGIS项目文件、制图所用的数据表最好都保存在同一文件夹内,并且不要挪动位置,否则会影响软件对文件的读取。数据表等最好不要使用原表文件,用复件来进行绘图和修改。

从网站下载底图文件后,解压到选择的文件夹位置,然后打开.qgz文件即可导入这个物种的QGIS project文件。以鹿科骨骼部位轮廓图为例,可以看到项目中包含了两个.shp图层,一个是骨骼轮廓的线条要素,一个是骨骼部位的面要素。

然后在右下角选择设置坐标参考系(CRS),项目制作者使用的是EPSG:2154,我们使用时也要调整为对应的CRS以防图形变形。

打开面图层的属性表即可看到每个骨骼部位对应一个骨骼的面要素,选中改行即可看到图中高亮显示对应的骨骼部位。

右键图层打开Properties,再点进Labels,最上方选择single_Lables, Value 选择COD_RA,然后下面根据自己需求选择标签的样式、字号、颜色、大小等,即可在图上显示骨骼部位的简写了。如果需要区分不同牙齿、脊椎部位等,则可以Value选择COD_EA,即会显示更详细的骨骼部位编码。

两种标签方式对比

3 更新属性表可选值

属性表的骨骼部位编码是可以更改的,如下图所示,可以在已经输入好的各种值中进行选择。如果想要新增别的值,或者增加中文部位名称,则可右键图层,Properties-Attribute Form-Fields 里选择对应列,拉到最下方的空白列添加新的值。

如下图所示,我增加了COD_RA里鹿角和COD_EA里左侧鹿角这两个中文值。

应用后即可在属性表中选择“鹿角”和“左侧鹿角”这两个值,并对应显示在图中。

4 导入电子表格并进行属性连接

首先复制骨骼部位所在图层,并将新图层命名为遗址名字(或随便什么你想要的名字),这里暂命名为“test”。

即可将图层保存为新的.shp文件,这样之后的修改都可以在这个新图层里进行。注意检查CRS。

然后准备数据表,注意数据表中要有一列UID与骨骼部位图层的中的一列相符,以便两表数据对齐。在这里我选择的是COD_EA,因为COD_RA可能有所重复,比如所有牙齿的COD_RA都是TTH,但COD_EA则分别有LI1,LI2,LI3,UCAN等。

UID确定之后,即可对应记录骨骼部位的数量、频率、占比,NISP和MNE等值。并且要确保没有数据的地方数值为0,方便之后图像化的时候显示。

这里我简单乱做了一个数量和占比的表,命名为test,并导出为.csv格式。

然后在QGIS中,最上方选择Layer-Add Layer-Add Delimited Text Layer:

File name点击右侧三个小点,选择我们的数据表test,format选CSV,确认字段类型,在Geometry Definition里面选定No geometry,也就是说导入的表格不包含骨骼部位的坐标信息,只包含已有的骨骼部位的其他属性数据(比如总数、占比等)。

导入数据表后即可看到左侧的图层列表中新增了一个数据表test

然后我们要将数据表和图层合并,这样骨骼部位的图形就有了INSP、MNE、占比等属性。右键骨骼部位图层test-Properties-Joints-左下角小加号-Joint layer选择导入的数据表“test”,Joint field选择原图层和新表格都有的一个UID field,这里我选的是COD_EA,然后勾选Custom field name prefix(可选可不选),会在图层属性表中给新填的数据表头加一个prefix以供区别。

Apply确认后即可看到,骨骼部位的属性表中新增了三列,对应新增数据表中的COD_RA,骨骼部位数及占比。

5 对数据表的统计查询

这一段我实在是听不懂,大意应该是可以对表中数据进行一些计算总和、比例等统计分析,建议根据需求自行查询QGIS数据表操作的中文或英文教程。

6 密度图

图层Properties-Symbology-种类选Graduated-Value选想展示的数据field,这里我选的是Count;

Color ramp选喜欢的颜色-左下角Mode根据自己需求选Natural Breaks, Equal Interval or Fixed Interval

点下方Classify,可以双击中间方格里的Values调整自己想要的数据区间

之后即可收获一张热力图

7 分类着色图

如果数据不是量化数据,而是记录保存状况或者加工痕迹等定性数据,则可以画分类着色图。我在数据表中新增了Marks这一个field,并添加了一些burn、cut、bite之类的痕迹。然后按上一节的教程导入QGIS,合并到图层。

打开Properties-Symbology-类型选择Categorized-Value选择Marks,Color ramp这次选择了random color,并把没有数据的颜色设为白色

点击Classify后应用,即可获得一个加工痕迹分布图

8 比例圆点

如果想在骨骼部位上以不同大小的圆点来表示占比,可以点击最上方Processing-Toolbox,在右侧Toolbox栏中搜索Point on Surface这一工具来创建一个新的图层。

打开Point on Surface工具后,Input Layer选test,并且将新的圆点的图层save to file,这里我存为”test_point.shp”。

点击在Input Layer 右侧的三个点,在parameters里选择Skip features with invalid geometries.

点击Run后,一个新的图层就生成了,可以看到每个骨骼部位上都有一个对应的圆点。

点进圆点图层Properties-Symbology-Single Symbol,在Size右侧选择Assistant

然后Input source选择你想要用圆点大小来表示的数据field,这里我选择ratio。然后点击那个蓝色的循环按钮,就会出现不同数据区间圆点大小的预览图。在下面的output可以更改圆点的大小、范围等。

完成后在Symbology窗口选择圆点颜色等属性,并且点击Advanced增添一个图例。

图例可以选择分开显示不同大小圆点所代表的数据,也可以合并显示节省空间。

完成后就生成了不同骨骼部位的比例圆点图。

9 生成图像文件

这一步就和其他的地图导出步骤一样,Project-Layouts-当前project名称

即可导出预设好的,带标题(左上角可修改)、图像来源、reference信息和科学名的图像。此外可根据自己需求添加图例及其他信息。

如果不想使用项目制作者提供的模板,则可选择Project-New Print Layout, 则会生成一张空白底图,我们可以自行摆放图层、图例、标题等信息。

Discover more from ArchaeoJieSHEN

Subscribe now to keep reading and get access to the full archive.

Continue reading