Skip to content

Commit

Permalink
checked with checklist package
Browse files Browse the repository at this point in the history
  • Loading branch information
stienheremans committed Dec 13, 2024
1 parent 536f415 commit 9d67fd4
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 9 deletions.
40 changes: 40 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"access_right": "open",
"title": "Vitaliteit Grove Den",
"description": "<p>In this project, the vitality status of Pinus sylvestris in Flanders is assessed using drones, orthophotos and satellites<\/p>",
"keywords": [
"remote sensing",
"grove den",
"vitaliteit",
"drones",
"satellieten",
"orthofoto's'"
],
"upload_type": "software",
"license": "CC-BY-4.0",
"language": "eng",
"contributors": [
{
"name": "Heremans, Stien",
"affiliation": "Instituut voor Natuur- en Bosonderzoek (INBO)",
"orcid": "0000-0002-5356-1093",
"type": "contactperson"
},
{
"name": "Research Institute for Nature and Forest (INBO)",
"type": "rightsholder"
}
],
"creators": [
{
"name": "Heremans, Stien",
"affiliation": "Instituut voor Natuur- en Bosonderzoek (INBO)",
"orcid": "0000-0002-5356-1093"
}
],
"communities": [
{
"identifier": "inbo"
}
]
}
26 changes: 26 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
cff-version: 1.2.0
message: If you use this software, please cite it using these metadata.
title: "Vitaliteit Grove Den"
authors:
- given-names: Stien
family-names: Heremans
affiliation: Instituut voor Natuur- en Bosonderzoek (INBO)
orcid: 0000-0002-5356-1093
keywords:
- remote sensing
- grove den
- vitaliteit
- drones
- satellieten
- orthofoto's'
contact:
- given-names: Stien
family-names: Heremans
affiliation: Instituut voor Natuur- en Bosonderzoek (INBO)
orcid: 0000-0002-5356-1093
doi: ~
license: CC-BY-4.0
repository-code: https://github.com/inbo/Vitaliteit-grove-den/
type: software
abstract: "In this project, the vitality status of Pinus sylvestris in Flanders is
assessed using drones, orthophotos and satellites"
23 changes: 14 additions & 9 deletions source/Drone_images.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ geojson_data <- st_read(geojson_file)
geojson_data <- st_make_valid(geojson_data)
# Transform the CRS to WGS84 (longlat)
geojson_data_WGS <- st_transform(geojson_data, crs = 4326)
geojson_data_wgs <- st_transform(geojson_data, crs = 4326)
# Calculate centroids of the polygons
centroids <- st_centroid(geojson_data_WGS)
Expand All @@ -30,7 +30,7 @@ leaflet() %>%
addTiles() %>% # Add default base map tiles
# Add polygons to the map
addPolygons(
data = geojson_data_WGS,
data = geojson_data_wgs,
color = "blue", # Polygon border color
fillColor = "cyan", # Polygon fill color
weight = 1, # Border thickness
Expand All @@ -51,7 +51,8 @@ leaflet() %>%

```{r calculate statistics of drone flights}
# Calculate area in square meters, then convert to hectares
geojson_data$area_ha <- as.numeric(st_area(geojson_data)) / 10000 # Convert to hectares
geojson_data$area_ha <- as.numeric(st_area(geojson_data)) / 10000
# Convert to hectares
# Summary statistics
num_plots <- nrow(geojson_data)
Expand All @@ -62,7 +63,8 @@ avg_size <- mean(geojson_data$area_ha)
# Store in a list for easy display
# Create summary statistics
summary_stats <- data.frame(
Metric = c("Number of Plots", "Minimum Size (ha)", "Maximum Size (ha)", "Average Size (ha)"),
Metric = c("Number of Plots", "Minimum Size (ha)", "Maximum Size (ha)",
"Average Size (ha)"),
Value = c(num_plots, min_size, max_size, avg_size)
)
Expand All @@ -75,9 +77,11 @@ library(gridExtra)
# Summary statistics
summary_stats <- data.frame(
Metric = c("Number of Plots", "Minimum Size (ha)", "Maximum Size (ha)", "Average Size (ha)"),
Metric = c("Number of Plots", "Minimum Size (ha)", "Maximum Size (ha)",
"Average Size (ha)"),
Value = c(
formatC(as.integer(nrow(geojson_data)), format = "d"), # Force integer display
formatC(as.integer(nrow(geojson_data)), format = "d"),
# Force integer display
round(min(geojson_data$area_ha), 2), # Round for better readability
round(max(geojson_data$area_ha), 2), # Round for better readability
round(mean(geojson_data$area_ha), 2) # Round for better readability
Expand All @@ -103,14 +107,15 @@ table_plot <- tableGrob(
grid.arrange(
hist_plot, table_plot,
ncol = 2, # Side-by-side layout
widths = c(2, 1), # Adjust relative width: 2/3 for histogram, 1/3 for table
top = textGrob("Plot Size Distribution and Summary Statistics", gp = gpar(fontsize = 14))
widths = c(2, 1), # Adjust relative width: 2/3 for histogram,
# 1/3 for table
top = textGrob("Plot Size Distribution and Summary Statistics",
gp = gpar(fontsize = 14))
)
```


# Step 2: Visualize actual drone images
```{r visualize drone images}
```

0 comments on commit 9d67fd4

Please sign in to comment.