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

geolocation data API for Workshop locations #499

Open
mfjenn opened this issue Oct 17, 2016 · 19 comments
Open

geolocation data API for Workshop locations #499

mfjenn opened this issue Oct 17, 2016 · 19 comments

Comments

@mfjenn
Copy link

mfjenn commented Oct 17, 2016

Create the ability to generate a report with workshop location data -- city, state, country name, lat & lon, attendee numbers.

@lilliealbert
Copy link
Member

@mfjenn Is http://bridgetroll.org/events.csv not sufficient? Can you specify which fields are missing?

@mfjenn
Copy link
Author

mfjenn commented Oct 17, 2016

We would like to see city, latitude, longitude, number attended so that the data can be used to populate a map. The reasoning is all on the Trello board => https://trello.com/b/skfsydxO/bridge-foundry-volunteer-projects

@lilliealbert lilliealbert changed the title Generate a report Add additional fields to events.csv Oct 17, 2016
@tjgrathwell
Copy link
Member

Is the goal to show a map point for each city, or for each workshop location?

Workshops that were created in Bridge Troll already have a lat+long calculated to show the map on their event page. We don't currently have lat+long data for "external" events because some of them don't have a full address.

@mfjenn
Copy link
Author

mfjenn commented Oct 19, 2016

I think that’s why maybe the CITY should be annotated with a lat/lon instead — so ALL workshops can be represented. Is it possible to make that change?

On Oct 19, 2016, at 12:53 AM, Travis Grathwell notifications@github.com wrote:

Is the goal to show a map point for each city, or for each workshop location?

Workshops that were created in Bridge Troll already have a lat+long calculated to show the map on their event page. We don't currently have lat+long data for "external" events because some of them don't have a full address.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #499 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AAZcVNlRQMB6IjJIbUhD96vgA7emB8h1ks5q1bBNgaJpZM4KYos8.

@ultrasaurus
Copy link
Member

FYI: the goal is to be able to update and publish this map: http://bridgefoundry.org/workshop-map/

@lilliealbert
Copy link
Member

Okay. That kind of detail is really helpful for us to figure out how to do this the best way possible, so in general, please include what your goal is when you're requesting features be added to Bridge Troll, as much as possible.

What if there was a public map hosted by Bridge Troll itself instead of requiring a CSV output and manual upload somewhere else?

@ultrasaurus
Copy link
Member

I'd be happy to integrate the map into Bridge Troll, though in general I think it is a good strategy to offer APIs and then build UI on top of it. Then if anyone wanted to create an alternate map (say for just one country or region), they could. Right now it is really just a simple reflector to show sponsors and volunteers our global impact, but as we grow, I could imagine alternate variations being useful in other ways.

@ultrasaurus
Copy link
Member

Also, the only reason it requires manual upload elsewhere was because I was using Google Sheets, which used to have a more dynamic API, but now won't create a stable URL for spreadsheet data :( and I always expected to ultimately integrate it into Bridge Troll so it would get updated immediately whenever anyone added a workshop in a new place.

@lilliealbert
Copy link
Member

Here's the current map that is publicly-accessible: https://www.bridgetroll.org/organizations

@ultrasaurus
Copy link
Member

@lilliealbert thanks for the map reference, I do remember seeing that before.

