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

Create initial visualizations #36

Open
a-laughlin opened this issue Jan 3, 2014 · 25 comments
Open

Create initial visualizations #36

a-laughlin opened this issue Jan 3, 2014 · 25 comments

Comments

@a-laughlin
Copy link
Contributor

Hey @MarioCarloni

Initial form thoughts:

  • Slider: Life satisfaction, 0-10.
  • + button to journal an event that increased my satisfaction today.
  • + button to journal an event that decreased my satisfaction today.

The + buttons each add textareas when you click them, so some initial data would be:

  • of well-being increasing events

  • of well-being decreasing events

  • Words chosen
  • Typing speed is possible
  • Common words (word cloud?)
  • Word relation to life satisfaction

We can pull lots from just those as a start.

I'll work on building the form. Any thoughts on ways to visualize the data for self or city that would be interesting to you?

It'll be easy to create other forms, so we can branch out from the initial one. For example, another form might involve relationships. So we can see how various aspects of our internal lives vary according to the people we interact with.

This was referenced Jan 3, 2014
@a-laughlin
Copy link
Contributor Author

Updated the description!

@MarioCarloni
Copy link

A point density map of positive check-ins through Google Maps would be cool. Or maybe geo-located common words; something like this http://cdn.mashable.com/wp-content/uploads/2010/08/1.jpg but with a more local perspective.

What were you thinking in terms of relationships?

@a-laughlin
Copy link
Contributor Author

Hey Mario. I haven't seen the geo-based common words before. Interesting
idea. The pic you posted is fairly cluttered. I wonder if there's a way
to make more sense of it. What about something like color coded regions
based on increasing or decreasing life satisfaction, combined with the with
the top 5 words for each zone on when tapping a region?

On Mon, Jan 20, 2014 at 8:00 PM, MarioCarloni notifications@github.comwrote:

A point density map of positive check-ins through Google Maps would be
cool. Or maybe geo-located common words; something like this
http://cdn.mashable.com/wp-content/uploads/2010/08/1.jpg but with a more
local perspective.


Reply to this email directly or view it on GitHubhttps://github.com//issues/36#issuecomment-32812293
.

Adam Laughlin

Cambridge, MA
303-929-7880
LinkedIn http://www.linkedin.com/profile/view?id=11468038
Twitter http://twitter.com/a_laughlin
Google+ https://plus.google.com/107662649138779191300
a-laughlin.comhttp://a-laughlin.com/?utm_source=sig&utm_medium=em&utm_campaign=gnrl

@MarioCarloni
Copy link

A heatmap could work for satisfaction. I can at least plot it in ArcGIS for now, and would learn how to implement it through an API. http://2.bp.blogspot.com/-c8SolGQPpTc/T0Mlvw5B-5I/AAAAAAAAAPA/CHxGR9MTStc/s1600/mbta_service_heat_map.png

@a-laughlin
Copy link
Contributor Author

Sounds great! We can also iterate on it if needed. I have some experience using Google Maps' API.

Okay. I don't want to block progress while working on code parts and documentation. What would you need to do a prototype heat map using fake data from the questions above? I can send you about 7 months worth of sample GPS data, with collection timestamps to aid in the location piece.

@MarioCarloni
Copy link

I'll need a column of scores from -n to +n (-5 to +5 preferably) ; a
weighted 'heat' or 'emotional' value for each GPS entry.

@a-laughlin
Copy link
Contributor Author

Location data attached.

What's the purpose of the -5/+5 range? Since the slider goes from 1-10,
using the same scale seems like it would things more intuitive for form
users who wanted to see the raw data.

Data format-wise, how's this?

Form Entry:
{
"satisfaction":5,
"increasedWellBeingActions":[
"walked my dog",
"ate a peach",
"smiled at a stranger",
"invested 20 dollars in retirement fund"
],
"decreasedWellBeingActions":[
"drove in rush hour traffic",
"ate a pound of sugar",
"hit my head on a door"
],
"timeCollected":1382812740680
"timeWrittenToDb":1382812740681
}

GPS Entry: (note:many to many relationship with form entries)
{
"bearing": 0.0,
"senseStartTime": "14:38:20:045 26 10 2013 -0400 EDT",
"longitude": -71.0805184,
"time": 1382812740680,
"provider": "network",
"latitude": 42.366227,
"configAccuracy": "LOCATION_ACCURACY_COARSE",
"speed": 0.0,
"accuracy": 761.0
}

