Data, Maps, Usability, and Performance

API canvas d3 data geo GeoJSON html5 image JavaScript json maps mysql PHP WordPress

Results for tag: json

Better Typos Generator Based on Common Misspellings

common typos

Previously, I wrote about generating typos based on misplacing your finger on a keyboard, or proximity based misspelling. But, another way to think about typos is to consider the words that people generally misspell. If you could query a list of misspelled words, it would be pretty easy to search and replace correct word or words with typos. Generally, the use case is for the reverse, correcting someone’s typos, but in some cases I think you could get some extra SEO juice from generating a couple typos for your main keywords. So, the idea is that I will pass a phrase, perhaps a title of some blog entry, and a function will return an array of phases with common misspellings of different words in the phrase. But first, let’s start with a list of common typos.
Read more

Grabbing HTML source code with PhantomJS or CasperJS

CasperJS Evaluate source code

Have you ever tried to retrieve the source code of a page with PhantomJS or CasperJS? Sure, there is a method in the API to save the source to a file but what if you wanted to work with it inside your script? One way to approach this would be to work on the DOM with the page evaluate method. After all, you can retrieve the source code of any page from the DOM by finding the HTML object. Here’s how to do it with PhantomJS or CasperJS.
Read more

How to parse and search JSON in JavaScript

finding or grep in JSON

My last post highlighted how you can quickly visualize JSON data with a free online JSON viewer. But, most likely, you actually want to find something in a JSON file or string programmatically. So, how do you search through JSON? How do you find an object by looking for a value or key or both? If we focus on JavaScript we have some native functions which allow us to parse JSON format (JSON.parse()) and turn JSON notation into a string (JSON.stringify()), but you still need to look through all those deeply nested objects to find what you need.
Read more

Top 5 Free JSON Viewers

JSON viewer

Alot of data these days is sent over via JSON, a JavaScript Object Notation and alternative to XML. JSON format is really great, but how do you read JSON files? The spacing and structure in XML is just easier to decode with your eyes so if you are looking at JSON and just want to quickly get some data, it often makes sense to utilize a JSON viewer. Luckily, there are a bunch of great free online JSON viewers where you can paste the JSON code and visualize the data. Here are 5 that I like the most:
Read more

Yahoo Suggest WordPress Plugin

Google Suggest API

I plan on building more WordPress plugins in the future, so this is a quick plugin I put together to get comfortable with developing for WordPress. This is my first journey into the WP world and I will start by creating a simple WP suggestion plugin. I am referring to search suggestions, the auto suggestion terms that search engines give you as you type into the search box. This autocomplete functionality tries to predict what you mean by displaying search queries based on search term popularity (among other factors) so this data has some value.
Read more