Skip to content

Commit

Permalink
linting pt.1
Browse files Browse the repository at this point in the history
  • Loading branch information
luabida committed Nov 25, 2024
1 parent 9dc5987 commit b128d25
Show file tree
Hide file tree
Showing 16 changed files with 340 additions and 355 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ First, clone the Pysus repository:

```bash
git clone https://github.com/fccoelho/PySUS.git
```
```
then from within the PySUS directory build the container

```bash
Expand All @@ -72,7 +72,7 @@ Point your browser to [http://127.0.0.1:8888](http://127.0.0.1:8888) and have fu
Once you are done, you can stop the container with a simple `ctrl-c` from the terminal you started it or use the following command:
```bash
# to find the container ID
docker ps
docker ps
docker stop <CONTAINER ID>
```
### Mounting your working directory in the container
Expand Down Expand Up @@ -105,7 +105,7 @@ setx PYSUS_CACHEPATH "C:\Users\Me\desired\path\.pysus"
In Docker, just add an extra parameter `-e PYSUS_CACHEPATH="/home/me/desired/path/.pysus"` when starting the container:

```bash
docker run -p 8888:8888 -e PYSUS_CACHEPATH="/home/me/desired/path/.pysus" pysus:latest
docker run -p 8888:8888 -e PYSUS_CACHEPATH="/home/me/desired/path/.pysus" pysus:latest
```

## Examples
Expand Down Expand Up @@ -164,7 +164,7 @@ Downloading and reading SINASC data:
In[1]: from pysus.online_data.sinasc import download
In[2]: df = download('SE', 2015)
In[3]: df.head()
Out[3]:
Out[3]:
NUMERODN CODINST ORIGEM ... TPROBSON PARIDADE KOTELCHUCK
0 19533794 MSE2805100001 1 ... 11 1 9
1 52927108 MSE2802700001 1 ... 11 1 9
Expand All @@ -180,7 +180,7 @@ Dowloading and reading SIM data:
In[1]: from pysus.online_data.SIM import download
In[2]: df = download('ba', 2007)
In[3]: df.head()
Out[3]:
Out[3]:
NUMERODO TIPOBITO DTOBITO ... UFINFORM CODINST CB_PRE
0 01499664 2 30072007 ... 29 RBA2914800001 C229
1 09798190 2 04072007 ... 29 RBA2914800001 R98
Expand All @@ -196,7 +196,7 @@ Dowloading and reading CIHA data:
In[1]: from pysus.online_data.CIHA import download
In[2]: df = download('mg', 2009, 7)
In[3]: df.head()
Out[3]:
Out[3]:
ANO_CMPT MES_CMPT ESPEC CGC_HOSP ... CAR_INT HOMONIMO CNES FONTE
0 2009 07 16505851000126 ... 2126796 1
1 2009 07 16505851000126 ... 2126796 2
Expand All @@ -212,7 +212,7 @@ Dowloading and reading SIA data:
In[1]: from pysus.online_data.SIA import download
In[2]: bi, ps = download('AC', 2020, 3, group=["BI", "PS"])
In[3]: bi.head()
Out[3]:
Out[3]:
CODUNI GESTAO CONDIC UFMUN TPUPS ... VL_APROV UFDIF MNDIF ETNIA NAT_JUR
0 2000733 120000 EP 120040 07 ... 24.2 0 0 1023
1 2001063 120000 EP 120040 36 ... 7.3 0 0 1023
Expand Down
6 changes: 3 additions & 3 deletions condarecipe/pysus/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ about:
home: "https://github.com/fccoelho/PySUS"
license: gpl-v3
license_family: GPL3
license_file:
license_file:
summary: "Tools for dealing with Brazil's Public health data"
doc_url:
dev_url:
doc_url:
dev_url:

extra:
recipe-maintainers:
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: '3.3'
services:
services:
jupyter:
build:
context: ".."
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
language = 'en'

locale_dirs = ['locale']
gettext_compact = False
gettext_compact = False

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down
193 changes: 96 additions & 97 deletions docs/source/rio.html
Original file line number Diff line number Diff line change
@@ -1,95 +1,95 @@

<!DOCTYPE html>
<head>


<meta http-equiv="content-type" content="text/html; charset=UTF-8" />



<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>





<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>





<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>





<script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.min.js"></script>





<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/leaflet.markercluster-src.js"></script>





<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/leaflet.markercluster.js"></script>





<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" />





<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />





<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css" />





<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" />





<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css" />





<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/MarkerCluster.Default.css" />





<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/MarkerCluster.css" />





<link rel="stylesheet" href="https://raw.githubusercontent.com/python-visualization/folium/master/folium/templates/leaflet.awesome.rotate.css" />




<style>

html, body {
Expand All @@ -107,9 +107,9 @@
left:0;
}
</style>



<style> #map_309ce1ef971d4af68cd7a9bf39526cf5 {
position : relative;
width : 100.0%;
Expand All @@ -118,23 +118,23 @@
top: 0.0%;
}
</style>



</head>
<body>



<div class="folium-map" id="map_309ce1ef971d4af68cd7a9bf39526cf5" ></div>



</body>
<script>




var southWest = L.latLng(-90, -180);
var northEast = L.latLng(90, 180);
Expand All @@ -147,10 +147,10 @@
layers: [],
crs: L.CRS.EPSG3857
});




var tile_layer_426a222503fd49d2b786a7b9b8b7fdf3 = L.tileLayer(
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
{
Expand All @@ -161,8 +161,7 @@
}
).addTo(map_309ce1ef971d4af68cd7a9bf39526cf5);




</script>

2 changes: 1 addition & 1 deletion docs/source/tutorials/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tutorials
PySUS includes some Jupyter notebooks in its distribution package to serve as tutorials.


Preprocessing DATASUS data
Preprocessing DATASUS data
--------------------------
#. :doc:`Preprocessing SINAN`
#. :doc:`Preprocessing SIM`
Expand Down
15 changes: 8 additions & 7 deletions pysus/ftp/databases/cnes.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ class CNES(Database):
"long_name": "Cadastro Nacional de Estabelecimentos de Saúde",
"source": "https://cnes.datasus.gov.br/",
"description": (
"O Cadastro Nacional de Estabelecimentos de Saúde (CNES) é o sistema "
"de informação oficial de cadastramento de informações de todos os "
"estabelecimentos de saúde no país, independentemente de sua natureza "
"jurídica ou de integrarem o Sistema Único de Saúde (SUS). Trata-se do "
"cadastro oficial do Ministério da Saúde (MS) no tocante à realidade da "
"capacidade instalada e mão-de-obra assistencial de saúde no Brasil em "
"estabelecimentos de saúde públicos ou privados, com convênio SUS ou não."
"O Cadastro Nacional de Estabelecimentos de Saúde (CNES) é o "
"sistema de informação oficial de cadastramento de informações "
"de todos os estabelecimentos de saúde no país, independentemente "
"de sua natureza jurídica ou de integrarem o Sistema Único de "
"Saúde (SUS). Trata-se do cadastro oficial do Ministério da "
"Saúde (MS) no tocante à realidade da capacidade instalada e "
"mão-de-obra assistencial de saúde no Brasil em estabelecimentos "
"de saúde públicos ou privados, com convênio SUS ou não."
),
}
groups = {
Expand Down
Loading

0 comments on commit b128d25

Please sign in to comment.