GithubHelp home page GithubHelp logo

bubastis / ocorrencias-lx Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.17 MB

Interface to https://naminharualx.cm-lisboa.pt/ using a datatable

Home Page: https://ocorrencias-lx.netlify.app

JavaScript 100.00%
datatable vanilla-javascript mapbox chartjs netlify github-actions

ocorrencias-lx's Introduction

Netlify Status occo

Na Minha Rua V2 🇵🇹

O que é?

Este site é um interface construído em javascript para a aplicação Na Minha Rua, operada pela Câmara Municipal de Lisboa, que permite a qualquer cidadão registar problemas no espaço público. Uma vez que a navegação no portal não é muito amigável, a versão V2 vai buscar as últimas 1000 ocorrências à API pública e lista-as numa data table que carrega imediatamente, mais fácil de filtrar/reordenar/pesquisar. Cada linha é clicável, abrindo uma janela modal com mais detalhes, e um marcador sobre mapa estático Mapbox. O topo da página mostra um gráfico de barras com ocorrências por freguesia, construída com o Chart.js.

Graças ao plugin Netlify "fetchmyjson" (baseado no netlify-plugin-fetch-feeds) e a uma Github Action, o website é reconstruído uma vez por hora, copiando os dados da API para um documento json interno, limitando assim os pedidos à API ao mínimo.

Próximos objectivos

  • Alteração do CSS para facilitar navegação em dispositivos móveis
  • Atalhos para filtros dentro da tabela e/ou caixa de pesquisa
  • Minimização dos pedidos à API Mapbox

Websites

O website está alojado no Netlify em:
https://ocorrencias-lx.netlify.app

Está também em desenvolvimento uma versão que apenas utiliza o Mapbox GL JS:
https://ocorrencias-lx-mapa.netlify.app

Na Minha Rua V2 🇬🇧

What is it?

This website is a interface built in javascript for the Na Minha Rua [In My Street] portal, which is operated by the Lisbon City Hall and enables citizen reporting of problems within public areas. Since the app's navigation is not very friendly, the V2 version fetches the last 1000 occurrences from the public API, and lists them in a fast-loading data table, much easier to filter/sort/search. Each line is clickable, opening a modal with more details, and a marker over a Mapbox static map. The top of the page presents a bar graph displaying occurrences by parish, built with Chart.js.

The website is hosted by Netlify at:
https://ocorrencias-lx.netlify.app

Thanks to the Netlify plugin "fetchmyjson" (based on netlify-plugin-fetch-feeds) and a Github Action, the website is rebuilt every hour, copying the API's records to an internal json document, thus limiting API queries to the very minimum.

Upcoming goals

  • CSS changes for mobile-ready navigation
  • Shortcuts to filters within the table and/or search box
  • Limiting queries to the Mapbox API

Websites

The website is hosted by Netlify at:
https://ocorrencias-lx.netlify.app

A version using only Mapbox GL JS is also being developed at:
https://ocorrencias-lx-mapa.netlify.app

ocorrencias-lx's People

Contributors

bubastis avatar

Watchers

 avatar

ocorrencias-lx's Issues

Take out name and email

Hey @bubastis I noticed that in the table and results shown in https://ocorrencias-lx.netlify.app that the name and email of the "requerentes" was appearing. That is a very sensitive matter and a big no no from GDPR. image

My suggestion would be to avoid saving these two fields coming from the API response or if you need some sort of unique ID for internal purposes, just creating one for each "requerente" and using that internally.

Map doesn't work but the API seems to

Hi, it seems like the map stopped working but the API still seems to be fetching data, though from an older date (2021). Are you still able to pull in the data from the CML's database or what could be the problem?

thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.