-
Notifications
You must be signed in to change notification settings - Fork 0
/
unit-testing.R
31 lines (26 loc) · 994 Bytes
/
unit-testing.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## Set repo working directory
repo <- "/Users/adam/Documents/Data Projects/Personal/Newport-News-Open-Police-Data"
setwd(repo)
## Dependencies
source("./daily-accident-report.R")
source("./daily-arrest-report.R")
source("./daily-juvenile-report.R")
source("./daily-offenses-report.R")
source("./daily-field-contacts-report.R")
source("./daily-theft-from-vehicle-report.R")
source("./daily-collection.R")
source("./cloud-storage-sync.R")
source("./plot-reports.R")
## Test individual report collection; each returns a data frame
dailyAccidents <- getDailyAccidentReport(repo)
dailyArrests <- getDailyArrestReport(repo)
dailyJuvenile <- getDailyJuvenileReport(repo)
dailyOffenses <- getDailyOffensesReport(repo)
dailyFieldContacts <- getDailyFieldContactsReport(repo)
dailyTheftFromVehicle <- getDailyTheftFromVehicleReport(repo)
## Test daily report collection
runDailyCollection(repo)
## Test public data set sync
runCloudStorageSync(repo)
## Test Leaflet plot generation
plotReports(repo)