Type: | Package |
Title: | Retrieve Data from MacLeish Field Station |
Version: | 0.3.9 |
Description: | Download data from the Ada and Archibald MacLeish Field Station in Whately, MA. The Ada and Archibald MacLeish Field Station is a 260-acre patchwork of forest and farmland located in West Whately, MA that provides opportunities for faculty and students to pursue environmental research, outdoor education, and low-impact recreation (see https://www.smith.edu/about-smith/sustainable-smith/macleish for more information). This package contains weather data over several years, and spatial data on various man-made and natural structures. |
License: | CC0 |
LazyData: | TRUE |
Imports: | dplyr, lubridate, phenocamr, readr, rvest, sf, stringr, xml2 |
Depends: | R (≥ 3.5), etl |
Suggests: | ggplot2, dbplyr, RSQLite, broom, knitr, leaflet, purrr, rmarkdown, markdown, mgcv, clifro, testthat |
URL: | https://github.com/beanumber/macleish |
BugReports: | https://github.com/beanumber/macleish/issues |
RoxygenNote: | 7.2.0 |
Encoding: | UTF-8 |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2022-07-06 20:11:41 UTC; bbaumer |
Author: | Benjamin S. Baumer
|
Maintainer: | Benjamin S. Baumer <ben.baumer@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2022-07-06 20:30:07 UTC |
Extract weather data
Description
Retrieve data from the Macleish Field Station weather monitors
Usage
## S3 method for class 'etl_macleish'
etl_extract(obj, ...)
## S3 method for class 'etl_macleish'
etl_transform(obj, ...)
etl_transform_help(obj, ...)
Arguments
obj |
an |
... |
arguments passed to methods |
Examples
macleish <- etl("macleish")
str(macleish)
## Not run:
macleish %>%
etl_extract() %>%
etl_transform() %>%
etl_load()
whately <- macleish %>%
tbl("whately")
orchard <- macleish %>%
tbl("orchard")
whately %>%
summarize(N = n(), avg_temp = mean(temperature))
orchard %>%
summarize(N = n(), avg_temp = mean(temperature))
# check data types
whately %>%
glimpse()
# if using SQLite, datetimes will get converted to integers
whately <- whately %>%
mutate(when_datetime = datetime(when, 'unixepoch'))
whately %>%
glimpse()
# show the most recent data -- should be within the past hour
whately %>%
collect() %>%
tail()
# show that no time-shifting is happening
if (require(ggplot2)) {
macleish %>%
tbl("whately") %>%
collect() %>%
mutate(when = lubridate::ymd_hms(when)) %>%
filter(lubridate::year(when) == 2012 & month(when) == 12 & day(when) == 20) %>%
ggplot(aes(x = when, y = temperature)) + geom_line()
}
## End(Not run)
MacLeish spatial data
Description
Shapefiles from the MacLeish Field Station. The field station
itself is located at lat = 42.449167
, lon = -72.679389
. These
data contain information about various man-made and natural structures
surrounding the field station.
Usage
macleish_layers
Format
A list
of sf::sf()
objects, each providing a different layer.
- landmarks
Landmarks
- forests
Type of dominant tree in individual forests, as noted by Jesse Bellemare
- streams
local streams
- challenge_courses
Challenge courses on the property
- buildings
Buildings at MacLeish
- wetlands
Wetland areas
- boundary
the property boundary
- research
research plots
- soil
soil deposits used by Amy Rhodes
- trails
Hiking trails
- camp_sites
Two camp sites
- elevation
30 foot elevation contours
Details
Each of the sf::sf()
objects are projected in
epsg:4326
for easy integration with Google Maps or
leaflet::leaflet()
objects.
Examples
names(macleish_layers)
macleish_layers[["buildings"]]
if (require(sf)) {
plot(macleish_layers[["buildings"]])
}
Maple sap collection at MacLeish
Description
Maple sap collection at MacLeish
Usage
maple_sap
Format
- when
the date of collection
- sap
how much sap was collected, in gallons
- Comments
comments
- People
who was there?
Retrieve elevation layers from MassGIS
Description
Retrieve elevation layers from MassGIS
Usage
mass_gis(layer = "contours250k")
macleish_intersect(x)
Arguments
layer |
MassGIS layer name to import |
x |
an |
Details
This function will download shapefiles from MassGIS, unzip them,
transform the projection to EPSG:4326, compute their intersection with the
boundary of the MacLeish property, and return the resulting
sf::sf()
object.
Intersect a spatial layer with the MacLeish boundary layer
Source
https://www.mass.gov/info-details/massgis-data-layers
Examples
## Not run:
# have to download the shapefiles...could take a while...
elevation <- mass_gis()
macleish_elevation <- macleish_intersect(elevation)
if (require(sf)) {
plot(macleish_elevation)
}
dcr_trails <- mass_gis("dcrtrails")
## End(Not run)
Retrieve images from Phenocam
Description
Phenocam contains over 70,000 images taken from MacLeish. Photos have been taken every 30 minutes since February 2017.
Usage
phenocam_image_url(when = NULL, ...)
phenocam_read_day_urls(x = Sys.Date())
phenocam_read_monthly_midday_urls(x = Sys.Date())
phenocam_image_url_midday(x = Sys.Date())
phenocam_info()
phenocam_download(...)
Arguments
when |
a string to be converted into a date-time |
... |
arguments passed to |
x |
a Date |
References
https://phenocam.nau.edu/webcam/sites/macleish/
See Also
Examples
phenocam_image_url()
phenocam_image_url("2021-12-25 12:05:05")
## Not run:
phenocam_read_day_urls()
## End(Not run)
## Not run:
phenocam_read_monthly_midday_urls()
## End(Not run)
## Not run:
phenocam_image_url_midday(Sys.Date() - 3)
phenocam_image_url_midday(Sys.Date() - 365)
## End(Not run)
## Not run:
phenocam_info()
## End(Not run)
## Not run:
phenocam_download()
df <- read_phenocam(file.path(tempdir(),"macleish_DB_1000_3day.csv"))
print(str(df))
## End(Not run)
MacLeish Data Plot 1
Description
Data on change in tree diameter (in centimeters) for parasitic Hemlock Woolly Adelgid dominated areas on the Western side of MacLeish. Tree diameter was measured at 1.4 meters high above the ground.
Usage
tree_diameter1
Format
- Module
Module number that represents one of the 10 subplot modules that are 110 m and 20 x 50 m. There are five 10 x 10 modules along central 50 m axis.
- Tag
Tag numbers used to identify each tree.
- Species
Tree species include Red Maple (Acer rubrum), Sweet Birch (Betula lenta), Paper Birch (Betula papyrifera), American Beech (Fagus grandifolia), American witch-hazel (Hamamelis virginiana), Eastern White Pine (Pinus strobus), Northern Red Oak (Quercus rubra), and Eastern Hemlock (Tsuga canadensis).
- Position
Stage of growth for each individual tree. The emergent position are the tallest trees, followed by canopy, subcanopy, and finally, sapling trees, which are the smallest trees.
- Year
Data collected from 2010-2015 in the fall semesters.
- Notes
Notes collected on the wellbeing of tree species, including notes on death or poor health.
- Diameter
Tree diameter measured in centimeters and at 1.4 meters high above the ground.
- People
Data obtained from Jesse Bellemare and Smith College students from BIO364-365 courses.
See Also
MacLeish Data Plot 2
Description
Data on change in tree diameter (in centimeters) for parasitic Hemlock Woolly Adelgid dominated areas on the Western side of MacLeish. Tree diameter was measured at 1.4 meters high above the ground.
Usage
tree_diameter2
Format
- Module
Module number that represents one of the 10 subplot modules that are 110 m and 20 x 50 m. There are five 10 x 10 modules along central 50 m axis.
- Tag
Tag numbers used to identify each tree.
- Species
Tree species include Red Maple (Acer rubrum), Sweet Birch (Betula lenta), American Beech (Fagus grandifolia), Eastern White Pine (Pinus strobus), Northern Red Oak (Quercus rubra), and Eastern Hemlock (Tsuga canadensis).
- Year
Data collected from 2009-2012 in the fall semesters.
- Notes
Notes collected on the wellbeing of tree species, including notes on death or poor health.
- Diameter
Tree diameter measured in centimeters and at 1.4 meters high above the ground.
- People
Data obtained from Jesse Bellemare and Smith College students from BIO364-365 courses.
See Also
Weather data from Macleish Field Stations
Description
Weather data collected at the Macleish Field Station in Whately, MA during 2015.
Usage
whately_2015
orchard_2015
Format
For both, a data frame (dplyr::tbl_df()
) with roughly 52,560 rows and 8 or 9 variables.
The following variables are values that are found in either the whately_2015
or orchard_2015
data tables.
All variables are averaged over the 10 minute interval unless otherwise noted.
- when
Timestamp for each measurement set in Eastern Standard Time.
- temperature
average temperature, in Celsius
- wind_speed
Wind speed, in meters per second
- wind_dir
Wind direction, in degrees
- rel_humidity
How much water there is in the air, in millimeters
- pressure
Atmospheric pressure, in millibars
- rainfall
Total rainfall, in millimeters
- solar_radiation
Amount of radiation coming from the sun, in Watts/meters^2. Solar measurement for Whately
- par_density
Photosynthetically Active Radiation (sunlight between 400 and 700 nm), in average density of Watts/meters^2. One of two solar measurements for Orchard
- par_total
Photosynthetically Active Radiation (sunlight between 400 and 700 nm), in average total over measurement period of Watts/meters^2. One of two solar measurements for Orchard
An object of class tbl_df
(inherits from tbl
, data.frame
) with 52547 rows and 9 columns.
Details
The Macleish Field Station is a remote outpost owned by Smith
College and used for field research. There are two weather stations on the
premises. One is called WhatelyMet
and the other is OrchardMet
.
The WhatelyMet
station is located at (42.448470, -72.680553) and
the OrchardMet
station is at (42.449653, -72.680315).
WhatelyMet
is located at the end of Poplar Hill Road in Whately,
Massachusetts, USA. The meteorological instruments of WhatelyMet
(except the
rain gauge) are mounted at the top of a tower 25.3 m tall, well above the
surrounding forest canopy. The tower is located on a local ridge at an
elevation 250.75m above sea level.
OrchardMet
is located about 250 m north of the first tower in an open
field next to an apple orchard. Full canopy trees (~20 m tall) are within
30 m of this station. This station has a standard instrument configuration
with temperature, relative humidity, solar radiation, and barometric
pressure measured between 1.5 and 2.0 m above the ground. Wind speed and
direction are measured on a 10 m tall tower and precipitation is measured
on the ground. Ground temperature is measured at 15 and 30 cm below the
ground surface 2 m south of the tower. The tower is located 258.1 m above
sea level. Data collection at OrchardMet began on June 27th, 2014.
The variables shown above are weather data collected at WhatelyMet
and
OrchardMet
during 2015. Solar radiation is measured in two different ways:
see SlrW_Avg
or the PAR
variables for Photosynthetic Active Radiation.
Note that a loose wire resulted in erroneous temperature reading at OrchardMet in late November, 2015.
Source
These data are recorded at https://www.smith.edu/about-smith/sustainable-smith/ceeds
Examples
## Not run:
#' # loose wire anomalies
if (require(dplyr) & require(ggplot2) & require(lubridate)) {
orchard_2015 %>%
filter(month(when) == 11) %>%
ggplot(aes(x = when, y = temperature)) +
geom_line() + geom_smooth()
}
## End(Not run)