Posts Tagged ‘kelso’

James Talmage’s Great Illustrator Scripts

Wednesday, February 25th, 2009

[Editor’s note: James has some great scripts that bring Freehand functionality into Illustrator. Ones I like are a better “replace with symbol” script than mine or John’s. Another draws legend boxes for each color used in the artwork. Two others add the ability to deselect paths that were only partially selected, or to select the unselected portions of paths is awesome. Thanks John vdH!]

Republished from James Talmage’s site.
View all of Jame’s scripts.

You’re a graphics person, right? Conventional wisdom says you’re a decidedly right-brained person. You use Illustrator to draw things, not to mess with cryptic code.

Maybe. But even if you’re the kind of Illustrator user who steers away from rulers, snaps, and numerically-entered values, and instead dives right for the Paintbrush, Symbol Sprayer, and Warp Tool, you still use Illustrator to get graphic things done and to use its features and commands. Scripting enhances both of those things.

Automation
Let’s face it: Repetition gets old, fast. It’s long been said that necessity is the mother of invention. I tend to think most cool inventions are the offspring of that cranky old couple, Laziness and Boredom. Some of the scripts in this collection arose from the shamelessly selfish desire to end the repetitious tedium of certain tasks.

But isn’t automation what Illustrator Actions are for? Well, yes. But Illustrator’s Actions Palette lets you create mere “macros.” With Actions, you can record and play back a series of most operations that you would normally perform by using the tools and commands that are directly accessible in Illustrator’s user interface. But scripts allow you to do more.

New Functionality
If little Invention was borne of daddy Laziness and mommy Boredom, he’s also been at least baby-sat by cousin Curiousity. Many of the scripts shared here were self-inflicted experiments, inspired by comments, complaints, and double-dog-dares in the Illustrator User-to-User Forums where I often hang out for recreation.

Scripting can enable you poke around a bit “under the hood” of Illustrator’s user interface, and manipulate many things from which the normal interface isolates you. For example, did you know that…

  • An Illustrator file has an internal list referred to as the “inkList” which determines the color separation plates?
  • A path can be designated closed or open, regardless of whether the whole path or just a part of it is selected?
  • You don’t have to settle for merely defining an ellipse in terms of the height and width settings of the Ellipse Tool’s dialog; you can define it like a technical illustrator often wants to: in terms of size and angle?

So it’s about more than merely automating repetitive tasks. It’s also about doing things which can’t be done with the normal feature set. Scripting effectively lets you add your own new “features” to Illustrator. All it takes is an ulterior motive, a little experimentation, and a bit of creativity. See? You don’t have to turn off the right side of your brain, after all.

