Skip to content

Commit

Permalink
docs: improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadrien Froger committed Oct 29, 2024
1 parent 5f79b12 commit 0146399
Show file tree
Hide file tree
Showing 48 changed files with 397 additions and 45 deletions.
4 changes: 2 additions & 2 deletions lib/decidim/geo/proposal/proposal_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ def filter_past(query)

def filter_active(query)
query.where(
"resource_type = ? AND (resource_status IN ('not_answered', 'evaluating') OR resource_status IS NULL) AND (end_date > ? OR end_date IS NULL)",
"resource_type = ? AND (resource_status IN ('not_answered', 'evaluating', 'accepted') OR resource_status IS NULL) AND (end_date > ? OR end_date IS NULL)",
manifest_name,
15.days.ago.to_date
)
end

def filter_future(query)
query.where(
"resource_type = ? AND (resource_status IN ('not_answered', 'evaluating') OR resource_status IS NULL) AND (start_date > ? OR start_date IS NULL)",
"resource_type = ? AND (resource_status IN ('not_answered', 'evaluating', 'accepted') OR resource_status IS NULL) AND (start_date > ? OR start_date IS NULL)",
manifest_name,
15.days.ago.to_date
)
Expand Down
9 changes: 9 additions & 0 deletions website/docs/contribute/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"label": "Contribute!",
"position": 5,
"link": {
"type": "generated-index",
"description": "How can you contribute to Decidim Geo"
}
}

3 changes: 3 additions & 0 deletions website/docs/contribute/translations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
sidebar_position: 5
---
9 changes: 9 additions & 0 deletions website/docs/dev-documentation/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"label": "For Developpers",
"position": 3,
"link": {
"type": "generated-index",
"description": "How to install Decidim"
}
}

3 changes: 3 additions & 0 deletions website/docs/dev-documentation/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
sidebar_position: 5
---
21 changes: 17 additions & 4 deletions website/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
---
sidebar_position: 1
id: my-home-doc
id: introduction
slug: /
---

# Decidim Geo
# Participation on the map

This project starts from a simple idea: if we display all a decidim platform participation on a map, participants will find easier how to participate locally. For platform that tries to enable small, local participation that would be essentials, and from a systemic perspective, this will allow us to zoom-in and zoom-out in a simple way to test and valorize participatory experiments. Here the [first presentation (french)](/decidim-geo-presentation-0.pdf) we did for the city of Lausanne, that kicks the project in!
Decidim Geo module add interactive maps with great mobile experience to your platform.

## Decidim Geo enable participants to discover participation in a map.
## Features

- Import custom shapefiles and link them to scopes
- Filter by type, time, scopes and spaces
- Make active participation easy to browse
- Make surrounding activities discoverable
- Configure custom map tiles
- Mobile-First UI.

## Used & Supported by pionneers

![City of Lausanne and Zürich supports development of Decidim Geo](/partners.png)

## Events
- **setember 2022** Ancrer la participation citoyenne sur le territoire. Geneva, Lausanne. [[Slides | FR](/decidim-geo-presentation-0.pdf)]
- **october 2024** Explore local participation with Decidim Geo, Barcelona, DecidimFest 2024. [[Slides | EN](/explore-local-participation-decidim-fest-2024.pdf)]
8 changes: 0 additions & 8 deletions website/docs/tutorial-basics/_category_.json

This file was deleted.

31 changes: 0 additions & 31 deletions website/docs/tutorial-basics/deploy-your-site.md

This file was deleted.

8 changes: 8 additions & 0 deletions website/docs/user-documentation/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "For Admins",
"position": 2,
"link": {
"type": "generated-index",
"description": "How to use Decidim Geo in your Decidim"
}
}
23 changes: 23 additions & 0 deletions website/docs/user-documentation/automatic-scopes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
sidebar_position: 20
title: Automatic Scopes
description: Magically assign points to a scope
---

# Automatic Scopes
A recurrent task can assign auto-magically points to a region. This allows you to ask one thing less for the participant, and still map correctly the information.

## What it does?

Following the following rules, an automatic check will bind a resource to a shape.

- If the space (assembly, process) does not have scope enabled
- If the component does not have any scope enabled
- Then: All meetings, debates, accountability results, proposals that have a geolocation will be mapped automatically to a scope.


### Use case: Participatory Budget

On a proposal phase for a participatory budget, you can active geolocated proposals.
Once participant propose, they will be able to map an address.
After a while beeing published, an external process will check if this point is inside one of your scopes, and will assign it.
46 changes: 46 additions & 0 deletions website/docs/user-documentation/configure-shapefiles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
sidebar_position: 2
title: Configure Shapes
description: Upload, configure and define shapes in decidim geo
---

# Scope with a geografical area

Decidim-Geo allows you to upload a shapefile, file that contains many shapes.
After the upload, you can assign each shape to a decidim scope, creating a transversal nagivation for your whole platform.



:::info
Configuring shapefiles and attribute shapes to scopes are optional.
If you never used Decidim Scopes before, you can safly skip this page.
:::


# Prerequisite
Your shapefile needs to fullfill the following constraints:

- Shapes needs to have a `NAME` metadata. This name will be the label to use in your admin side.
- The shapefile is a zip file containing nothing else but shape files data. No .DS_Store or other distribution specific files are supported
- The shapes needs to be exported in WSG-84 projection.