Our goal is to make people see how geographically diverse our community is, so having more dots on the map is effective for that (e.g. Cambridge & Boston might be one chapter/region, but would be two dots on the other workshop map. I realize it is a feature of that map widget to display a number where there are a lot of dots, but I think that is not as high impact for this purpose. I chose a map resolution and size on the page where it would be clear that there are a lot of dots, and omitting the country names and landscape features allows me to use it as a graphic on a slide which looks nicer with overlay text (which I've used for some presentations).

I like the idea of an API to allow visualizations for different purposes.

For the presentation I'm trying to finalize this week, I can just keep using my google sheet of cities which I updated manually a month ago, and could add a few more missing cities if there are any.

@ultrasaurus ultrasaurus changed the title Add additional fields to events.csv geolocation data API for Workshop locations Feb 5, 2017
@tigarcia
Copy link

Hi, I'm working on the d3 workshop map with Sarah and I don't have a lot of context about what data is available to us, so forgive me if I ask a dumb question. As part of this map visualization, there were a few ideas to improve what we currently have:

  1. Show a year by year (or month by month if the data is available) animation of different *bridge organizations, including when the organization were created. So a new dot would appear on the map once the visualization got to the point in time when the organization was founded.

  2. Be able to filter the map out by different types of *bridge organizations. The user could select to only show mobile bridge or only rails bridge, etc.

So I think the data I need (in addition to the data we have now in the csv) is the date an organization was created and the type of organization it is (railsbridge, mobilebridge, etc)

@LauraKirby
Copy link
Contributor

Hi @tigarcia, @ultrasaurus and @lilliealbert,

This evening, I spent some time making the API accessible for the Workshop Map.

I have submitted a pull request on the Bridge Troll repo to grant origin "bridgefoundry.org" access to the "events.json" resource.

Additionally, I have submitted a pull request on the Bridge Foundry map repo, to access the Bridge Troll API and update the Bride Foundry map accordingly.

It is only after the Bridge Troll pull request has been reviewed and merged, that the Bridge Foundry pull request should be merged.

@tigarcia once the Bridge Toll pull request is accepted, I believe we will have access to the information you have requested. Here is a sample json object from https://www.bridgetroll.org/events.json:

{
id: 329,
title: "GoBridge: Ultimate Go - Framingham, Ma",
student_rsvp_limit: 25,
imported_event_data: null,
location: {
name: "Staples",
address_1: "500 Staples Drive",
address_2: "",
city: "Framingham",
state: "MA",
zip: "01702",
latitude: 42.2913876,
longitude: -71.4889834
},
workshop: true,
organizers: [
"Todd Rafferty",
"Andy Haskell",
"Jason Watson"
],
sessions: [
{
name: "Ultimate Go - Day 1",
starts_at: "2017-02-11T09:00:00.000-05:00",
ends_at: "2017-02-11T17:00:00.000-05:00"
},
{
name: "Ultimate Go - Day 2",
starts_at: "2017-02-12T09:00:00.000-05:00",
ends_at: "2017-02-12T17:00:00.000-05:00"
}
],
volunteer_rsvp_count: 4,
volunteer_waitlist_rsvp_count: 0,
student_rsvp_count: 12,
student_waitlist_rsvp_count: 0,
organization: "GoBridge"
},

@tigarcia
Copy link

@LauraKirby It looks like the api is giving us all the upcoming events on bridge troll. Is there a way to get older data?

@LauraKirby
Copy link
Contributor

@tigarcia, good catch. I will take a look.

@tjgrathwell
Copy link
Member

@LauraKirby
Copy link
Contributor

Great, thank you for clarifying @tjgrathwell!

@LauraKirby
Copy link
Contributor

LauraKirby commented Jul 12, 2017

Remaining issue: external_events do not have lat and long.
Requesting clarification: on "city" and "external events"

Where I thought we wanted a circle (on the map) for each event, it appears the eachcity with a event count is being requested by the writers of the issue.

Commenting further on @tjgrathwell's and @mfjenn's note:

On Oct 19, 2016, at 12:53 AM, Travis Grathwell notifications@github.com wrote:

Is the goal to show a map point for each city, or for each workshop location?

Workshops that were created in Bridge Troll already have a lat+long calculated to show the 
map on their event page. We don't currently have lat+long data for "external" events 
because some of them don't have a full address.
On Oct 19, 2016, Mary Jenn responded:
I think that’s why maybe the CITY should be annotated with a lat/lon instead
 — so ALL workshops can be represented. Is it possible to make that change?

@mfjenn, by "city" do you mean:

A. each city where at least one workshop has taken place
B. each city where a chapter exists
C. it doesn't matter, either would work

Remaining issue further explained:

lat and long are available when an event has a location. It seems that city was entered into the database for external_event's and a location was never created.

Database notes:

  • The external_events table hascity and location columns.
    • we know that each external_event will have a city attribute because: validates_presence_of city
  • The events table only includes a location column.
  • Both events and external_events include a chapter_id column.

Questions for @tjgrathwell:

  1. Around how many external events exist in the database?
  2. Around how many external events without a location exist in the database?

Potential Solutions:

  1. Perhaps city could mean the chapter city instead of the event city?
  • fewer dots would appear because an event may take place outside of a chapter's city.
  1. Perhaps city could mean the organization city? Maybe a location could belong to an organization? This location would be the city in general and not a business location.

Ideas on next steps:

add validation to require external event location (even if it is an estimated location)

@tjgrathwell
Copy link
Member

@LauraKirby There are currently 134 ExternalEvent records in the database. Technically they all have a City and Location, but it's usually only enough to identify the city rather than the specific venue.

@ultrasaurus
Copy link
Member

I suggest we have a separate city table with lat/long, which can be referenced from location (which is typically a specific venue) and ExternalEvent which already has a city that is currently a string.

Note: there is value to showing all the cities, rather than using region -- it's not only easier to place dots on the map, but there are more of them which makes the impact feel bigger for people both inside and outside of our communities.

I've been manually updating this list of cities with lat,long which could be imported to seed the database.

Suggested approach to changing the software in small, independent steps

  1. Create some seed data which populates local test database with lots of workshops, locations, cities with both internal and external events -- was thinking of fake data, but might be easier (better?) to just populate using the events API
  2. Create a city model with lat, long; Seed the table with data from above spreadsheet; CRUD UI
  3. Create a script to fix up all the external event cities that are not uniformly named. It could b e based on the city name before the , which I think will match almost all (a few may need touching up manually. I think currently all cities are unique (e.g. we don't have Paris, TX and Paris, France)
  4. Refactor so the Location and ExternalEvent use the new city model, and update the UI so people pick from an existing city or add a new city, when adding/updating a location or external event

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

No branches or pull requests

6 participants