Skip to content

Commit

Permalink
Update site for 2022 event (#345)
Browse files Browse the repository at this point in the history
2022 update
  • Loading branch information
avdata99 committed Feb 11, 2022
1 parent 70ceb0e commit d99de90
Show file tree
Hide file tree
Showing 28 changed files with 437 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Update Data
run: |
python ./etl/2021.py
python ./etl/2022.py
git config user.name "opendataday[bot]"
git config user.email "actions@users.noreply.github.com"
git add -A
Expand Down
2 changes: 2 additions & 0 deletions Datasets/Events 2022.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
event_date,event_name,event_photo_url,event_purpose,event_report_url,event_tweet_url,event_video_url,has_event_report,latitude,longitude,num_participants,online_event_url,organisers,place,slug,url,world_region_code,world_region_text
,Test event name,,To open some test data,,,,False,33.12223443,-61.234455,24,,Test organizer,"Cordoba, Argentina",test-event-name,https://data99.com.ar,,
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,25 +73,28 @@ These will need to be resolved by editing the input spreadsheet.

There are three bits of setup we need to do each year:


- **1. Create a new import job:**
- Create `./etl/202x.py` based on a previous year's file
- Fill in `IN_URL` and `THIS_YEAR`
- Fill in `SPREADSHEET_ID`, `SHEET_ID` and `THIS_YEAR`
- Update schema as applicable if the spreadsheet has changed, but we want to keep the JSON output the same if possible as every year's events page uses the same template to render the JSON to HTML
- Replace https://github.com/okfn/opendataday/blob/d51d490fe15c9b02e33f0e8460cadadb636f83f6/.github/workflows/update-data.yml#L31 with the new job. We don't need to keep running last year's script.
- Replace the [GitHub workflow update-data.yml](/.github/workflows/update-data.yml) with the new job tu run `python ./etl/202X.py`. We don't need to keep running last year's script.
- Once we've run the job for the first time it will create a `/databags/202x.json` file. This is consumed by the events list page and the events map
- We can run `python ./etl/202x.py` locally as well as triggering it with GitHub actions
- **2. Update the map:**
- Update https://github.com/okfn/opendataday/blob/d51d490fe15c9b02e33f0e8460cadadb636f83f6/assets/js/map.js#L1 to consume the new JSON file
- Update [map.js file](/assets/js/map.js) to consume the new JSON file
- **3. Create a new events page:**
- Create `./content/events/202x/contents.lr` based on a previous year's file
- Fill in the fields
- Create a stub `./content/events/202x/contents.<lang>.lr` for each supported alternate language
- It is not necessary to manually create the `./content/events/202x/reports` dir or edit any content under it. This will be automatically generated by the import job.
- Add the new 202x events page to the menu:
- Add `/events/202x` to the list of events pages.
- Update the 'Search events' link to the current year
- Add `/events/202x` to the list of events pages ([main-nav.json](/databags/main-nav.json)).
- Update the 'Search events' link to the current year ([main-nav.json](/databags/main-nav.json)).
- Repeat for each supported alternate language

For reference, you can check the [PR for the 2022 update](https://github.com/okfn/opendataday/pull/345)

## Previous version

The previous version of the site has been moved to the [v1](https://github.com/okfn/opendataday/tree/v1) branch.
109 changes: 109 additions & 0 deletions assets/icons/okfn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/js/map.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var url = 'https://raw.githubusercontent.com/okfn/opendataday/master/databags/events-2021.json';
var url = 'https://raw.githubusercontent.com/okfn/opendataday/master/databags/events-2022.json';
mapboxgl.accessToken = 'pk.eyJ1Ijoib2tmbiIsImEiOiJjaXlrOW5yczgwMDEzMnlwaWd2ZzF6MDQ3In0.2UJlkR69zbu4-3YRJJgN5w';

var clusterRadius = 50,
Expand Down
5 changes: 2 additions & 3 deletions content/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ year_label_5: Ocean **data** for a thriving planet
---
register_text: Register your event
---
events_registered: events registered in 2021
events_registered: events registered in 2022
---
who_heading: Who is this for? Everyone!
---
Expand Down Expand Up @@ -152,8 +152,7 @@ support_scheme_heading: Support Scheme
---
support_scheme_body:

The 2021 mini-grant scheme has now closed. Read our blogpost to find out more about the organisations receiving mini-grants this year

IMPORTANT: There will be a different grant scheme this year for Open Data Day. We will not support online events happening on March 5th, 2022. Instead, we will be opening a call for grants to celebrate face to face meetings, when local conditions permit, to have months of action around Open Data. More information will be published shortly.
---
support_scheme_button: Read more
---
9 changes: 9 additions & 0 deletions content/events/2022/contents+de.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: de
---



title: 2022 Events
---
banner_heading_2: 2022 Events
---
9 changes: 9 additions & 0 deletions content/events/2022/contents+es_es.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: es_es
---



title: Events de 2002
---
banner_heading_2: Eventos de 2022
---
9 changes: 9 additions & 0 deletions content/events/2022/contents+fr.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: fr
---



title: 2022 Events
---
banner_heading_2: 2022 Events
---
9 changes: 9 additions & 0 deletions content/events/2022/contents+it.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: it
---



title: 2022 Events
---
banner_heading_2: 2022 Events
---
9 changes: 9 additions & 0 deletions content/events/2022/contents+ja.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: ja
---



title: 2022 Events
---
banner_heading_2: 2022 Events
---
9 changes: 9 additions & 0 deletions content/events/2022/contents+kr.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: kr
---



title: 2022 Events
---
banner_heading_2: 2022 Events
---
9 changes: 9 additions & 0 deletions content/events/2022/contents+ne.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: ne
---



title: 2022 Events
---
banner_heading_2: 2022 Events
---
9 changes: 9 additions & 0 deletions content/events/2022/contents+nl.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: nl
---



title: 2022 Events
---
banner_heading_2: 2022 Events
---
9 changes: 9 additions & 0 deletions content/events/2022/contents+pt_br.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: pt_br
---



title: Eventos de 2022
---
banner_heading_2: Eventos de 2022
---
9 changes: 9 additions & 0 deletions content/events/2022/contents+ru.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: ru
---



title: 2022 Events
---
banner_heading_2: 2022 Events
---
9 changes: 9 additions & 0 deletions content/events/2022/contents+th.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: th
---



title: 2022 Events
---
banner_heading_2: 2022 Events
---
9 changes: 9 additions & 0 deletions content/events/2022/contents+zh_hans.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: zh_hans
---



title: 2022 Events
---
banner_heading_2: 2022 Events
---
9 changes: 9 additions & 0 deletions content/events/2022/contents+zh_tw.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: zh_tw
---



title: 2022 Events
---
banner_heading_2: 2022 Events
---
17 changes: 17 additions & 0 deletions content/events/2022/contents.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
_model: events_list
---
_template: events_list.html
---
data_file: events-2022
---
banner_link: main
---
csv_link: https://raw.githubusercontent.com/okfn/opendataday/master/Datasets/Events%202022.csv
---



title: 2022 Events
---
banner_heading_2: 2022 Events
---
24 changes: 24 additions & 0 deletions databags/events-2022.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"events": [
{
"event_date": null,
"event_name": "Test event name",
"event_photo_url": "",
"event_purpose": "To open some test data",
"event_report_url": "",
"event_tweet_url": "",
"event_video_url": "",
"has_event_report": false,
"latitude": 33.12223443,
"longitude": -61.234455,
"num_participants": "24",
"online_event_url": "",
"organisers": "Test organizer",
"place": "Cordoba, Argentina",
"slug": "test-event-name",
"url": "https://data99.com.ar",
"world_region_code": "",
"world_region_text": ""
}
]
}
Loading

0 comments on commit d99de90

Please sign in to comment.