Skip to content

qgis/qgis-feed

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

🌐 QGIS Home Page News Feed DPG Badge

Home Page

πŸ‘‹ Welcome to the QGIS Home Page News Feed!

This repository hosts the source code for the website that manages and serves news for the QGIS welcome page and the QGIS Analytics Dashboard:

Here you'll find everything you need to build, develop, and contribute to these sites.

⚠️ Note on Other QGIS Websites

This repository is only for the QGIS Home Page News Feed (feed.qgis.org) and the QGIS Analytics Dashboard (https://analytics.qgis.org).

If you are looking for the source code or want to contribute to other QGIS websites, please visit their respective repositories below. Each website has its own codebase and contribution process:

-----------------------------------------------------

πŸ“– Table of Contents

Table of Contents
  1. πŸš€ Project Overview
  2. πŸ“Š QGIS Analytics Dashboard
  3. πŸš₯ QA Status
  4. πŸ“– User Guide
  5. πŸ“œ License
  6. πŸ“‚ Folder Structure
  7. πŸ€– Using 'AI' (Large Language Models)
  8. πŸ› οΈ Tech Stack
  9. πŸ—„οΈ Data Model
  10. 🧊 Using the Nix Shell
  11. ✨ Contributing
  12. πŸ™‹ Have Questions?
  13. πŸ§‘β€πŸ’»πŸ‘©β€πŸ’» Contributors

-----------------------------------------------------

πŸš€ Project Overview

Overview

-----------------------------------------------------

πŸ“Š QGIS Analytics Dashboard

🌐 Analytics Dashboard overview

The QGIS Analytics Dashboard is a web-based interface that provides insights into QGIS usage statistics, including active versions and platform distribution. It is powered by Metabase and is available at https://analytics.qgis.org. The dashboard visualizes aggregated, anonymized data collected from QGIS clients, helping the community and developers understand trends and adoption across regions and platforms.

Analytics Dashboard

πŸ“Š How QGIS Analytics Data is Collected and Processed

How Tables Are Aggregated

When a user opens QGIS, their application sends a request to https://feed.qgis.org. The server processes each request and extracts only three key pieces of information:

  1. Date (rounded to the nearest day)
  2. QGIS Version (the version code of the software)
  3. Country (determined from the IP address, but the IP itself is not stored)
  4. Operating System (platform string)

This information is then aggregated hourly into three separate tables:

  • Daily Country Table:

    • Columns: date, country ISO code, number of hits
    • Example: 2024-06-10, DE, 1200
  • Daily QGIS Version Table:

    • Columns: date, QGIS version, number of hits
    • Example: 2024-06-10, 3.34.0, 800
  • Daily Platform Table:

    • Columns: date, OS platform, number of hits
    • Example: 2024-06-10, Windows, 900

Each table records the count of requests (hits) for each unique value per day.

How User Data Is Anonymized
  • No IP Addresses Stored: The server uses the IP address only to determine the country. The IP is immediately discarded and never stored.

  • No Persistent Identifiers: No user IDs, device IDs, or other persistent identifiers are collected or stored.

  • Aggregation: Data is stored only as counts per day, per country/version/platform. There is no way to trace data back to an individual user.

  • Rate Limiting:

    • Only one hit per IP per hour is counted.
    • Only one opening per day is recorded per user (even if they open/close QGIS multiple times).
Summary Table Example
Date Country QGIS Version Platform Hits
2024-06-10 DE 3.34.0 Windows 120
Privacy Measures
  • No personal or device information is stored.
  • No sharing with third parties.
  • Data is only used in aggregate for analytics.
Gotchas
  • Users behind NAT or managed networks may be undercounted.
  • Users who disable the news feed are not counted.
  • Only one hit per IP per hour/day, so heavy users are not overrepresented.

-----------------------------------------------------

πŸš₯ QA Status

πŸͺͺ Badges

Badge Description
Lint and Django Unit Tests Lint and Django Unit Tests
Build and Push Docker Image to DockerHub Build and Push Docker Image to DockerHub
Website Status Website availability status
License Repository license
Open issues count
Closed issues count
Open pull requests count
Closed pull requests count

⭐️ Project Stars

Stars

-----------------------------------------------------

πŸ“– User Guide

Home page

A home page that displays feeds as they are rendered in QGIS is now available at the root of the web server /. Feeds are filterable using the filter widget on the left side. You can directly pass the filter parameters in the url according to the section Available parameters for filters in Endpoint and accepted parameters

Note: When calling the root url from QGIS, the response data is in JSON format. See the section Response data for QGIS in the Endpoint and accepted parameters

Control panel and permissions

Users with staff flag can enter the control panel at /admin and add feed entries, by default entries are not published.

Users with superadmin flag will be notified by email when an entry is added to the feed and will be able to publish the entry.

Appart from superadmin, only users with the permission qgisfeed | Can publish QGIS feed can publish the entry. Like the group qgisfeedentry_authors, the group qgisfeedentry_approver with the permission qgisfeed | Can publish QGIS feed are created when a Save signal from the User model is detected.

For content field, a hard limit on the number of characters allowed is configurable in administration page (Character limit configurations). If not set, max characters value for this field is 500. If you want to add a custom max characters for this field, the field name value should be content.

Manage feeds page

Note: The permissions for this page are the same as described in the Control Panel and permissions.

After logging in with the login screen at /accounts/login/ (can be also accessed from the Login button on the Homepage), users are provided with tools to manage feed items:

  • A list of feed items, sortable and filterable by title, date published, author, language, need review
  • A button to create a new feed item - clicking will take you to a blank feed item form (See Feed item form below)
  • Clicking on an item on the list will take you to a feed item form (See Feed item form below)
Feed item form

The feed item form page is displayed when clicking the New entry item button or an item on the list:

  • The feed item form is displayed on the left with all the widgets needed to edit the entry. On the right, a preview of the entry as it will be rendered in QGIS. Any edits made in the form shall immediately update the preview.
  • In the content widget only the following html tags are allowed: p, strong, italics. A hard limit on the number of characters allowed is configurable in administration page in the model Character limit configurations (default is 500).
  • Once a feed item is created or modified, there will be a review step where the user is asked to confirm that they have checked everything carefully.
  • The form is placed in the column Need review in the list before final submission.
  • The form must be approved by someone the permission qgisfeed | Can publish QGIS feed before it is published.
Endpoint and accepted parameters

Response data for QGIS

The application has a single endpoint available at the web server root / the reponse is in JSON format.

Example call: http://localhost:8000/

Returned data:

[
  {
    "pk": 1,
    "title": "QGIS acquired by ESRI",
    "image": "http://localhost:8000/media/feedimages/image.png",
    "content": "<p>QGIS is finally part of the ESRI ecosystem, it has been rebranded as CrashGIS to better integrate with ESRI products line.</p>",
    "url": "https://www.qgis.com",
    "sticky": true,
    "publish_from": 1557419128
  },
  {
    "pk": 2,
    "title": "Null Island QGIS Meeting",
    "image": "",
    "content": "<p>Let's dive in the ocean together!</p>",
    "url": null,
    "sticky": false,
    "publish_from": 1557419128
  },
  {
    "pk": 3,
    "title": "QGIS Italian Meeting",
    "image": "",
    "content": "<p>Ciao from Italy!</p>",
    "url": null,
    "sticky": false,
    "publish_from": 1557419128
  }
]

Available parameters for filters

The following parameters can be passed by the client to filter available records.

Parameters are validated and in case they are not valid a Bad Request HTTP error code 400 is returned.

after

When after is passed, only the records that have been published after the given value will be returned.

Accepted values: unix timestamp (UTC)

Example call: http://localhost:8000/?after=1557419013

lang

When lang is passed, the records that have a different lang will be excluded from the results. Only the records with null lang and the records with a matching lang will be returned.

Accepted values: ISO-939-1 two letters language code

Example call: http://localhost:8000/?lang=de

lat lon (location)

When lat and lon are passed, the records that have a location filter set will be returned only if the point defined by lat and lon is within record's location.

Accepted values: ESPG:4326 latitude and longitude

Example call: http://localhost:8000/?lat=44.5&lon=9.23

-----------------------------------------------------

πŸ“œ License

This project is licensed under the GPL-2.0 License. See the COPYING file for details.

-----------------------------------------------------

πŸ“‚ Folder Structure

qgis-feed/
β”œβ”€β”€ πŸ›‘οΈ config/                          # Nginx configuration files
β”œβ”€β”€ πŸ–ΌοΈ img/                             # Images and media assets for this README
β”œβ”€β”€ 🐍 qgisfeedproject/                 # Main Django project source code
β”œβ”€β”€ πŸ› οΈ scripts/                         # Utility and deployment scripts (eg. renew_ssl.sh)
β”œβ”€β”€ πŸ“œ  COPYING                         # Project license (GPL-2.0)
β”œβ”€β”€ 🐳 docker-compose-production-ssl.yml # Docker Compose config for production with SSL
β”œβ”€β”€ 🐳 docker-compose-production.yml    # Docker Compose config for production
β”œβ”€β”€ πŸ§ͺ docker-compose-testing.yml       # Docker Compose config for testing
β”œβ”€β”€ πŸ› οΈ docker-compose.dev.yml           # Docker Compose config for development
β”œβ”€β”€ 🐳 Dockerfile                       # Main Docker build instructions
β”œβ”€β”€ 🐳 Dockerfile.nginx.production      # Dockerfile for Nginx in production
β”œβ”€β”€ 🐳 Dockerfile.production            # Dockerfile for production app container
β”œβ”€β”€ πŸ§ͺ Dockerfile.testing               # Dockerfile for testing environment
β”œβ”€β”€ 🏁 entrypoint_production.sh         # Entrypoint script for production container
β”œβ”€β”€ 🏁 entrypoint_testing.sh            # Entrypoint script for testing container
β”œβ”€β”€ πŸ“ env.template                     # Example environment variables file
β”œβ”€β”€ πŸ“– MAKE_COMMANDS.md                 # Documentation for Makefile commands
β”œβ”€β”€ πŸ› οΈ Makefile                         # Common development and deployment commands
β”œβ”€β”€ πŸ“¦ package.json                     # Node.js dependencies and scripts
β”œβ”€β”€ πŸ“– README.md                        # Project documentation
β”œβ”€β”€ πŸ“„ REQUIREMENTS.txt                 # Python dependencies for development
β”œβ”€β”€ πŸ“„ REQUIREMENTS_PRODUCTION.txt      # Python dependencies for production
β”œβ”€β”€ βš™οΈ settings_docker_production.py    # Django settings for Docker production
β”œβ”€β”€ βš™οΈ settings_docker_testing.py       # Django settings for Docker testing
β”œβ”€β”€ ❄️ shell.nix                        # Nix shell environment for development
β”œβ”€β”€ πŸ’» vscode.sh                        # VSCode helper script for Nix shell environment
β”œβ”€β”€ πŸ“ list-vscode-extensions.sh        # Script to list VSCode extensions for Nix shell environment
β”œβ”€β”€ βš™οΈ webpack.config.js                # Webpack configuration

-----------------------------------------------------

πŸ€– Using 'AI' (Large Language Models)

We are fine with using LLM's and Generative Machine Learning to act as general assistants, but the following three guidelines should be followed:

  1. Repeatability: Although we understand that repeatability is not possible generally, whenever you are verbatim using LLM or Generative Machine Learning outputs in this project, you must also provide the prompt that you used to generate the resource.
  2. Declaration: Sharing the prompt above is implicit declaration that a machine learning assistant was used. If it is not obvious that a piece of work was generated, include the robot (πŸ€–) icon next to a code snippet or text snippet.
  3. Validation: Outputs generated by a virtual assistant should always be validated by a human and you, as contributor, take ultimate responsibility for the correct functionality of any code and the correct expression in any text or media you submit to this project.

-----------------------------------------------------

πŸ› οΈ Tech Stack

image

This application is based on Django, written in Python and deployed on the server using docker-compose.

-----------------------------------------------------

πŸ—„οΈ Data Model

Below is the Entity-Relationship Diagram (ERD) illustrating the core data model for the QGIS Feed Website. For a detailed view, click on the image below or see the full-size diagram in erd.svg:

ERD

-----------------------------------------------------

🧊 Using the Nix Shell

Please refer to the Nix section in CONTRIBUTING.md.

-----------------------------------------------------

✨ Contributing

We welcome contributions! Please read the CONTRIBUTING.md for guidelines on how to get started.

-----------------------------------------------------

πŸ™‹ Have Questions?

Have questions or feedback? Feel free to open an issue or submit a Pull Request!

-----------------------------------------------------

πŸ§‘β€πŸ’»πŸ‘©β€πŸ’» Contributors

  • Tim Sutton – Original author and lead maintainer of the QGIS Feed Website project
  • Kontur Team – Responsible for the design of the current theme
  • Lova Andriarimalala – Core developer and ongoing maintainer
  • QGIS Contributors – See the full list of amazing contributors who have helped make this website possible.

-----------------------------------------------------

Made with ❀️ by Tim Sutton (@timlinux), Lova Andriarimalala (@Xpirix) and QGIS Contributors.

About

QGIS Welcome Page News Feed Backend

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 32.9%
  • Sass 28.1%
  • Python 20.4%
  • HTML 11.7%
  • SCSS 2.4%
  • Makefile 1.9%
  • Other 2.6%