Which Scripts of James’ Nathaniel Recommends:

  • Cleanup Scripts (zip | html)
  • JET_FixRegColorFromFH.jsx
    When opening a FreeHand file, Illustrator fails to assign AI’s [Registration] swatch to paths and text having FreeHand’s Registration swatch. Instead, it imports FH’s Registration swatch as a process swatch.
  • JET_RemoveSegmentsShorterThan.jsx
    Reduces the number of anchorpoints on selected paths, according to a minimum specified by the user. Removes from each selected PathItem, segments shorter than the measure entered by the user. Useful for certain types of path simplification and cleanup chores, as in imported DXF files.
  • JET_RemoveShortSegment.jsx
    General path simplification. Allows the user to specify the minimum number of segments to be retained. This script removes the shortest segment from each selected PathItem that has more than the number of segments entered by the user.
  • JET_RemoveShortSegmentsUntil.jsx
    General path simplification. Allows the user to specify the number of segments to be left for each path. This script repeatedly removes the shortest segment from each selected PathItem until the number of segments is no more than the number entered by the user.
  • Draw Scripts (zip | html)
  • JET_Centroid.jsx
    Finds the centroid (center of gravity) of selected triangles and other straight-sided multigon paths and draws a user-defined circle at that location. To use, make a selection which includes normal paths. Then call the script.

  • JET_ReplaceWithSymbol.jsx
    Replaces selected items with Instances of a Symbol from the Symbols Panel. The desired Symbol can be defined by its index number (its number of occurrance in the Panel). The document must have at least one Symbol defined. Simply select some objects. Then run the script.


  • Label Scripts (zip | html)
    JET_X_SwatchesLegend.jsx
    Creates a series of labeled squares at the bottom left of the Artboard, each filled with one Swatch in the Swatches Panel. Useful for adding a “color legend” on pages of identity graphics, to specify colors. For each named Swatch in the Swatches Palette, the script draws a square filled with the Swatch color, and creates beside it a PointType object containing the name of the Swatch. The text labels are filled with Registration color. A prompt allows the user to set the desired size of the squares (in points). The label text size is 1/3 the size of the squares.

  • Path Scripts (zip | html)
    (Various scripts)
    The batch of scripts I call PathScripts are those which manipulate paths, anchorPoints and handles. Most of these are my cheezy workarounds for features which FreeHand users take for granted, but which Illustrator still lacks.
  • Selection Scripts (zip | html)
    It’s no secret that Illustrator’s path/point/handle selection interface is just about the most cumbersome of all. In fact, only the most devoted Illustrator-only users deny it. These scripts are mere workarounds for some of the awkward selection chores; but they do make life a little easier in a few common situations.
  • JET_SelectSameLength2ptPaths.jsx
    Selects paths in the document which have 2 points and are the same length as the currently selected 2-point path. Purpose: to select the individual dashes of dashed lines which commonly come into AI from converted DXF files. Useful for removing “hidden lines” from such files.

  • JET_MarqueeDeselectPartials.jsx
    RWhen making marquee selections in Illustrator, all objects crossed or touched by the selection marquee are selected. Unlike most other drawing programs, Illustrator does not provide a Contact Sensitive toggle setting to cause marquee selection to select only objects which are fully enclosed by the marquee. This script deselects paths in the current selection which are only partially selected.

  • JET_MarqueeSelectRest.jsx
    When making marquee selections in Illustrator, all objects crossed or touched by the selection marquee are selected. Unlike most other drawing programs, Illustrator does not provide a Contact Sensitive toggle setting to cause marquee selection to select only objects which are fully enclosed by the marquee. This script finds paths in the current selection which are only partially selected, and adds their unselected points to the selection.
  • Transform scripts (zip | html)
    Transformation Scripts is another category for which I anticipate hacking out additional scripts. One can imagine a wide range of re-iterative transformation routines, applicable at the object/path/points/handles level beyond those already in Illustrtor’s feature set.
  • JET_StackTopToBottom.jsx
    This script re-stacks the selected objects according to their vertical positions, top to bottom. After running the script, the selected object positioned highest on the page will be rearmost; the one lowest on the page will be frontmost. This is mainly useful for correcting the stacking order of individual PointType textFrames in imported CAD drawings before concatenating them into a single AreaType textFrame, as in a parts list.

Gitmo In Limbo (Wash Post)

Wednesday, February 18th, 2009

[Editor’s note: While President Obama has committed to closing the military prison at Guantanamo Bay within a year, it’s hard to know what to do with some of the prisoners.

This graphic reminds me of the old adage about people being able to deal only 5±2 things at once. There are almost 200 countries in the world. It’s hard to keep track of them all. But there are only 7 continents, and those are easy to remember because it fits the 5±2 rule. To instead of listing out all those countries alphabetically or ordered by number of detainees, sometimes it is more useful to group them first by geographic “region”. Note: Washington Post style views the Middle East as a separate continent-level region from Asia. Thank also to Laris for formulating these ideas with me.

Why wasn’t this information shown on a map instead of listed in a structured table with charting? For several reasons: Geography, while useful as an metaphorical principle, does not function as a the most important thematic (organizing) principle in the distribution. We know nothing about where the individual detainees are from in each country so we would have had to create a by country choropleth map which would have given a false importance to larger countries like China, and been hard to show the three thematic subcategories. We could have placed the thematic symbols (1 for each detainee and color coded to their status, like in the table) on each country, but then it would have been harder to compare each country between countries for number and type of detainee as each entry would not have shared a common baseline. A table with charting accomplishes our goals: We list the countries sorted by number of detainees and grouped by continent. This serves the same function as a map would have in terms of giving in indication as to where each country is (metaphorical principle, reminding readers of the country’s location in the network topology). And we get to easily compare the quantities and thematic types associated with those countries at a glance because of the common chart axis baseline.

What exactly are continents anyhow? Geology seems to have moved on to plate techtonics with 20-some major plates that often meet or rip apart the middle of “continents”, but continents remain popular I think exactly because of the 5±2 rule.

Some cartographers are moving beyond the physical geography “continents” into top-level cultural regions. Allan Cartography’s Raven world map does exactly this, take a look. The same holds true for any large set of thematic data. Find the trends, group them together, and use that hierarchy (topology) as an access metaphor. And remember geography doesn’t always need to mean map. Your users will thank you.]

Republished from The Washington Post.
Orginally published: 16 February 2009.
Reporting by Julie Tate.