# Upload the zip file
To upload the zipfile, go in you administration dashboard and click on the "Geo" icon.
![Click on the Geo in the lateral menu to configure Decidim geo](./upload-shapefile/screenshot-01.png)

On the lateral Menu, click on the Shapefile tab, and upload your zipfile.
The upload may be loading for a while, to save all the shapes in the database, so please be patient.

![Click on the Geo in the lateral menu to configure Decidim geo](./upload-shapefile/screenshot-02.png)

## Link Shapefile to a scope type
Once uploaded, you can link a shapefile to a scope type. Once done, all scopes of the scopetypes will be geo-compatible.

![Click on the Geo in the lateral menu to configure Decidim geo](./upload-shapefile/screenshot-03.png)


## Link the scopes to the Shapedata
Once you have specified a geo-friendly scope type, all the scopes associates will have a field named "Shape Data".
This allows you to select for each scope the matching scope data.

![Click on the Geo in the lateral menu to configure Decidim geo](./upload-shapefile/screenshot-04.png)
37 changes: 37 additions & 0 deletions website/docs/user-documentation/customize-map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
sidebar_position: 8
title: Customize Map
description: Use Maptiler Vector Tiles in Decidim Geo
---

# Customize Map tiles
:::info
A tiled web map, slippy map or tile map, is a map displayed in a web browser by semlessly joining
dozens of individually requestd image or vector data files. It is the most popular way to display and navigate maps.
:::

Decidim Geo supports png tiles, and MapTiler vector data files. This enables you to change the aspect of the map, to use a country-specific style, or a specific view (like plans/satellites).
Tiles are a very important options, and should be picked up with some considerations:

- **Who is distributing the map**: If the tiles come from google maps, you need to know that Google will be able to trace your user activity
- **What are the use constraint**: In some cases (like openstreet map), you will have a limit in number of download per day. You need to know what is this limit
- **What is the tile project**: We will use exclusivly WSG-84 map projection, be sure the tiles you will use are in this same projection.

**Services distributing tiles**<br />
You will find here some services that distributes tiles in png:

- Here Platform
- CartoCDN
- Open Street Map

## Using a vector tiles
For now, we support only the vector tiles from MapTiler.
To use map tiler, you can create a new custom map in MapTiler, and once saved, use it's API Key and Style id to save the map styler integration.

![Add a MapTiler configuration](./customize-map/screenshot-01.png)


:::info
We might change the internal library (leaflet) to have a native support on vector tiles (Map Liber).
But this is unplanned for now.
:::
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions website/docs/user-documentation/customize-space-pages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
sidebar_position: 3
title: Customize space pages
description: Customize processes pages or assemblies
---

# Customize Space pages (Assemblies, Processes)
To have a broader perspective when you access to the main assemblies or processes pages, you can configure Decidim Geo to display on spaces on the map.

- Display only assemblies in Assemblies: on the assemblies main page, display in Decidim Geo only the assemblies
- Display only processes in Processes: on the processes main page, display in Decidim Geo only the processes

To define this option, check the options in the Decidim Geo configuration page from the admin dashboard.
![Admin panel options](./customize-space-pages/screenshot-01.png)

**When active, the _type_ filter won't appear in Decidim Geo**<br />
If you activate this option, the filter for type won't show up, as these maps will display only the assembly or process type.
![Filter option on Decidim Geo front end](./customize-space-pages/screenshot-02.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions website/docs/user-documentation/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
sidebar_position: 100
title: Frequently Asked Questions
description: FAQ for decidim geo
---

**My assembly is private, can I see points in Decidim-Geo?**<br />
For now, we support only points that are visible publically. So if your assembly is private and transparent, the points will be displayed.
Else it won't have any maps.

**I have installed Decidim Geo, but I can not see maps in my process**<br />
Decidim Geo will hide empty maps, so if no points are available in your space, maps won't be displayed.

**I have some accountability results from a process last year, will it be displayed in active filter?**<br />
Yes, they will be active as soon as they don't have a end_date.
7 changes: 7 additions & 0 deletions website/docs/user-documentation/geo-filter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 11
title: View Filter
description: Behaviour of the view filter
---

# View filter
18 changes: 18 additions & 0 deletions website/docs/user-documentation/hide-points-from-maps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
sidebar_position: 5
title: Hide points
description: Customize visibility of points
---

# Hide points from map

**Use case**<br />
When you use proposals to gather data from citizen, you will have many points that are not necessarly related to participation.
When this is the case, you want to restrict the displaying of these points to only the space where they are.
For exemple, if you have a proposals in "Data Gathering Ideas", these proposals would be displayed only in the context of this Assembly, and won't see it in any other places, like the home page.

## Configure

In component configuration of the geo-friendly components, you can hide geolocated points outside this space (assembly/process).
![Configure a component to avoid these points to be seen in other spaces](./hide-points-from-maps/screenshot-01.png)

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions website/docs/user-documentation/localised-spaces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
sidebar_position: 7
title: Assemblies/Processes on the map
description: How to put assemblies and processes on the map
---

# Work only with points in the map
By default, Decidim Geo takes all the points, even they are not geolocated. This enable participants to discover broader participation, for example processes that effect all the spaces.

In some cases, you will like to use Decidim Geo to strictly uses points on the map. Hopefully, we have an option for that in the administration.

![Configure Decidim Geo to display only points in the map](./localised-spaces/screenshot-01.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0146399

Please sign in to comment.