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

Week 4 - Yang Wang #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YangWangPENN
Copy link

No description provided.


/* =====================
Now that you've properly parsed your data, use _.each to plot the
dataset you've pulled down.
===================== */
_.each(crimelist, function(data) {L.marker([data.Lat, data.])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing something after data.

@@ -103,12 +105,17 @@ var phillyBikeCrashesDataUrl = "https://raw.githubusercontent.com/CPLN692-MUSA61
Remember to call all code within the function body. Use console.log to make sure
that this step is completed before moving on!
===================== */

$.ajax(phillyCrimeDataUrl).done(function(ajaxResponseValue) {
var crimelist = JSON.parse(ajaxResponseValue);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this load data on to the map for you?

You need to define crimelist outside of the ajax call so it can be stored out of scope of the function and referred to later

@@ -42,6 +44,22 @@ var getAndParseData = function() {
/* =====================
Fill out this function definition
===================== */
dat = $.ajax("https://raw.githubusercontent.com/CPLN692-MUSA611/datasets/master/json/philadelphia-crime-snippet.json";).done(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you are copying a dataset from a previous years class.

Furthermore, this does not successfully run for me.

Does it for you?

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

Successfully merging this pull request may close these issues.

2 participants