Skip to content
/ TNode Public

a framework for showing and searching data on an interactive us map

Notifications You must be signed in to change notification settings

pjIowa/TNode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TNode

Touch your data for the first time!

Why

This started off as an experiment in using D3 to display tweets collected from a Python script. I looked for a way to see Twitter trends on a US map, nothing really tickled me. Over time, I added features requiring a true server, settling on NodeJS for the backend. I made it a web framework so that people can interact with their data easier. Continue if you like.

Overview

Hover over State

state hover page

State Clicked

state clicked page

County Clicked

county clicked page

Installation Steps

Usage Steps

  • The app uses data from the Twitter API, here are steps to get credentials to use it:
1. Sign up for a Twitter account, unless you already have one: https://twitter.com/
2. Sign in to the Apps Management Site: https://apps.twitter.com/
3. Click on Create New App to continue.
4. Fill out the fields for your app and agree to the Developer Agreement.
5. Click on Create your Twitter application to continue.
6. Click to view the tab called Keys and Access Tokens for the app.
7. Click Create my access token on the bottom to continue.
7. Create a new file called credentialsTwitter.json.
8. Save the file under TNode->router.
9. Add a JSON dictionary with the keys: Consumer_Key, Consumer_Secret, Access_Token, and Access_Token_Secret. Then set the values for these keys into the dictionary. Use the tab on Twitter as reference.
10. Save the JSON dictionary to the file.
* The app needs a credentialsDB to access your Postgres database:
1. Create a new file called credentialsDB.json.
2. Save the file under TNode->router.
2. Click on the Postgres application to start the PostgreSQL Server on your machine.
3. Open psql, the command line interface for your PostgreSQL server.
4. If your server is not password-secured, run the following command: ALTER ROLE your_username WITH PASSWORD 'your_password';
5. If you haven't made a database yet, run the following command: CREATE DATABASE your_db_name;
6. Add a JSON dictionary with the keys: username, password and dbname. Then set the values for these keys into the dictionary as you set before.
7. Save the JSON dictionary to the file.
* To run the app, you have to start the server.js file:
1. Open terminal and cd into the TNode directory.
2. To setup nodemon on your machine, run the following command: npm install -g nodemon
3. To start the server, run the following command: nodemon server.js
4. If it all succeeds, the terminal will say 'the api is running'.

Contributing

This project can use your help. Submit a pull request or open an issue to get started. For any questions, comments, or concerns, please send me a message at [email protected]

Sources

About

a framework for showing and searching data on an interactive us map

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published