Table of Contents
This repository houses multiple Python scripts and data used in the project, Community Mapping. This repository can be divided into two primary purposes.
DataScripting
The data as contained within the .data/ directory is used by the Community Mapping platform for the rendering of heat-maps for the entirety of Australia on the Services Profile Page.
Additionally, several scripts have been developed so as to be able to appropriately convert data as retrieved manually from online sources, i.e. the Australian Bureau of Statistics (ABS), into a singular geo.json file. The current file that is utilised for the rendering of heat-maps on the platform is the geo-numeric.json file.
This project has been built with the following tools and technologies.
It must be noted that for the best development, Visual Studio Code is recommended.
- Python
- With
Homebrewbrew install python
- With
If this does not work, please follow the instructions as available here.
The following delineates the process to build and run the scripts locally.
- Clone the repo
git clone https://github.com/jamestkelly/CommunityMappingData
- For example, to use
UpdateGapScore.py, ensure that thegeo.jsonfile you wish to use has had its path updated in the script (the script will always use the latest.csvfile in the./data/directory)with open('../Data/geo.json') as data_file:
- Then, run the script from within the directory, via the terminal
python3 UpdateGapScore.py
For access to original source SEIFA data used to generate the geo.json files, please refer to https://www.abs.gov.au/websitedbs/censushome.nsf/home/seifamapping?opendocument&navpos=260.
The file in the ./data/ directory, geo-numeric.json is the current file utilised by the platform Community Mapping for the Services Profile Page. This file contains the polygons used to generate the heat-map, alongside all data as contained within the properties for each region. To update the data used in the mapping of the Services Profile Page, please upload the data to an accessible hook, i.e. a public GitHub and update the path in the HeatMap.tsx file in the Community Mapping repository.
// Fetch the data globally
useEffect(() => {
fetch('https://raw.githubusercontent.com/jamestkelly/CommunityMappingData/main/data/geo-numeric.json')
.then(resp => resp.json())
.then(json => setData(json))
});It musted be noted that due to the amount of data each of the Python scripts parse, so manual changes must be made to conform the data to a .json format. Specifically, for the entirety of Australia the last-most set of properties contains strings instead of numeric values for fields like sa2ID, etc. As such, these must be converted to strings within the output file manually so as to have the Community Mapping platform interpret the file correctly.
The contributors to this project are as follows:
- Jim Kelly
- Email: jim.kelly@connect.qut.edu.au
- Isaac Guglielmin
- Samanatha Swift
- Email: sj.swift@connect.qut.edu.au
- Luis Villamizar
Distributed under the GNU General Public License. See LICENSE.txt for more information.