Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Simcaq_statistics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Team DB
Simcaq_statistics
Commits
04f50c05
Commit
04f50c05
authored
9 months ago
by
mgy20
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
f055ca96
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+45
-0
45 additions, 0 deletions
README.md
with
45 additions
and
0 deletions
README.md
+
45
−
0
View file @
04f50c05
...
@@ -21,3 +21,48 @@ Hipotese nula: Para todas as amostras retiradas de colunas diferentes, elas pert
...
@@ -21,3 +21,48 @@ Hipotese nula: Para todas as amostras retiradas de colunas diferentes, elas pert
## Fonte dos microdados do governo
## Fonte dos microdados do governo
https://www.gov.br/inep/pt-br/acesso-a-informacao/dados-abertos/microdados/
https://www.gov.br/inep/pt-br/acesso-a-informacao/dados-abertos/microdados/
## R - MonetDB
É possível utilizar o JDBC driver para realizar consultas do MonetDB de dentro do R.
Para isso primeiro baixe dentro o R o pacote JDBC
```
R
install.package
(
"RJDBC"
)
```
Em seguida, faça o download do driver do Monetdb
```
bash
# Driver location
mkdir
/driver
cd
/driver
# Get driver
wget https://www.monetdb.org/downloads/Java/monetdb-jdbc-3.3.jre8.jar
```
Finalmente, utilizando o exemplo a seguir, realize abra uma conexão, faça as consultas e fexe a conexão.
```
R
library
(
RJDBC
)
# Path to the MonetDB JDBC driver .jar file
jdbc_driver_path
<-
"/drivers/monetdb-jdbc-3.3.jre8.jar"
# Load the MonetDB JDBC driver
drv
<-
JDBC
(
"org.monetdb.jdbc.MonetDriver"
,
jdbc_driver_path
)
# Connection details
url
<-
"jdbc:monetdb://localhost:50000/simcaq"
user
<-
"monetdb"
password
<-
"monetdb"
# Establish a connection
conn
<-
dbConnect
(
drv
,
url
,
user
,
password
)
# Example query
group1
<-
dbGetQuery
(
conn
,
"SELECT count(biblioteca) FROM escola WHERE ano_censo = 2010"
)
# View the result
print
(
group1
)
dbDisconnect
(
conn
)
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment