• Stars
    star
    129
  • Rank 270,401 (Top 6 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created almost 8 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

QGIS D3 Date and Time Heatmap

QGIS Data Visualization

This plugin consists of a D3 circular histogram heatmap using date, time, and custom categories in the data. It also has an experimental word cloud generator, but requires adding additional python libraries and uninstalling and reinstalling the pillow python library.

QGIS D3 Date and Time Heatmap

This creates a D3 circular histogram heatmap using date, time, and custom categories in the data. An optional legend can be included.

The plugin works by counting the number of date/time/category events using two axis and displays the results as a circular heatmap. It allows you to analyze the temporal distribution of data and how much of it exists across time, based on two frequencies.

QGIS Layer Tab

This tab is for choosing the vector layer that will be used for generating the heatmap chart. Additionally, date and time fields are selected. A field representing a category can be specified and the axis of the resulting chart is configured.

Circular Heatmap
  • Input Vector Layer - This is a list of all the vector layers in the QGIS project. Select the one that you want to work with.
  • Date/Time Field - By checking the radio button next to this filed you can specify a field that contains a date/time column. This can either be a QDateTime column or a string representing a date and time. Date/time strings are parsed using the Python dateutil dateutil.parser.parse parser. The format of the string must match one of the supported formats used by dateutil.
  • Date Field - If the vector layer has separate columns for Date and Time then select this radio button and then select a field that contains a date.
  • Time Field - This is enabled by checking the radio button next to the Date Field. Here you can choose a field that contains time.
  • Radial Lines and Concentric Bands represent one of the following for their respective axis:
    • Year
    • Month
    • Day of Month
    • Day of Week
    • Hour of Day
    • Custom Category Field - Select this if you want to use one of the columns as a category along one of the axis.
  • Custom Category specifies one of the columns that represents a category that can be selected for the axis. Both Radial Lines and Concentric Bands can select this field. If there are too many unique values in the category column, then an error message will be generated. You can limit the number unique category values by setting a Filter on the layer. See the example below.

Note that it is not necessary to have both date and time information. In this case, select either the radial box representing date and time in the same column or separate date and time columns.

Titles Tab

The chart title, legend title, and the mouse over prefix can be configured on this tab.

Titles Tab
  • Chart Titles - This text will be displayed as a header at the top of the page.
  • Legend Title - If a legend is displayed, this is the text that will be displayed above it.
  • Mouse Over Prefix - When Show mouse over histogram value is selected, whenever the mouse is over a part of the chart, the value of the pie segment will be displayed. This is the prefix that accompanies the pie segment value.
  • Show Legend - Check this box to display the legend.
  • Show mouse over histogram value - Check this to display the histogram value when the mouse is over a wedge of the heat map chart.

Settings Tab

Chart and legend settings for the heat map can be configured on this tab.

Settings Tab

Chart Settings

  • Inner radius - The radius in pixels where the first band of the heatmap starts.
  • Band height - Height in pixels of each band.
  • Show radial labels - When checked, the radial labels will be displayed.
  • Show band labels - When checked, the labels for each band will be displayed.

Legend Settings

The legend will be displayed to the right of the chart and these are its settings.

  • Maximum Legend Height - Specifies the maximum height of the legend in pixels.
  • Legend Width - Specifies the width of the legend bar in pixels.
  • Legend Box Width - Specifies the overall D3 legend container width. This must be large enough to include the legend bar and labels.

Colors Tab

These are settings for fine control over the heatmap color ramp and No Data Color

Colors Tab

Tutorial Examples

These examples make use of the 2006 Chicago crime data. In 2006 there were 367,968 crime incidents. That is a lot of crime during a year in just one city. Although this author is not trained in crime, some basic conclusions can be obtained by looking at the crime incidents based on the Month of the Year, Time of the Day, and Day of the Week. Here are the examples.

Month of the year vs. day of the week.

Month vs. day of the week

By looking at this graph one can make some observations. The least amount of crime occurs during the months of January, February and March. This is probably due to the cold. If that is the case, why does December have a high crime rate? That is probably because of the holiday season.

Hour of the day vs. day of the week.

Hour of the day vs. day of the week

In this graph it appears that crime increases from 6pm to 11pm. The worst crime occurs from midnight to 1am. More difficult jobs must be taking place on the weekend where there is an increase of activity from 1am to 3am. During the day from Noon to 1pm there is also an increase of crime.

Hour of the day vs. month of the year

Hour of the day vs month of the year

Here one can see a similar pattern. Crime is less during January, February, and March. Crime increases starting from about 6pm to 11pm and then from Midnight to 1am plans are executed. This graph also shows the increased crime from Noon to 1pm.

Hour of the day vs custom crime category

In this example the input data has been filtered by setting a QGIS filter for only certain types of crime. For this Example, right-mouse click on the Chicago crime layer in QGIS and select Filter then use the following filter:

"Primary Ty" IN ('THEFT','ROBBERY','OTHER OFFENSE','NARCOTICS',
    'MOTOR VEHICLE THEFT','DECEPTIVE PRACTICE','CRIMINAL TRESPASS',
    'BURGLARY','BATTERY','ASSAULT')

Set the following to:

  • Radial Lines - Hour of Day
  • Concentric Bands - Custom Category Field
  • Custom Category - Primary Ty

This shows the resulting chart that is created.

Hour of the day vs custom crime category

Word Cloud Algorithms

These are experimental algorithms that generate word cloud images. They will not be available by default because the python worldcloud library needs to be installed. This is done by opening the OSGeo4W Shell and then running the command pip install wordcloud. You can then launch QGIS and the alogirhtms Word cloud from attribute and Word cloud from file will be added to the menu. If you get an error message when you run these algorithms that says "ImportError: The _imagingft C module is not installed", you will need to run the command pip uninstall pillow and then pip install pillow. There seems to be some problem with the pillow library in QGIS. This requires system administrator privileges. On Windows find the OSGeo4W Shell in the Start menu. Right-mouse click on OSGeo4W Shell, click on More and then click on Open file location. Find the OSGeo4W Shell in the file browser window and right-mouse click on it and select Run as administrator. This will put you in administrator mode when you uninstall and reinstall pillow.

Word cloud from attritute

This algorithm generates a word cloud from one of the string attributes of a vector or table layer. It takes all of the attribute's string values and generates a word cloud from them. The parameters are fairly self explanatory.

This is an example of the algorithm, run on the Natural Earth airport shapefile with the airport name field used as the selected attribute. The output file can be a PNG, TIFF, or SVG format.

Word cloud

This is the resulting output.

Word cloud

Word cloud from file

This algorithm generates a word cloud from all the words in a .txt file. This shows the processing algorithm configured to run on US Constitution.

Word cloud

This shows the resulting word cloud output generated from the US Constitution.

Word cloud

More Repositories

1

ghidra

Ghidra is a software reverse engineering (SRE) framework
Java
47,515
star
2

SIMP

A system automation and configuration management stack targeted toward operational flexibility and policy compliance.
Ruby
1,336
star
3

lemongraph

Log-based transactional graph engine
Python
1,133
star
4

datawave

DataWave is an ingest/query framework that leverages Apache Accumulo to provide fast, secure data access.
Java
535
star
5

enigma-simulator

An educational demonstration of breaking the Enigma machine
Jupyter Notebook
443
star
6

timely

Accumulo backed time series database
CSS
376
star
7

skills-service

SkillTree is a micro-learning gamification platform supporting the rapid integration of a gamified tool training approach into new and existing applications.
Groovy
368
star
8

DCP

Digest, stat, and copy files from one location to another in the same read pass
C
329
star
9

lemongrenade

Data-driven automation platform
Java
302
star
10

qgis-latlontools-plugin

QGIS tools to capture and zoom to coordinates using decimal, DMS, WKT, GeoJSON, MGRS, UTM, UPS, GEOREF, ECEF, H3, and Plus Codes notation. Provides external map support, MGRS & Plus Codes conversion and point digitizing tools.
Python
293
star
11

nationalsecurityagency.github.io

Site for NSA's Open Source project listing
HTML
239
star
12

emissary

Distributed P2P Data-driven Workflow Framework
Java
237
star
13

ghidra-data

Supporting Data Archives for Ghidra
167
star
14

qgis-shapetools-plugin

Shape Tools creates geodesic shapes and includes a number of geodesic tools for QGIS including the XY to Line tool, geodesic densify tool, geodesic line break, geodesic measure tool, geodesic measurement layer, geodesic scale, rotate and translate tool, and digitize points at an azimuth & distance tools.
Python
151
star
15

fractalrabbit

Simulate realistic trajectory data seen through sporadic reporting
Java
134
star
16

MADCert

Create root and intermediate Certificate Authorities, issue user and server certificates, etc. for testing purposes.
JavaScript
90
star
17

kmyth

C
80
star
18

skills-client

SkillTree client libraries facilitating the rapid integration of a gamified tool training approach in conjunction with skills-service. Provides out of the box support for Angular, React, Vue.js, and native Javascript.
JavaScript
77
star
19

qgis-searchlayers-plugin

Enhanced textual vector layer searching in QGIS.
Python
74
star
20

qgis-kmltools-plugin

Fast KML Import and Export Plugin for QGIS
Python
64
star
21

qonduit

A WebSocket library for use with Apache Accumulo
Java
58
star
22

skills-docs

SkillTree documentation, covering client integration, dashboard administration and deployment, and contribution guidelines.
JavaScript
42
star
23

qgis-bulk-nominatim

Provides bulk nominatim geocoding for QGIS
Python
37
star
24

skills-client-examples

SkillTree skills-client-examples
Java
28
star
25

pelz

C
27
star
26

XORSATFilter

A library for building efficient set-membership filters and dictionaries based on the Satisfiability problem.
C
27
star
27

datawave-muchos

This project leverages Ansible to automate DataWave deployments on your cluster
Shell
26
star
28

accumulo-python3

Build Python 3 applications that integrate with Apache Accumulo
Python
26
star
29

qgis-earthsunmoon-plugin

QGIS plugin to show the location of the sun, moon, and planets at their zenith for a particular date and time.
QML
26
star
30

call-stack-profiler

SkillTree
Groovy
21
star
31

skills-stress-test

SkillTree
Groovy
19
star
32

qgis-datetimetools-plugin

QGIS conversion tools to display the local date, time, time zone, convert between UNIX time (Epoch), Julian dates, ISO8601, calculate the difference between two dates, select a location and time zone by clicking on the map and display the closet location and sun statistics.
Python
18
star
33

qgis-densityanalysis-plugin

QGIS plugin that automates the creation of density heatmaps with a heatmap explorer to examine the areas of greatest concentrations. It includes H3, geohash, and polygon density map algorithms along with several styling algorithms.
Python
18
star
34

qgis-mgrs-plugin

QGIS Tools to capture and zoom to MGRS coordinates.
Python
17
star
35

qgis-lockzoom-plugin

QGIS Lock Zoom to Tile Scale
Python
16
star
36

ghidra-extensions

Python
12
star
37

datawave-spring-boot-starter

Java
12
star
38

datawave-microservices-root

Shell
10
star
39

datawave-dictionary-service

The Dictionary service provides access to the data dictionary and edge dictionary. These services provide metadata about fields that are stored in Accumulo.
Java
10
star
40

maat

Maat is a centralized software integrity measurement and attestation (M&A) service
C
10
star
41

datawave-metadata-utils

Java
9
star
42

datawave-in-memory-accumulo

Java
6
star
43

datawave-query-metric-service

Java
5
star
44

datawave-ingest-services

Java
5
star
45

datawave-spring-boot-starter-audit

Java
5
star
46

datawave-authorization-service

Java
5
star
47

qgis-h3library-plugin

QGIS plugin that installs the H3 library without having to 'pip install h3'.
C
4
star
48

datawave-config-service

Java
4
star
49

datawave-accumulo-utils

Java
4
star
50

datawave-spring-boot-starter-cache

Java
4
star
51

datawave-audit-service

Java
4
star
52

datawave-utils

Java
3
star
53

datawave-type-utils

Java
3
star
54

datawave-base-rest-responses

Java
3
star
55

datawave-parent

2
star
56

datawave-hazelcast-service

Java
2
star
57

datawave-accumulo-service

Java
2
star
58

datawave-spring-boot-starter-query-metric

Java
2
star
59

rank-based-linkage

Java
2
star
60

datawave-common-utils

Java
2
star
61

datawave-metrics-reporter

Java
2
star
62

datawave-query-service

2
star
63

datawave-service-parent

2
star
64

datawave-mapreduce-query-service

1
star
65

datawave-query-executor-service

1
star
66

datawave-spring-boot-starter-query

1
star
67

datawave-spring-boot-starter-metadata

Java
1
star
68

datawave-modification-service

1
star
69

datawave-query-storage-service

1
star
70

datawave-spring-boot-starter-cached-results

1
star
71

datawave-helm-charts

Mustache
1
star
72

datawave-stack-docker-images

Shell
1
star