-
-
Notifications
You must be signed in to change notification settings - Fork 1
Sectors
The sections below outline how a new sector should be added to the project.
Adding a new sector consists in two steps:
To add the new sector data open the zone's txt
(it is located at /data/zones/ZONE_NAME
) file and search for the field "sectors"
.
"sectors": [
],
Then, add a new element to the sector's list that has the following structure:
{
"name":"",
"sector_data":"",
"link":""
}
And fill in the fields. The expected data for each field is:
-
name
:- Type: string
- Description: Name of the sector. This is the name that will be shown for the sector.
-
sector_data
: Optional- Type: string
- Description: path tho the sector's geographical info.
-
link
:- Type: string
- Description: Full link to YouTube's sector playlist. It looks something like:
https://www.youtube.com/playlist?list=PLAYLIST_ID
Note: This step is not mandatory. It is not required for a sector to have geographical area. However, if not included, the sector will not be shown in the zone's map.
Data structure that represents a GeoJSON with the area the sector covers. You can use geojson.io to draw the area and copy its output to this file. Just make sure that the properties are the same as the ones shown below.
The general structure, which can be used as a template, is shown below:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"stroke": "#1f1a95",
"stroke-opacity": 1,
"stroke-width": 2
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
0,
0
]
]
]
}
}
]
}
Finally, to update the zone's page the sector is part of:
- Run
$ python generate_templates.py
to update the maps with the new sector data. - Run
$ python generate_pages.py
to update the zone's page sector data. - Create a PR for the new/updated data to be added.