Skip to content

Preliminary analysis for 2023 population transformation consultation

License

Notifications You must be signed in to change notification settings

datasciencecampus/consultation_nlp

Repository files navigation

consultation_nlp

Stability codecov Twitter

Python code for preliminary natural language processing analysis for 2023 population transformation consultation

Where this documentation refers to the root folder we mean where this README.md is
located.

Getting started

To start using this project, first make sure your system meets its requirements.

It's suggested that you install this pack and it's requirements within a virtual environment.

Cloning the repo

To clone the repo, open command promt and navigate to the directory you want to save the repo to and call: git clone https://github.com/datasciencecampus/consultation_nlp.git

Pre-commit actions

This repository contains a configuration of pre-commit hooks. These are language agnostic and focussed on repository security (such as detection of passwords and API keys). If approaching this project as a developer, you are encouraged to install and enable pre-commits by running the following in your shell:

  1. Install pre-commit:

    pip install pre-commit
    
  2. Enable pre-commit:

    pre-commit install
    

Installing the package (Python Only)

Whilst in the root folder, in the command prompt, you can install the package and it's dependencies using:

python -m pip install -U pip setuptools
pip install -e .

or use the make command:

make install

This installs an editable version of the package. Meaning, when you update the package code, you do not have to reinstall it for the changes to take effect. (This saves a lot of time when you test your code)

Remember to update the setup and requirement files inline with any changes to your package. The inital files contain the bare minimum to get you started.

Running the pipeline (Python only)

The entry point for the pipeline is stored within the package and called run_pipeline.py. To run the pipeline, run the following code in the terminal (whilst in the root directory of the project).

python src/run_pipeline.py

Alternatively, most Python IDE's allow you to run the code directly from the IDE using a run button.

Running the streamlit app (dashboard)

  1. Ensure all requirements are downloaded from the requirements.txt by openning up the shell terminal (anaconda prompt) and running:
pip install -r requirements.txt
  1. Keep the shell terminal open and navigate to the directory where this code is saved and run:
streamlit run streamlit_app.py

Licence

This codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation. The documentation is ©Crown copyright and available under the terms of the Open Government 3.0 licence.

Contributing

If you want to help us build, and improve consultation_nlp, view our contributing guidelines.

Requirements

Contributors have some additional requirements!

To install the contributing requirements, open your terminal and enter:

python -m pip install -U pip setuptools
pip install -e .[dev]
pre-commit install

or use the make command:

make install_dev

Acknowledgements

This project structure is based on the govcookiecutter template project.

About

Preliminary analysis for 2023 population transformation consultation

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published