# What is the Synthetic Population Catalyst tool? and how to use it?
### ASG Community Event, 7th- 8th July, Birmingham
###### tags: `AGS` `Urban Analytics` `synthetic population`
:::info
**Lead by**: Fernando Benitez-Paez - Hadrien Salat - Urban Analytics team.
:books: **Resources and useful links:**
- **SPC Repo:** https://github.com/alan-turing-institute/uatk-spc
- **SPC website:** https://alan-turing-institute.github.io/uatk-spc/
- **Urban Analytcs website:** https://www.turing.ac.uk/research/research-programmes/urban-analytics
- **Protocol buffers:** https://developers.google.com/protocol-buffers/docs/overview
:::
:wave: IceBreaker
---
*Please add your name on a new line below, and answer the icebreaker question:*
**:question: Are you familiar with synthetic population datasets? can you provide one example**
* Your Name | Your example
:desktop_computer: Installation of SPC
---
We provide the SPC output data for 47 ceremonial counties in England and other aditional areas, so you do not need to go througth the installation of the SPC, but in case you want to create new areas or playing with the tool in the following link you get the installation instructions in your environment.
https://alan-turing-institute.github.io/uatk-spc/installation.html
Could you think of a project requiring a synth-pop (e.g. ABM model)? Based on your experience, do you think having a pre-created synthpop file might reduce the workload of your modelling process? and What would be the most relevant feature you think needs to integrate? **Please include your name and your thoughts on this matter**
* Your name | **Your opinion** |
*
:house_with_garden: Create the Synt-Pop for new areas in England :flag-england:
---
*Once the SPC tool is installed, the next step is to run some scripts that will help you to get the input data requiered for SPC.*
- [ ] 1. Get the list of MSOAs in any area in England.
- [ ] 2. Run the requiered command to run SPC.
`cargo run --release -- config/your_region.txt`
- [ ] 3. For the first time SPC will take some minutes to get all the raw data, but after new SynthPop outputs will be created quick.
*Please include your name and the area you would like to get the SynthPop file using the SPC tool*
* Your name | **Your area of interest** |
*
:mag: Using the output files(.pb files)
---
The SPC output can be use in multiple ways, you migth want to explore the resulting .pb file in a language you feel more confortable with, or you migth want to plot into a map.
In any case, you can easily get the information integrated into the suggested data schema (https://github.com/alan-turing-institute/uatk-spc/blob/main/synthpop.proto) and extract the dimensions you need for the integration or exploration of the SyntPop.
We are aware that proto buffers are not a familiar language in the urban modelling community, so we have integrated a few examples using Python to guide your throutgh the use of .pb files.
For more information about Proto Buffers visit: https://developers.google.com/protocol-buffers/docs/overview
::: warning
In general there are three steps to use the .pb files in Python.
1. Define message formats in a .proto file. See here how SPC defines the messages into our data schema defined (https://github.com/alan-turing-institute/uatk-spc/blob/main/synthpop.proto)
2. Use the protocol buffer compiler. (Inregrated when you run the SPC tool)
3. Use the Python protocol buffer API to write and read messages. (You will see that in any script we call the library compiled)
:::
If you have cloned our repo, go to the folder `python>Demos`, open the notebook to run some examples of using SPC outputs.
https://github.com/alan-turing-institute/uatk-spc/blob/main/python/demos/ASG%20July%2022%20Demostration.ipynb
- [ ] 1. From .pb to pandas dataframe

- [ ] 2. Map the Venues

:closed_book: Close out, pluses and deltas
---
Before you leave, please add a key take away, something you liked (a plus), and something you’d change (a delta) below.
### Pluses
*
*
### Deltas
*
*
*
If you need more information about SPC and other projects/initiatives we work in the Urban Analytcs team please do not hesitate to contact us at fbenitez@turing.ac.uk, hsalat@turing.ac.uk