@a-laughlin
Copy link
Contributor Author

Oops. Looks like it may have not attached the location data json file to this thread. Emailed it directly to you also.

@a-laughlin
Copy link
Contributor Author

This ticket duplicated #37. Updated the title to make this one only about the visualization.

@MarioCarloni
Copy link

Plan:

  1. Pull oms-inside repo
  2. Use Leaflet/D3.js to create map with points from repo
  3. ????
  4. Profit

@a-laughlin
Copy link
Contributor Author

@MarioCarloni

Profit. Hahaha. Nice. :)

The shapefiles are in https://github.com/DanielHadley/SomervilleBaseGrey/tree/master/layers. Using the neighborhoods files is preferable to wards/precincts.

Last time I checked there are online tools for converting shapefiles to geojson. Are you okay with taking a stab at that?

Adam

@MarioCarloni
Copy link

done and converted. it's an ipython script so sorry if it looks weird. ipython rules, btw: https://github.com/MarioCarloni/Python/blob/master/DBF%20to%20JSON%20converter/dbftojson.ipynb

pulling repo now

@a-laughlin
Copy link
Contributor Author

Just said "Great!" on IRC right after you logged off. I'm glad you got it working!

@MarioCarloni
Copy link

No dice. Tried running through git bash and git shell. I'll try again tomorrow.

@a-laughlin
Copy link
Contributor Author

I think I may know the problem. My guess is that bower.json is requiring
too broad a version # of eslint or some other dependency. I'll look into it
as soon as I'm back at my laptop this morning.

Adam

Sent via mobile.
On Feb 13, 2014 10:19 PM, "MarioCarloni" notifications@github.com wrote:

No dice. Tried running through git bash and git shell. I'll try again
tomorrow.

Reply to this email directly or view it on GitHubhttps://github.com//issues/36#issuecomment-35052132
.

@a-laughlin
Copy link
Contributor Author

@MarioCarloni. I reinstalled my repo and am getting the same error. It isn't as simple as version. There's something weird going on with Windows and eslint. Working on it.

@a-laughlin
Copy link
Contributor Author

@MarioCarloni. Issue fixed. #56. Pulling down master from the oms-inside repo should get you running correctly.

@MarioCarloni
Copy link

I'm in. Thanks!

@a-laughlin
Copy link
Contributor Author

Great!

@MarioCarloni
Copy link

We've got a map! Check out the code too!
http://mariocarloni.github.io/

Chrome won't allow me to make a CORS request, so I cant get the points to show up unless they're on the same domain as the map. How would you go about pulling the json over the map?

@a-laughlin
Copy link
Contributor Author

Hey Mario,

Nice map!

If http://mariocarloni.github.io/ is an example of the cors request not working, it's likely because you're requesting an html file, not a json file. If you visit https://www.dropbox.com/s/sqxrg8fvdxtyeyv/neighborhoods.json, it loads an html file. Here's how to make a working link to the json file itself in dropbox.

That said, why not store the json in the repo?

Adam

@MarioCarloni
Copy link

I had the json file stored in the github.io folder with index.html but it gave the same error. One of my previous graphs had a similar issue and the fix was to host the json file. How would I go about accessing the json from repo?

@a-laughlin
Copy link
Contributor Author

Hmm. Googling for "gh-pages cors json error" and "gh-pages cross-domain json" turns up few relevant results. That makes me think it's something simple. Do you have an example where it's broken?

@MarioCarloni
Copy link

Well, since changing to the proper dropbox link, i'm now getting the alert "geojson file loaded", which is a step ahead, but the polygons won't yet load. No errors in the console, either.

@a-laughlin
Copy link
Contributor Author

Check in the network panel to make sure the response contains data. If so,
and if you're unfamiliar with setting a breakpoint at a working part of the
code via the Chrome developer tools, doing that then stepping through it
until you find a place it stops working is a good debugging strategy at
this stage.

Also, we can get on IRC or ghangout and troubleshoot together tomorrow
afternoon/early evening if that would help.

Adam

Sent via mobile.
On Feb 20, 2014 7:07 PM, "MarioCarloni" notifications@github.com wrote:

Well, since changing to the proper dropbox link, i'm now getting the alert
"geojson file loaded", which is a step ahead, but the polygons won't yet
load. No errors in the console, either.

Reply to this email directly or view it on GitHubhttps://github.com//issues/36#issuecomment-35685173
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants