Skip to content

Commit

Permalink
Adds harveste ui
Browse files Browse the repository at this point in the history
  • Loading branch information
acouch committed Apr 19, 2019
1 parent 77ea264 commit e10babd
Show file tree
Hide file tree
Showing 54 changed files with 24,371 additions and 65 deletions.
25 changes: 13 additions & 12 deletions api/analytics.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"thisWeek": [
175,
428,
26
205,
471,
472,
209
],
"lastWeek": [
227,
370,
453,
500,
373,
370,
193
192,
543,
475,
776,
496,
375,
185
],
"thisYear": [
9602,
8037,
3111
8338
],
"lastYear": [
4118,
Expand All @@ -33,6 +34,6 @@
5737
],
"allTime": [
529067
618683
]
}
26 changes: 26 additions & 0 deletions api/harvest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"sourceId": "dkandemo",
"source": {
"type": "DataJson",
"uri": "http:\/\/demo.getdkan.com\/data.json"
},
"transforms": [
{
"Filter": {
"keyword": "environment"
}
}, {
"Override": {
"publisher.name": "DKAN Demo"
}
},
"DataJsonToDkan"
],
"load": {
"migrate": false,
"collectionsToUpdate": ["dataset", "organization", "license", "theme", "keyword"],
"type": "Dkan8"
}
}
]
24 changes: 13 additions & 11 deletions misc/ga-analytics-generate/analytics.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
{
"thisWeek": [
175,
21
205,
471,
472,
209
],
"lastWeek": [
227,
370,
453,
500,
373,
370,
193
192,
543,
475,
776,
496,
375,
185
],
"thisYear": [
9602,
8037,
2745
8338
],
"lastYear": [
4118,
Expand All @@ -32,6 +34,6 @@
5737
],
"allTime": [
529067
618683
]
}
12 changes: 6 additions & 6 deletions misc/ga-analytics-generate/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ const lastWeek = query({
const thisYear = query({
viewId,
"dateRanges": [{
'startDate': moment(now).date(1).month(0).format('YYYY-MM-DD'),
'endDate': moment(now).format('YYYY-MM-DD')
'startDate': moment(now).date(1).month(0).format('YYYY-MM-DD'),
'endDate': moment(now).format('YYYY-MM-DD')
}],
"dimensions": [
{
Expand All @@ -82,8 +82,8 @@ const thisYear = query({
const lastYear = query({
viewId,
"dateRanges": [{
'startDate': moment(now).subtract(1, 'year').date(1).month(0).format('YYYY-MM-DD'),
'endDate': moment(now).date(1).month(0).subtract(1, 'day').format('YYYY-MM-DD')
'startDate': moment(now).subtract(1, 'year').date(1).month(0).format('YYYY-MM-DD'),
'endDate': moment(now).date(1).month(0).subtract(1, 'day').format('YYYY-MM-DD')
}],
"dimensions": [
{
Expand All @@ -101,8 +101,8 @@ const today = moment(now).date(1).format('YYYY-MM-DD');
const allTime = query({
viewId,
"dateRanges": [{
'startDate': "2012-01-01",
'endDate': today
'startDate': "2012-01-01",
'endDate': today
}],
"metrics":[{
"expression":"ga:pageViews"
Expand Down
File renamed without changes.
Loading

0 comments on commit e10babd

Please sign in to comment.