About a third of the detainees held at Guantanamo are either facing charges or approved for release. The rest are judged to be enemy combatants, and it is unclear whether they will be prosecuted, be released or continue to be held.


RELATED ARTICLE:
4 Cases Illustrate Guantanamo Quandaries
Administration Must Decide Fate of Often-Flawed Proceedings, Often-Dangerous Prisoners

Washington Post Staff Writer
Monday, February 16, 2009; Page A01

In their summary of evidence against Mohammed Sulaymon Barre, a Somali detained at Guantanamo Bay, military investigators allege that he spent several years at Osama bin Laden’s compound in Sudan. But other military documents place him in Pakistan during the same period.

One hearing at Guantanamo cited his employment for a money-transfer company with links to terrorism financing. Another file drops any mention of such links.

Barre is one of approximately 245 detainees at the military prison in Cuba whose fate the Obama administration must decide in coming months. Teams of government lawyers are sorting through complex, and often flawed, case histories as they work toward President Obama’s commitment to close the facility within a year.

Much of the government’s evidence remains classified, but documents in Barre’s case, and a handful of others, underscore the daunting legal, diplomatic, security and political challenges.

As officials try to decide who can be released and who can be charged, they face a series of murky questions: what to do when the evidence is contradictory or tainted by allegations of torture; whether to press charges in military or federal court; what to do if prisoners are deemed dangerous but there is little or no evidence against them that would stand up in court; and where to send prisoners who might be killed or tortured if they are returned home.

Answering those questions, said current and former officials, is a massive undertaking that has been hampered by a lack of cooperation among agencies and by records that are physically scattered and lacking key details.

Continue reading at Washington Post . . .

INTERACTIVE: Inside Obama’s West Wing (Kelso via Wash Post)

Friday, January 30th, 2009

