This site uses cookies. By continuing to browse the site, you agree to our use of cookies. Find out more about cookies.
Skip to main content
Metadecidim's official logo
  • English Triar la llengua Elegir el idioma Choose language
    • Català
    • Castellano
Sign Up Sign In
  • Home
  • Processes
  • Assemblies
  • Initiatives
  • Consultations
  • Conferences
  • Help

Propose new functionalities for Decidim software

#DecidimRoadmap Designing Decidim together

Phase 1 of 1
Open 2019-01-01 - 2030-12-31
Process phases Submit a proposal
  • The process
  • Debates
  • Propose new features
  • News
chevron-left Back to list

Add location data to proposals export and import

Avatar: Pierre Mesure Pierre Mesure verified-badge
12/12/2021 18:51  
Finished

Is your feature request related to a problem? Please describe.

Decidim already allows the export (PR (External link) (External link)) and (re)import (link (External link) (External link)) of proposals as CSV, JSON and Excel.

However, geographical metadata is left out from both these actions. This is something that @Pops was already saying on Github (External link) (External link) a year ago regarding the export and it doesn't seem it was fixed.

Describe the solution you'd like

When exporting proposals, both the address and the coordinates (latitude, longitude) should be included.

In the JSON export, the format could be the same as the API (see example (External link) (External link)), with an address string field and and a coordinates object containing two number fields (latitude and longitude).

When exporting to a table (CSV or Excel), the columns could be named simply address, latitude and longitude.

When importing, the exact same fields should be read so it is easy to reimport an exported file.

Describe alternatives you've considered

To make it consistent with the other fields, the columns of the table files could be named address, coordinates/latitude and coordinates/longitude.

Could this issue impact on users private data?

No.

Funded by
Funding available, I've already implemented most of the import and the export doesn't seem much harder. I might need some help with the tests.

  • Filter results for category: Proposals Proposals

The development of this proposal has finished

  • Reviewed by @product and accepted in the main project
  • It is funded by Digidem Lab
  • Developed by Digidem Lab 
  • Available in release 0.26 via #8679

List of Endorsements

Avatar: Pierre Mesure Pierre Mesure verified-badge
Avatar: Pauline Bessoles Pauline Bessoles verified-badge
Avatar: Lucien Langton Lucien Langton
Endorsements count3
Add location data to proposals export and import Comments 4

Reference: MDC-PROP-2021-12-16871
Version number 2 (of 2) see other versions
Check fingerprint

Fingerprint

The piece of text below is a shortened, hashed representation of this content. It's useful to ensure the content hasn't been tampered with, as a single modification would result in a totally different value.

Value: 139f187be91bdc53f6b93eb05823df3a22ea72b2b3e037f17f75cfee361c75a7

