t2pgis: Set up parameters to JSON parsing and export it to a postGIS...

Description Usage Arguments Note Author(s) See Also Examples

Description

This function parse the JSON files (as is defined in streamR package). Once is parsed export it to a database format the timestamp column and creates to tables one with all the tweets and other only with geotagged tweets.

Usage

1
  t2pgis(fileprefix, con, path = ".", pattern = ".json$")

Arguments

fileprefix

Setup file prefix for JSON files. If tweets have been retrieved with the tweet2r function it should be the same. Te file prefix is used to create the table name and the geotagged table which has geo as a prefix (example "geofileprefix")

con

postGIS connection parameters. For more information look at RPostgreSQL

path

A character vector to folder. see ?list.files()

pattern

Limits possible file extensions, optional as regular expression. see ?list.files()

Note

It is mandatory to configure the connection to the database. The procedure is well described at RPostgreSQL package

Author(s)

Pau Aragó Galindo parago@uji.es

See Also

RPostgreSQL, streamR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 

#create a postgres connection
connection <- con <- dbConnect(PostgreSQL(), host="urls host",port=5432, 
                    user="user", password="assword", dbname="pgistweets")
fileprefix="tweets"

t2pgis(fileprefix, connection)

	
## End(Not run)

tweet2r documentation built on May 2, 2019, 2:34 a.m.