[Editor's note: Please enjoy this interactive featuring a floor plan of the West Wing showing who sits where. Kudos to Laura Stanton and Karen Yourish for leading this project. I advised on the coding.]

Republished from The Washington Post.
Original published 29 January 2009.

They say that proximity to power is power. And it comes to follow that the most coveted offices in Washington are those in the West Wing of the White House. Some, like press secretary Robert Gibbs’s office, are spacious. Others are cubbyholes. But they are all in the same building as the president’s Oval Office. Explore the interactive graphic below for an insider’s guide to who’s sitting where in President Obama’s West Wing:

Screenshots below. View interactive version.

GRAPHIC: By Laura Stanton, Nathaniel V. Kelso, Philip Rucker, Al Kamen and Karen Yourish – The Washington Post

Faces in the Crowd (Kelso via Wash Post)

Monday, January 26th, 2009

[Editor's note: This in an interactive version of an annotated photo in the print edition. I did a little programming, Christina, Karen, and Patterson did the heavy lifting. The version below shows all the faces but the user starts off with the original image to explore.]

Republished from The Washington Post. Tuesday Jan. 20, 2009.

Roll over the photo to see who was at the Capitol when Barack Obama was sworn in as the 44th president of the United States:

Screenshot below. View original interactive.

By Nathaniel Vaughn Kelso, Cristina Rivero, Patterson Clark and Karen Yourish – The Washington Post.

INTERACTIVE: Obama’s Cabinet Picks (Kelso via Wash Post)

Monday, December 22nd, 2008

[Editor's note: I created this interactive with Karen Yourish and Laura Stanton for the Dec. 21 edition of the Washington Post. President-elect Barack Obama completed his Cabinet picks just 7 weeks after his election on November 4th, 2008. Explore who he's picked for twenty government agency compare to previous administrations. The little human shapes on the timeline are interactive, as well as the Obama cabinet photo collage, and the week tabs.]

Republished from Washington Post.

NOTE: Barack Obama won the Nov. 4, 2008, election’s popular vote. He will be inaugurated as the 44th president on Jan. 20. As both of these days fall on a Tuesday, “weeks” are calculated as Wednesday through Tuesday.

NOTE: Some agency positions have two nominees per president if the first nominee rescinded his name and another was nominated in his place.

SOURCE: Staff Reports | GRAPHIC: Karen Yourish, Laura Stanton and Nathaniel Vaughn Kelso, The Washington Post.

First posted: 20 December 2008. Last updated: 21 December 2008.

INTERACTIVE MAP: Explore D.C.’s Charter Schools (Kelso via Wash Post)

Sunday, December 14th, 2008

[Editor’s note: I created this Flash-based Google Mashup to accompany an investigative piece (1 | 2 | 3) about the Washington, D.C. Public Charter School system in Sunday’s Washington Post newspaper. Map markers can be turned on and off with check boxes or by using data range sliders to drill in on which schools are performing how well. Clicking on map markers brings up a little info window with some facts and figures about that school, and links to full database entry and comment areas. While publishing this interactive in Flash format may hinder viewing by some viewers, it sure is nice not having to program around HTML rendering funk!]

Republished from The Washington Post.

Use the map below to learn about every charter school in The District. The default view displays all 55 schools for which test score data is available; you can also map the schools with no data, as well as sites offering early childhood and adult education and GED programs. To narrow your search, click the buttons to hide or display school types, or move the sliders directly to the left of the map to display schools by test performance. A full list of all charter schools is also available.

Interact with the original. Downsized screenshot below.

SOURCES: The District of Columbia, individual schools and Washington Post research and analysis.

INTERACTIVE CREDITS: Nathaniel Vaughn-Kelso – The Washington Post, Sarah Sampsel – washingtonpost.com.

Gunmen Attack Tourist Sites, Kill Dozens in India (Kelso via TWP)

Tuesday, December 2nd, 2008
[Editor's note: Miss last week's events in Mumbai? Check out this mashup I did for the Post. It went up Wednesday night and was updated continuously through the conclusion of the attacks Saturday.]
Republished from The Washington Post.

Locator map

At least 174 people were killed and hundreds injured during a series of coordinated attacks in Mumbai, India that started November 26, 2008. The synchronized attacks struck at the heart of the city’s commercial district. The three-day siege left several Americans dead, including a father and daughter from Virginia and a young Israeli American rabbi and his wife.

Click on the map markers below for more information.

View Larger Map

Reporting by Rama Lakshmi; Graphic by Nathaniel Vaughn Kelso and Larry Nista — The Washington Post.

Picks and Possibilities: Obama’s Cabinet (Kelso)

Monday, November 24th, 2008

[Editor's note: This interactive which I co-created for the Washington Post keeps tack of president elect Obama's major cabinet appointees with a fun, game-like interface. See who's in the running for each position, Obama's rumored pick, and read bios for officially announced nominees. Many thanks to Aly!]

View original at washingtonpost.com.

Graphic by: Karen Yourish, Laura Stanton and Nathaniel Vaughn Kelso, The Washington Post

China Pictures 1st (Kelso)

Thursday, November 6th, 2008

I vacationed in China for 12 days at the end of October 2008 and returned just in time to participate in Obama’s smashing victory over McCain in the US presidential contest.

Here is a quick selection of my photos from Shanghai, West Lake / Huang Zhou, Jing de Zhen, Huang Shan / Yellow Mountains, and Beijing / Great Wall. I’ll be posting more later with some trip discussion and photo captions.

To see the photos blown up, click on the photo thumbnail below, and then click on the next page’s thumbnail to see the larger resolution image. Sorry, WordPress is lame about this.

Wow, How Fast Time Flies (Kelso)

Monday, October 20th, 2008

It’s been a year since I launched my site to promote some of the scripting (programming) work I was doing and to list useful plugins for Adobe Illustrator other cartographers and graphic designers. I launched my blog soon after to note websites, graphics, and concepts that attracted my attention. It’s proven a useful notepad to organize these for my reference and to share with others.

Some stats to geek out with:

All-time most popular blog posts:
Meet Toni Mair — Terrain Artist Extraordinaire

Dorling Cartograms – Carbon Atlas – SND Awards

Recent top blog posts:
Anything iPhone and GPS
GPS Kit – New software app for iPhone 3G (Kelso)

iPhone GPS with iTrail and RunKeeper (Kelso)

Mapping and GPS on the iPhone, Part 2

Mapping and GPS on the iPhone

Total blog pageviews: 60,000 since Nov. 29th, 2007.

Total site pageviews (including blog): 87,000 since Oct. 8th, 2007.

Site visitors are from all around the world including 154 countries and all 50 states (please excuse the terrible Google maps. Darker colors = more visitors. “City” views not comprehensive.):

Most visitors use Firefox or Safari (only 25% use Internet Explorer). Windows users account for 70% with most the rest on the Mac, though a couple Wii, Playstation, and iPhone users. Almost everyone has at least a 17″ monitor with over 75% having a larger monitor size up to 1920 x 1200. Most everyone has some version of Flash Player 9 installed. Only 2% are on dialup (though 28% do not list their connection speed). All these stats are from Google Analytics, a very awesome free tool that Google uses to pump their ad sales.