Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(ibge): include pop and censo ibge documentation #197

Merged
merged 3 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/databases/SINAN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.11.8"
},
"vscode": {
"interpreter": {
Expand Down
156 changes: 156 additions & 0 deletions docs/source/databases/Utilities.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "c153a255-ad53-4b27-b689-4c119ea8cc52",
"metadata": {},
"source": [
"## Utilities module\n",
"\n",
"Some helper functions that are used throughout the package: "
]
},
{
"cell_type": "markdown",
"id": "c5c639e6-fa54-482a-a91d-20a8bbe05206",
"metadata": {},
"source": [
"### brasil"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "451830fc-04af-4003-8e70-c71d61a57ac5",
"metadata": {},
"outputs": [],
"source": [
"from pysus.utilities import brasil"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "76a37da8-7b41-4565-83e2-e23bfbeae5bb",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'BR': 'Brasil',\n",
" 'AC': 'Acre',\n",
" 'AL': 'Alagoas',\n",
" 'AP': 'Amapá',\n",
" 'AM': 'Amazonas',\n",
" 'BA': 'Bahia',\n",
" 'CE': 'Ceará',\n",
" 'ES': 'Espírito Santo',\n",
" 'GO': 'Goiás',\n",
" 'MA': 'Maranhão',\n",
" 'MT': 'Mato Grosso',\n",
" 'MS': 'Mato Grosso do Sul',\n",
" 'MG': 'Minas Gerais',\n",
" 'PA': 'Pará',\n",
" 'PB': 'Paraíba',\n",
" 'PR': 'Paraná',\n",
" 'PE': 'Pernambuco',\n",
" 'PI': 'Piauí',\n",
" 'RJ': 'Rio de Janeiro',\n",
" 'RN': 'Rio Grande do Norte',\n",
" 'RS': 'Rio Grande do Sul',\n",
" 'RO': 'Rondônia',\n",
" 'RR': 'Roraima',\n",
" 'SC': 'Santa Catarina',\n",
" 'SP': 'São Paulo',\n",
" 'SE': 'Sergipe',\n",
" 'TO': 'Tocantins',\n",
" 'DF': 'Distrito Federal'}"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"brasil.UFs"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "965a2323-066c-45af-83f7-b20ece735089",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{1: 'Janeiro',\n",
" 2: 'Fevereiro',\n",
" 3: 'Março',\n",
" 4: 'Abril',\n",
" 5: 'Maio',\n",
" 6: 'Junho',\n",
" 7: 'Julho',\n",
" 8: 'Agosto',\n",
" 9: 'Setembro',\n",
" 10: 'Outubro',\n",
" 11: 'Novembro',\n",
" 12: 'Dezembro'}"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"brasil.MONTHS"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "573f2f20-f038-4384-b6f2-558bad80f276",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'Rio de Janeiro'"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Get municipality name by IBGE's geocode \n",
"# https://www.ibge.gov.br/explica/codigos-dos-municipios.php\n",
"brasil.get_city_name_by_geocode(3304557)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading
Loading