<commit_before>=======================
Importing Public Bodies
=======================

While it is possible to create public bodies individually through the admin
interface, it might be more advisable to scrape a list from a website or
crowdsource them with other people in a Google doc. You can then import these
public bodies as a CSV file into Froide.

The format of the CSV file should be like `in this Google Docs Spreadsheet <https://docs.google.com/spreadsheet/ccc?key=0AhDkodM9ozpddGNTaGJoa203aEJaRXVfM0Q0d1RjNUE#gid=0>`_. You could for example copy it and either fill in public bodies collaboratively or programmatically.

Format
------

The format is quite simple.

name
  (required) The name of the public body.
email
  (optional) If you give no email, users will not be able to make requests to this public body. You can fill in email addresses later through the admin.
jurisdiction__slug<commit_msg>Add prerequisites to public body import docs<commit_after>=======================
Importing Public Bodies
=======================

While it is possible to create public bodies individually through the admin
interface, it might be more advisable to scrape a list from a website or
crowdsource them with other people in a Google doc. You can then import these
public bodies as a CSV file into Froide.

The format of the CSV file should be like `in this Google Docs Spreadsheet <https://docs.google.com/spreadsheet/ccc?key=0AhDkodM9ozpddGNTaGJoa203aEJaRXVfM0Q0d1RjNUE#gid=0>`_. You could for example copy it and either fill in public bodies collaboratively or programmatically.


Prerequisites
-------------

You need at least one `PublicBodyTopic` and one `Jurisdiction` present. The jurisdiction's slug must be explictly referenced in the CSV. If no public body topic slug is given in the CSV, it will fall back to the lowest ranking `PublicBodyTopic` as default (the "other" or miscellaneous topic).


Format
------

The format is quite simple.

name
  (required) The name of the public body.
email
  (optional) If you give no email, users will not be able to make requests to this public body. You can fill in email addresses later through the admin.
jurisdiction__slug
{'fraction_non_alphanumeric': 0.08978469995419149, 'fraction_numerical': 0.008245533669262483, 'mean_word_length': 4.628865979381444, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2822222', 'n_tokens_mistral': 618, 'n_tokens_neox': 565, 'n_words': 305}