Skip to content

Commit

Permalink
add license to script
Browse files Browse the repository at this point in the history
  • Loading branch information
EwanSC committed Jul 5, 2022
1 parent 052735c commit a70b8a5
Show file tree
Hide file tree
Showing 2 changed files with 226 additions and 0 deletions.
225 changes: 225 additions & 0 deletions .Rhistory
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,228 @@ geom_sf(data = allstela_ll, aes(size = n), alpha=0.6, colour = '#cd2026') +
labs(size = 'Stelae') +
ggtitle("Stelae of Legio VII Soldiers in Dalmatia") +
coord_sf(default_crs = st_crs(4326), xlim = c(13, 21), ylim = c(41.5, 46))
# making a scatter plot with data from Bromans Dataset
# source data: https://doi.org/10.6078/M7X34VK8
# Author: Ewan Coopey
# Creation: 29/06/2022
# Last Edit: 29/06/2022
library(tibble)
library(data.table)
library(dplyr)
library(sqldf)
library(ggplot2)
library(ggrepel)
library(sf)
library("rnaturalearthdata")
library("rnaturalearth")
library("rnaturalearthhires")
Epigraphy <- read.csv('data/bromans-all_monument_with_location.csv')
str(Epigraphy)
allmonumentsplace <- na.omit(Epigraphy %>%
select(Ancient_Site,LAT,LONG) %>%
group_by(Ancient_Site) %>%
count(Ancient_Site,LAT,LONG) %>%
arrange(desc(n)))
(allmonumentsll <- st_as_sf(allmonumentsplace, coords = c('LONG', 'LAT'), remove = FALSE,
crs = 4326, agr = "constant"))
## plotting
ggplot() +
geom_sf(data = world, color = "darkgrey", fill = "lightgrey") +
geom_sf(data = roman_69_provinces, colour = 'black') +
geom_sf(data = allmonumentsll, aes(size = n), alpha=0.6, colour = '#cd2026') +
labs(size = 'Inscribed Monuments') +
ggtitle("Monuments of Legio VII in Roman Dalmatia", subtitle = "Epigraphic Distribution") +
coord_sf(default_crs = st_crs(4326), xlim = c(14, 20), ylim = c(42, 45.5))
ggplot() +
geom_sf(data = world, color = "darkgrey", fill = "lightgrey") +
geom_sf(data = roman_69_provinces, colour = 'black') +
geom_sf(data = allmonumentsll, aes(size = n), alpha=0.6, colour = '#cd2026') +
labs(size = 'Inscribed Monuments') +
ggtitle("Monuments of Legio VII in Dataset", subtitle = "Epigraphic Distribution") +
coord_sf(default_crs = st_crs(4326), xlim = c(15.237922, 37.5053445), ylim = c(32.492331, 44.73291))
library(tibble)
library(data.table)
library(dplyr)
library(sqldf)
library(ggplot2)
library(ggrepel)
library(sf)
library("rnaturalearthdata")
library("rnaturalearth")
library("rnaturalearthhires")
Epigraphy <- read.csv('data/bromans-all_monument_with_location.csv')
Epigraphy <- read.csv('analysis/all_monument_with_location.csv')
str(Epigraphy)
allmonumentsplace <- na.omit(Epigraphy %>%
select(Ancient_Site,LAT,LONG) %>%
group_by(Ancient_Site) %>%
count(Ancient_Site,LAT,LONG) %>%
arrange(desc(n)))
(allmonumentsll <- st_as_sf(allmonumentsplace, coords = c('LONG', 'LAT'), remove = FALSE,
crs = 4326, agr = "constant"))
# now lets make a map
roman_69_map <- st_read(
"shape_files/roman_empire_ad_69_extent.shp")
# bring world geo data from rnatural earth
world <- ne_countries(scale = "large", returnclass = "sf")
class(world)
st_geometry_type(roman_69_map)
st_crs(roman_69_map)
st_bbox(roman_69_map)
ncol(roman_69_map)
names(roman_69_map)
head(roman_69_map)
roman_69_provinces <- st_read(
"shape_files/roman_empire_ad_69_provinces.shp")
st_geometry_type(roman_69_map)
# now lets make a map
roman_69_map <- st_read(
"shape_files/roman_empire_ad_69_extent.shp")
# bring world geo data from rnatural earth
world <- ne_countries(scale = "large", returnclass = "sf")
class(world)
st_geometry_type(roman_69_map)
st_crs(roman_69_map)
st_bbox(roman_69_map)
ncol(roman_69_map)
library(tibble)
library(data.table)
library(dplyr)
library(sqldf)
library(ggplot2)
library(ggrepel)
library(sf)
library("rnaturalearthdata")
library("rnaturalearth")
library("rnaturalearthhires")
# lets make a map
# first bring world geo data from rnatural earth
world <- ne_countries(scale = "large", returnclass = "sf")
class(world)
# lets load a roman provinces shapefile (c.69 CE)
roman_69_provinces <- st_read(
"shape_files/roman_empire_ad_69_provinces.shp")
Epigraphy <- read.csv('analysis/all_monument_with_location.csv')
str(Epigraphy)
allmonumentsplace <- na.omit(Epigraphy %>%
select(Ancient_Site,LAT,LONG) %>%
group_by(Ancient_Site) %>%
count(Ancient_Site,LAT,LONG) %>%
arrange(desc(n)))
(allmonumentsll <- st_as_sf(allmonumentsplace, coords = c('LONG', 'LAT'), remove = FALSE,
crs = 4326, agr = "constant"))
## plotting
ggplot() +
geom_sf(data = world, color = "darkgrey", fill = "lightgrey") +
geom_sf(data = roman_69_provinces, colour = 'black') +
geom_sf(data = allmonumentsll, aes(size = n), alpha=0.6, colour = '#cd2026') +
labs(size = 'Inscribed Monuments') +
ggtitle("Monuments of Legio VII in Roman Dalmatia", subtitle = "Epigraphic Distribution") +
coord_sf(default_crs = st_crs(4326), xlim = c(14, 20), ylim = c(42, 45.5))
ggplot() +
geom_sf(data = world, color = "darkgrey", fill = "lightgrey") +
geom_sf(data = roman_69_provinces, colour = 'black') +
geom_sf(data = allmonumentsll, aes(size = n), alpha=0.6, colour = '#cd2026') +
labs(size = 'Inscribed Monuments') +
ggtitle("Monuments of Legio VII in Dataset", subtitle = "Epigraphic Distribution") +
coord_sf(default_crs = st_crs(4326), xlim = c(15.237922, 37.5053445), ylim = c(32.492331, 44.73291))
getwd()
# making a scatter plot with data from Bromans Dataset
# source data: https://doi.org/10.6078/M7X34VK8
# Author: Ewan Coopey
# Creation: 29/06/2022
# Last Edit: 05/07/2022
# First, load packages (import if first time using install.packages)
library(tibble)
library(data.table)
library(dplyr)
library(sqldf)
library(ggplot2)
library(ggrepel)
library(sf)
library("rnaturalearthdata")
library("rnaturalearth")
library("rnaturalearthhires")
# lets make a map
# first bring world geo data from rnatural earth
world <- ne_countries(scale = "large", returnclass = "sf")
class(world)
# lets load a roman provinces shapefile (c.69 CE)
roman_69_provinces <- st_read(
"shape_files/roman_empire_ad_69_provinces.shp")
Epigraphy <- read.csv('analysis/all_monument_with_location.csv')
str(Epigraphy)
allmonumentsplace <- na.omit(Epigraphy %>%
select(Ancient_Site,LAT,LONG) %>%
group_by(Ancient_Site) %>%
count(Ancient_Site,LAT,LONG) %>%
arrange(desc(n)))
(allmonumentsll <- st_as_sf(allmonumentsplace, coords = c('LONG', 'LAT'), remove = FALSE,
crs = 4326, agr = "constant"))
## plotting
ggplot() +
geom_sf(data = world, color = "darkgrey", fill = "lightgrey") +
geom_sf(data = roman_69_provinces, colour = 'black') +
geom_sf(data = allmonumentsll, aes(size = n), alpha=0.6, colour = '#cd2026') +
labs(size = 'Inscribed Monuments') +
ggtitle("Monuments of Legio VII in Roman Dalmatia", subtitle = "Epigraphic Distribution") +
coord_sf(default_crs = st_crs(4326), xlim = c(14, 20), ylim = c(42, 45.5))
ggsave("dalmatian_monuments.png", dpi = 300)
ggplot() +
geom_sf(data = world, color = "darkgrey", fill = "lightgrey") +
geom_sf(data = roman_69_provinces, colour = 'black') +
geom_sf(data = allmonumentsll, aes(size = n), alpha=0.6, colour = '#cd2026') +
labs(size = 'Inscribed Monuments') +
ggtitle("Monuments of Legio VII in Dataset", subtitle = "Epigraphic Distribution") +
coord_sf(default_crs = st_crs(4326), xlim = c(15.237922, 37.5053445), ylim = c(32.492331, 44.73291))
ggsave("all_monuments.png", dpi = 300)
# making a scatter plot with data from Bromans Dataset
# source data: https://doi.org/10.6078/M7X34VK8
# Author: Ewan Coopey
# Creation: 29/06/2022
# Last Edit: 05/07/2022
# First, load packages (import if first time using install.packages).
# If you have issues downloading "rnaturalearthhires" follow guide here: https://stackoverflow.com/questions/66294044/rnaturalearthhires-package-installation-error
library(tibble)
library(data.table)
library(dplyr)
library(sqldf)
library(ggplot2)
library(ggrepel)
library(sf)
library("rnaturalearthdata")
library("rnaturalearth")
library("rnaturalearthhires")
# lets make a map
# first bring world geo data from rnatural earth
world <- ne_countries(scale = "large", returnclass = "sf")
class(world)
# lets load a roman provinces shapefile (c.69 CE)
roman_69_provinces <- st_read(
"shape_files/roman_empire_ad_69_provinces.shp")
Epigraphy <- read.csv('analysis/all_monument_with_location.csv')
str(Epigraphy)
allmonumentsplace <- na.omit(Epigraphy %>%
select(Ancient_Site,LAT,LONG) %>%
group_by(Ancient_Site) %>%
count(Ancient_Site,LAT,LONG) %>%
arrange(desc(n)))
(allmonumentsll <- st_as_sf(allmonumentsplace, coords = c('LONG', 'LAT'), remove = FALSE,
crs = 4326, agr = "constant"))
## plotting
ggplot() +
geom_sf(data = world, color = "darkgrey", fill = "lightgrey") +
geom_sf(data = roman_69_provinces, colour = 'black') +
geom_sf(data = allmonumentsll, aes(size = n), alpha=0.6, colour = '#cd2026') +
labs(size = 'Inscribed Monuments') +
ggtitle("Monuments of Legio VII in Roman Dalmatia", subtitle = "Epigraphic Distribution") +
coord_sf(default_crs = st_crs(4326), xlim = c(14, 20), ylim = c(42, 45.5))
ggsave("media/dalmatian_monuments.png", dpi = 300)
ggplot() +
geom_sf(data = world, color = "darkgrey", fill = "lightgrey") +
geom_sf(data = roman_69_provinces, colour = 'black') +
geom_sf(data = allmonumentsll, aes(size = n), alpha=0.6, colour = '#cd2026') +
labs(size = 'Inscribed Monuments') +
ggtitle("Monuments of Legio VII in Dataset", subtitle = "Epigraphic Distribution") +
coord_sf(default_crs = st_crs(4326), xlim = c(15.237922, 37.5053445), ylim = c(32.492331, 44.73291))
ggsave("media/all_monuments.png", dpi = 300)
1 change: 1 addition & 0 deletions r_scripts/using_db_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Author: Ewan Coopey
# Creation: 29/06/2022
# Last Edit: 05/07/2022
# CC BY SA 4.0

# First, load packages (import if first time using install.packages).
# If you have issues downloading "rnaturalearthhires" follow guide here: https://stackoverflow.com/questions/66294044/rnaturalearthhires-package-installation-error
Expand Down

0 comments on commit a70b8a5

Please sign in to comment.