Source: {"body":{"en":"<p><strong>Is your feature request related to a problem? Please describe.</strong></p><p>Decidim already allows the export (<a href=\"https://github.com/decidim/decidim/issues/1223\" rel=\"noopener noreferrer\" target=\"_blank\" class=\"external-link-container\">PR&nbsp;(External link)&nbsp;(External link)</a>) and (re)import (<a href=\"https://meta.decidim.org/processes/roadmap/f/122/proposals/14939?filter%5Bactivity%5D=all&amp;filter%5Bcategory_id%5D%5B%5D=&amp;filter%5Borigin%5D%5B%5D=&amp;filter%5Brelated_to%5D=&amp;filter%5Bscope_id%5D%5B%5D=&amp;filter%5Bsearch_text%5D=import&amp;filter%5Bstate%5D%5B%5D=&amp;filter%5Bstate%5D%5B%5D=accepted&amp;filter%5Bstate%5D%5B%5D=evaluating&amp;filter%5Bstate%5D%5B%5D=state_not_published&amp;order=random\" rel=\"noopener noreferrer\" target=\"_blank\" class=\"external-link-container\">link&nbsp;(External link)&nbsp;(External link)</a>) of proposals as CSV, JSON and Excel.</p><p>However, geographical metadata is left out from both these actions. This is something that @Pops was already saying on <a href=\"https://github.com/decidim/decidim/issues/7062\" rel=\"noopener noreferrer\" target=\"_blank\" class=\"external-link-container\">Github&nbsp;(External link)&nbsp;(External link)</a> a year ago regarding the export and it doesn't seem it was fixed.</p><p><strong>Describe the solution you'd like</strong></p><p>When exporting proposals, both the address and the coordinates (latitude, longitude) should be included.<br><br>In the JSON export, the format could be the same as the API (see <a href=\"https://www.decidim.barcelona/api/graphiql?query=%7B%0A%20%20component(id%3A%203256)%20%7B%0A%20%20%20%20id%2C%0A%20%20%20%20...%20on%20Proposals%20%7B%0A%20%20%20%20%20%20proposal(id%3A%2024417)%20%7B%0A%20%20%20%20%20%20%20%20id%2C%0A%20%20%20%20%20%20%20%20title%20%7B%0A%20%20%20%20%20%20%20%20%20%20translation(locale%3A%20%22ca%22)%2C%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20address%2C%0A%20%20%20%20%20%20%20%20coordinates%20%7B%0A%20%20%20%20%20%20%20%20%20%20latitude%2C%0A%20%20%20%20%20%20%20%20%20%20longitude%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%20%0A%20%20%7D%0A%7D%0A%0A\" rel=\"noopener noreferrer\" target=\"_blank\" class=\"external-link-container\">example&nbsp;(External link)&nbsp;(External link)</a>), with an <strong><em>address</em></strong> string field and and a <strong><em>coordinates</em></strong> object containing two number fields (<strong><em>latitude</em></strong> and <strong><em>longitude</em></strong>).<br></p><p>When exporting to a table (CSV or Excel), the columns could be named simply <strong><em>address</em></strong>, <strong><em>latitude </em></strong>and <strong><em>longitude</em></strong>.</p><p>When importing, the exact same fields should be read so it is easy to reimport an exported file.</p><p><strong>Describe alternatives you've considered</strong><br></p><p>To make it consistent with the other fields, the columns of the table files could be named <strong><em>address</em></strong>, <strong><em>coordinates/latitude</em></strong> and <strong><em>coordinates/longitude</em></strong>.</p><p><strong>Could this issue impact on users private data?</strong></p><p>No.</p><p><strong>Funded by</strong><br>Funding available, I've already implemented most of the import and the export doesn't seem much harder. I might need some help with the tests.</p>"},"title":{"en":"Add location data to proposals export and import"}}

This fingerprint is calculated using a SHA256 hashing algorithm. In order to replicate it yourself, you can use an MD5 calculator online and copy-paste the source data.

Share:

link-intact Share link

Share link:

Please paste this code in your page:

<script src="https://meta.decidim.org/processes/roadmap/f/122/proposals/16871/embed.js"></script>
<noscript><iframe src="https://meta.decidim.org/processes/roadmap/f/122/proposals/16871/embed.html" frameborder="0" scrolling="vertical"></iframe></noscript>

Related images

Capture d’écran 2021-12-12 à 18.51.38.png

Report inappropriate content

Is this content inappropriate?

Reason

4 comments

Order by:
  • Older
    • Best rated
    • Recent
    • Older
    • Most discussed
Conversation with Pierre Mesure
Avatar: Pierre Mesure Pierre Mesure verified-badge
12/12/2021 18:52
  • Get link Get link

@Pops, you might like this!

Avatar: Pauline Bessoles Pauline Bessoles verified-badge
13/12/2021 11:02
  • Get link Get link

I like it indeed! 😁 Maybe we should also think about adding this information in the open data export ?

Avatar: Pierre Mesure Pierre Mesure verified-badge
12/12/2021 20:18
  • Get link Get link

PR here: https://github.com/decidim/decidim/pull/8604

Avatar: Pierre Mesure Pierre Mesure verified-badge
10/01/2022 23:29
  • Get link Get link

@carol, this is done, see PR#8679 on Github. https://github.com/decidim/decidim/pull/8679

Add your comment

Sign in with your account or sign up to add your comment.

Loading comments ...

  • Terms and conditions of use
  • About the community
  • Download Open Data files
  • Metadecidim at Twitter Twitter
  • Metadecidim at Instagram Instagram
  • Metadecidim at YouTube YouTube
  • Metadecidim at GitHub GitHub
Creative Commons License Website made with free software.
Decidim Logo

Confirm

OK Cancel

Please sign in

decidim Sign in with Decidim
Or

Sign up

Forgot your password?