Thursday, December 3, 2015

Automating Password Management

I have a password that I don't particularly need to be super secret, but I don't really want to memorize another password either.

I  put together a script that will automatically copy the password to the clipboard (essentially a Control + C command of text). I threw this into a project folder and I can run the script quickly by double clicking it.

For the sake of slight security, I named the file something boring and unrelated.

Code

from Tkinter import Tk
r = Tk()
r.withdraw()
r.clipboard_clear()
r.clipboard_append('password')
r.destroy()


Setup

  • Install Python if it's not already installed
  • Copy the code above
  • Paste into Notepad or another text editor
  • Replace the highlighted password with your own password
  • Save as type: All Files (*.*)
  • File Name: "SomeFileName.py"
    • Wrapping the filename in quotes ensures the file type will be set to .py - a python script file
  • Double click on the file to run it. A Python window will briefly open and close automatically
  • Navigate to a text area and hit Ctrl+V or use some other paste command

Monday, November 30, 2015

FSU - UF Football Rivalry Stats

Rivalry week is behind us and the trash talk is still going strong. RIP in peace my news feed - and my team won.

There's a bit of chatter about the all-time series record that they are indeed winning, but I wanted to look a bit further into it.

It turns out that, they aren't just leading the stats, they are pretty damn far ahead. However, the bulk of this comes from the early days of football at Florida State - but is it ridiculous to quote statistics from the 1950s and 60's? I'd definitely say, "Yes and no."

I don't mean to be any more of a revisionist by asking this question than say a team whose only score was produced by the defense. Let's just look at some numbers.


I've shown my work in case you want to review. Holler if I missed anything - I haven't double checked it.

If we try to identify a "Current Era" to measure the teams against each other, I found that the two teams are unbelievably close competitors.

Win/Loss Records


Looking at the all-time standings, UF took an early lead, and jumped ahead in two streaks in 1968-75, and again in 1981-86. Across all time, UF is in a commanding lead, sitting 10 wins ahead of FSU with a record of 34 wins, 24 losses, 2 ties, and one Choke at Doak.

Since I was born in '83, most this sounds pretty thin - especially coming from kids who weren't even alive when the Simpsons was a well established cult classic.

Let's try to start in somewhat more recent times, like from the beginning of the Bobby Bowden era, in 1976.


Despite 4 decent runs on both sides, FSU leads the series by 3 wins since 1976.

To be somewhat fair, let's pick another circumstance to change balance this investigation. I'll try again at the beginning of the Spurrier era, starting in 1990 - at least it's closer to the birth date of most college kids now.


No change. FSU still leads the series by 3 games.

Yeah, I agree it's bullshit to discount 15 losses and a tie, but we're just examining numbers here. Also, I don't see how the argument that, "games played in the 1950s and '60s are more relevant," holds any more weight than, "current history is more relevant to reality."

Let's take at another metric to see what's going on across multiple games.

Running Score Distribution

Example: Starting at 0, if UF wins with a score of 14-7, UF is awarded 7 points, and FSU begins with -7 points.



Across all time, FSU is just dominated by UF who ran up a score of 200 additional points over FSU - mainly between the first game in 1958 and the year before Bobby Bowden arrived. Good job, our collective grandparents who probably weren't associated with either school!

Let's see what has happened in more recent history.


Looking at the Bowden era to present, the overall score between the two teams puts UF in the lead by 3 points. THREE!

How about the Spurrier era to present?


It's a goddamn tie! Since 1990, FSU and UF have scored the same amount of offsetting points.

Someone please check my work. That's weird.

Conclusion

Okay, I admit rivalry isn't rivalry without context of history. I'm confident that the next few seasons are looking fierce for my Alma mater, and I don't doubt the ability to overcome those very early defects in the coming years. However, it's fair to say both teams have had some incredibly strong runs in recent history, and these quick illustrations have a surprising degree of balance.

Sunday, November 29, 2015

Color Development: Tools and Methods

I accidentally went nuts writing about the basics of digital color, so I decided to make it a separate article.  Check that out:
Color Development: Digital Color Basics
In this article, I'll list a few tools I use for color development, and discuss how I like to brew and develop colors in graphic design and cartography environments.

Color Brewing

These are some of my favorite tools to build and tune color sets.

Browser Utilities

ColorPick Eyedropper



ColorPick Eyedropper is a Chrome extension that enables you to quickly grab a color from a Web page. There's even a rad little magnifying visualization that helps zero in on the exact pixel you need.



Desktop Utilities

ColorPic


ColorPic is a great desktop tool to help snag Hex, HSV, RGB, CMYK, values, and save your own custom groups of color. There are even sliders, and grids to use to help build or tune your colors if necessary.

ColorOracle

ColorOracle is a fantastic color deficiency simulator. It's a quick way to preview your entire monitor view for any potential issues with color patterns which may be difficult to read for those with color-vision impairments. No exporting


Saturday, November 28, 2015

14 Solid Resume Writing Tips

I have been working on my own resume for over a decade. It was clunky, it never changed that much, it was boring, and hard to read. After asking for some help I realized that there are tons of things to consider to make an effective, eye-catching summary of your professional skills.

After numerous redesigns and tuning sessions I started having fun with the process - in a really nerdy, computer-programming sort of way (see the rest of this blog). In the past couple of years I started lending tips to others to help get their thoughts organized. I put together this list of the most common suggestions; whether folks are starting from scratch or are just looking for a little polish.

  1. You're Not a Designer - Don't Design Your Own Resume

Are you actually applying to a design job? Awesome. Designing your own unique resume is great practice to show off your skills in layout, organization, white space balance, typeface selection, reading efficiency, color choice, copy writing, audience targeting, graphical tuning, and overall presentation.

Does you dream position have absolutely nothing to do with graphic design? Not sure what some of those terms above mean? That's cool too. Use a template!
This is a great article that goes into more detail about designing a modern resume template 
Leave the design work to actual designers. If you're interesting in building a house, you don't draw up blueprints yourself - you hire an architect. Otherwise, you're going to make a mess.

Homer was not a designer, and he designed an amazingly awful car.
Your resume is filled with great ideas, but it can easily come off as garbage.

A simplistic design will usually suffice; especially for corporate or government jobs. If you're aiming for a smaller organization or for more of a casual submission (entertainment industry, just testing the waters, getting your name out there, etc.) consider venturing into a more sleek and eye-catching template design. Lots of folks don't recommend this route, so be smart about your audience.

Here are some avenues to find free resume templates:
  • There are tons of free templates to download or reference. Be careful of malware if you're literally downloading files
  • Microsoft Word Templates - These often scream "HAY, LOOK AT ME, I USED A TEMPLATE FROM THE MICROSOFT WORD!!!111." Try to avoid these unless they are simple, or you're comfortable with your Word skills to modify the style to make the template your own.

    Especially for positions with a lot of applicants, there's a good chance someone else is using the same MS Word template that you chose. You wouldn't want to show up to the interview wearing the same dress or shit & tie as the intern, so avoid being spotted using the same template as other applicants
  • Buy a template. I don't recommend this unless you really need help, or you need a very polished or specific design. There are tons of free alternatives available to use or reference, though I'm sure there are a few cases where purchasing a template is a good idea

  1. Add- & Categorize Skills

I'm a big fan of the skills section and I often don't see enough items included. A bulleted list is an extremely efficient way of cramming a ton of information about your skill set into the least amount of space possible.

An effective skills section will illustrate what tools you offer to a team. Be sure to list topics that are either directly listed on an advertisement, or which may go above and beyond the advertised KSAs - within reason. Anything additional needs to say, "By the way, you may need this skill too."

DO NOT list Microsoft Word, Outlook, and PowerPoint unless the advertisement asks for it. Most 3rd graders, and almost every mom knows how to use all of those by now. List "Microsoft Office Suite" and leave it at that.

However, Excel and Access are completely different. If you basically know your way around either of those, I'd say they deserve their own bullets. If you know how to do some advanced work with those programs, or if you know how to customize and code macros for them then definitely throw those bits on separate lines.

Make sure you sort your skills across multiple columns to reduce wasted white space and to make skimming/scanning easier for the reader.

Bullets don't require someone to read every word like a paragraph, so highlighting a number of impressive points is incredibly effective. Sorting bullets into categories extends that efficiency by inviting the reader to skim each group individually rather than hiding bulk information in a long narrative paragraph or a disorganized stream of "things." Categorized bullets are much more likely to keep a reader's attention, and will likely create a better vision of you as a multi-threat candidate.

Especially for applicants in the tech industry, bullets are the way to go. Be sure to include the most appropriate match of programming languages, software packages, environments, operating systems, familiar standards and techniques, methodologies, and other types of skills you can offer. Find a balance of being impressive and multi-talented while remaining as concise and articulate as possible. Overwhelming a reader with EVERY technology you have ever heard of can be just as ineffective as omitting it altogether.

An extensive example of categorized skills. I animated
the table boarders here to illustrate the layout
This isn't just for development. If you can summarize and categorize skills in your industry, then do it! Head hunters and automated bot searches will respond accordingly.

  1. Lead With What You're Proud Of

Don't sacrifice your reader's attention on filler content. Put your best, most applicable content at the top of you resume. Anything that's less impressive should generally be moved down the page. Don't be afraid to water down your least impressive points, but have confidence and support your experience properly.

I like to see education first - especially if you have education at- or beyond a bachelors degree. Definitely keep it near the top if your education is in the same industry/field as the job you're applying to.

However, if your field of study isn't particularly relevant to the position, go ahead and move it further down to allow more important and impressive information to be highlighted first.

If your professional experience isn't relevant -- or even if it's non-existent -- then don't waste time and space yammering on about how you were an industry leader at the fry technician's station. Keep it short and put more context in areas that needs to be highlighted. Maybe that's in your Education section, or even your Professional/Social Contributions instead.


  1. No experience? No problem.

This is especially important for recent graduates, or for folks who have jumped into a new industry. If your only experiences are summer fast food sorts of jobs then move the experience section to the bottom of the resume. Don't go into detail about how well you lead the team at Burger King. Employers know what you did there and they don't care; so just mention it was a summer job, include your start/end dates, and leave it at that. There's nothing wrong with it, but it's not what you're aiming for anymore. You're likely shooting for a higher level of employment now.

Save the long-form embellished verbiage from your less relevant positions for your Education or other your most impressive sections. For students, talk about relevant classes or large projects you completed by yourself. Point out relevant lab work. Did you lead a team to get a huge paper completed and you even did the editing to sort everyone's research together? Did you use your academic skills for nerdy personal projects? That's fantastic! Discuss what experience you accrued in extracurricular clubs too.

College is essentially a full time job for 2 or 4+ years. Give it more context than, "I went here." Illustrate how your academic career is relevant to the job position.

Oh, and for those who have jumped ship and started in a new career path, be sure to rewrite the description of your previous responsibilities for your new audience. Your old technical music therapy jargon may not make any sense to that non-profit tech startup you're applying to (true story).

  1. Don't Use Just "One Resume"

No matter how similar various job postings may seem, every advertised position is unique; and your resume should be too. Even if the changes between various resumes are only slightly different, each application should be accompanied by a unique resume.

At the very least, this helps you respond as articulately as possible. Going through the job description and adding or removing content will make your resume that much more effective.

You may choose to have several resume styles: one simplistic conservative style for large organizations, and a more flashy design for more casual submissions. It's important to ensure those two styles never cross, however the content will likely be similar in each.

Dealing with multiple resumes leads to the next important tip: Organization.


  1. Step Up Your E-mail Game

I want to see Gmail, or GTFO
Your.Name@gmail.com is what anyone wants to see, and it's almost always the only acceptable answer.

Obvious exceptions are @ domains from your own website, your university, or another professional-looking site. Yahoo, Juno, AOL, etc. don't cut it anymore.

Do you use something besides Gmail for email anyway? Well, it's about time you switch. Forward your important stuff to Gmail and join the year 2005. Otherwise, just create a Gmail account just for job hunting, and forward everything that arrives in Gmail to your old spam-infested account back in the stone age. Either way, you need a clean email address. bonerman22@aol.com won't do.

While you're at it, lose the inspirational quote, and the graphics. I can smell your cats from here, and your email looks like garbage until the reader accepts your external/attached image.

Don't choose a script font for your signature. Just keep it clean and simple.

[Mr./Ms./Mrs. Contact's Name],

Thanks for speaking with me about the [specific job title] position in the [department/section/program]. Attached is my current resume for that position. [Brief closing].

Best regards,
[Your name, same font, not even italicized]
That's it.

  1. Match Keywords

Is your resume too thin? Are you applying outside of your normal skill set? Maybe neither. Still, it's a good idea to carefully read through the position description and include any matching job requirements that are listed on the advertisement.

Don't go nuts. Find a middle ground of responding to what the call for applicants is asking for without making it look like a straight copy/paste job. There's rarely a candidate that fits 100% of the the KSA's (knowledge, skills, and abilities), but be sure to clearly convey where you skills match the job.

Additionally, use some judgement again: federal jobs, large companies, and head hunters don't have time to look for context, so nearly exact or verbatim phrases are important since they are used as search terms. There are definitely times where using the same language is key to being considered at all.

On the other hand, smaller organizations, or an unsolicited resume submission could use a touch of subtlety. If it's not necessary, use similar phrases instead of exact text from the position description.

  1. Organization

Since you should be working with a unique resume for every job posting (see #5), it's important to remain organized. I prefer to have a folder for all resumes, with a subdirectory for each individual job response. Read my previous article on naming project directories.
Example folder structure:
  • Resumes
    • 2014-05-30 - Company Name - Job Title
    • 2015-02-28 - Other Company - Job Title
    • ...
I also like to save the individual job description in each of these folders for reference before the interview, along with the URL to the job posting (or other information about where I found the ad), as well as a unique cover letter. It can be as simple as copying the position description and URL or advertisement source into a text document.

Using this method will help you quickly pull up a similar resume from the past and use it as a template for a new response.

This will ensure that you're ready to apply to a new position at a moment's notice. Extend this readiness by saving a copy of these resumes to a private Dropbox folder so you'll never be caught off guard - even while traveling.

Save each resume as a Word or OpenOffice document, and export as a PDF when finished.

  1. Make a Web-Based Resume

Not all resumes need to be e-mailed or printed. For more casual uses, create a Web-based resume and send out links to your information. Here's mine as an example:

justinberke.tk is my Web-based resume


Don't provide too much personal information if you're not comfortable with it, but here are a few options to consider from least to most difficult:

  • LinkedIn - A professional social networking site that helps you set up a resume-like bio page for your professional career
  • WordPress - Create a one-page Web site with your professional bio. Use a number of free or affordable purchased templates that look great to organize and stylize your impressive new personal marketing tool
  • FreeNom - Get a free customized URL like YourName.tk and point it to your WordPress or LinkedIn site for easy access.
  • Custom .com URL - For around $10 per year, you can register a customized .com URL, like YourName.com. I prefer 1&1.comnamecheap, or Google Domains for a domain registrar. Point this to your WordPress or LinkedIn site for some more pizzaz
  • Custom HTML/Bootstrap Web Page - Grab a custom Web site template from anywhere on the Web. I recommend getting started with Bootstarp on your own, or grab an awesome free template from Start Bootstrap, Wrap Bootstrap, etc. and begin coding your own Web page.  Combine this option with a free or paid domain and you'll be on fire!
Final note: pick a design that is mobile-compatible. Most folks use a tablet or a smartphone to view things. Make sure it scales well to smaller or tiny screen sizes, or is designed as "mobile first."

  1. Photo or No Photo?

This is a touchy subject. Many will say, "absolutely not," so just like using a highly stylized resume template, carefully consider your audience with this one.

Sometimes it can be a legal issue to deal with a resume that contains a photo since discrimination could become a factor. Some folks report that resumes with photos are immediately disregarded - but I'd imagine that would only happens with very large organizations.

When in doubt, you should probably leave your photo out of the resume.

If you do want to include a photo, understand that it needs to make you stand out and look fantastic. It needs to add some extra value. Don't ever attach a "picture." Attach a "photograph." Are you writing your resume on a napkin with a pencil? No, you're taking the time to craft your best experiences, so take the time and have someone (paid or not) take a headshot.

Adding just any old picture of your dumb face will hurt you more than it will help.

These are all bad portraits.

  1. Bros, go to H&M and get an inexpensive shirt and tie; Ladies, put on an awesome office dress or blouse or whatever is appropriate for the setting you're looking to join
  2. Go out and take a nice portrait. Wait! Before you do it, do a quick search and learn how to take an appropriate portrait
  3. Crop and tune the photo so it looks amazing
These are much better professional portraits - especially
the womens photos. Those are very well done.
The mens photos above are mostly boring.

  1. Output

Export your resume as a PDF to send electronically.  It's clean, easily scalable, easily printable, and it's static, so it can't be accidentally changed or modified.

Never send a Word document (.doc/.docx/.odt) unless specifically asked. A text document is sloppy, and its text can be erased. Some folks are still using outdated software and they may not be able to open a .docx file.

A text document is unfinished. A PDF is a finished product. Even if a text document format is requested, try to send the PDF version along too.

Obviously never send an image file (.jpg/.png/.svg/.ai/etc.). Raster images don't scale well and they're hard to navigate. Image files are even less likely to be opened by a hiring manager than a .docx file. Again, PDF is the way to go.

  1. Objective/Summary/Personal Statement

I say leave this out of the resume and save it for the cover letter. A resume should stand on its own to express your interests and qualifications. Obviously your objective is to get paid, and if you need to summarize your resume then it's too long and it should be rewritten.

Don't duplicate information by summarizing it at the head of the resume. A mission statement is not my ball of matzo either.

Sometimes it's mandatory, and that's fine. I have never seen a mandatory instance in over 10 years of writing these, research how to craft an Objective if you absolutely need to include one.
No: To be gainfully employed... 

Yes: To contribute my experience with [insert specific skills and concepts]...

  1. Don't forget a cover letter

A resume should stand as a brief overview of your career experience and the skills that you bring to the table. Leave the long-winded discussions for the interview, but tie some of these vague bullets to your personality with a cover letter.

I might discuss this more in another article, but a cover letter is a quick way to say hello, explain why the job description was written for you and nobody else, and lastly, to show that you can communicate well.

Just like the resume, the meat of the cover letter's content can be recycled, but each cover letter should be unique to each position for which you are submitting an application. Mention skills and experience that applies to the job posting, and cut anything that's unrelated.

  1. Peer Review

Finally, let someone else take a look at your work and give feedback. It's hard to cut information (believe me - my resume is still way to dense), and it can be even harder to . A second or third set of eyes can really help you identify they best way to market your talent and experience.

The easiest by far is to ask a friend or a colleague. They may be in the same boat as you, but maybe they have some additional experience to offer.

Next, check out /r/resumes. It's a Reddit community of a few thousand folks who can give a quick or thorough review of your resume. Make sure to make a version that strips out your real name  and contact information.

An invaluable resource is your school's career center. Even high school guidance counselors or librarians could give you some great feedback. Colleges are going to be some of the best free resources available since there are programs that are dedicated to bridging the gap between academia and employment. This is full service treatment: templates, content, wording, proofreading, etc.

Lastly, there are paid resources out there that will give you great information, but I've personally never needed to go that route.

Sunday, November 8, 2015

Manual Key-Numbering for Concentrated Map Labeling

I'm working on a map book with a hand full of feature layers across multiple pages. Each page in the map book is displayed at individual scales, so some pages are significantly wider than others; which means that the scale at which annotation is drawn (reference scale) is important to consider.

As an example, I set up some geotagged photo locations from around town:


Pages 3 and 4 aren't too dense, so automatic labeling is acceptable:

Page 1 is another story. Some of the points are too close together to use full labels:


Key numbering would be great for this page since there are areas where double digit numbers could easily be placed, but longer titles would not fit. The user will refer to a lookup table to match the label number with descriptive information. Furthermore, key numbering results in a visually cleaner look. Here's the finalized example:



In other projects I have multiple labeling schemes active (and I have read that multiple instances of key-numbering is a nightmare) so I came up with a workflow to manually create some key-numbering for your ArcMap project with a little sorting in Excel.

Workflow


  • From the properties menu, Export your point layer's attribute table and open it in Excel/Open Office Calc/Google Sheets/etc.
    • Ensure that the Object ID field exports correctly - we will need this in a later step
    • If the Object ID field does not export properly (see below), you may need to add a new field (type = short integer) named ObjectIDs or something similar, and calculate the OBJECTID field values into this new field before your export
The OID field didn't export correctly from ArcMap. 
Object IDs were calculated into a new field (Column D)before exporting from ArcMap
  • Sort your latitude field descending (largest [northernmost] values on top, smallest [southern] values at the end)

  • Add a new field named KeyLabel to record the order of your latitude values and save them as your key-numbering value
  • Calculate =Row()-1 for each record in the dataset (data beginning on row two will have a value of 1. This will be your key numbering label. Optionally, copy these cells and paste in the same place as values to get rid of the formula and preserve the value only
  • Save the spreadsheet, or export it in a format that ArcMap can read (.xls/.txt/etc.). Add it to ArcMap and it will be visible as a standalone table
  • Right click on your point layer and choose Joins and Relates > Join

  • Point to the table we just added, and choose to join based on the OBJECTID field from the layer as well as the table we're joining data from
  • Check the Attribute Table to ensure that the join was successful

  • Right click on your point layer and choose Properties
  • Navigate to the Label tab
  • Enable Labeling, and choose KeyLabel as the Label Field
  • You may need to play around with Placement Properties a bit to get the labels to draw in the best position for your dataset. When necessary, convert your labels to annotation to manually adjust their position

  • Finally, Go back to the spreadsheet and grab the values from the KeyLabel field as well as your point's name field. There are a few ways to display tables in ArcMap as a lookup for your key-numbering in your map. I simply pasted groups of data to text elements below, but you can also add data directly from a spreadsheet, etc.

Monday, August 17, 2015

Higher Quality UTM Zones Map

Until now, an image from the Wikipedia article on the UTM coordinate system has been my go-to UTM Zone reference. It's pretty okay.



I threw together a map that has been a bit more helpful as it shows US counties and some basic hydrography -  mostly from ArcGIS Online layers, and default ArcMap Template data.


Friday, July 24, 2015

Add a Web Mapping Data Service to ArcMap

I have a hole in my current coverage of waterbodies - I need to know the name of a few streams, and the dataset of Rivers doesn't include the stream I need. I don't necessarily want to download and manage another whole dataset of flowing waters. Temporarily referencing a Web mapping service in my ArcMap project would be great.

The best database I am aware of that includes comprehensive waterbody geometry and names is the USGS's National Hydrography Dataset. Thankfully, they do indeed provide a Web mapping service!

Search for a Mapping Service

A quick Google search with the phrase nhd web map returns a direct link to the USGS National Map's map service endpoint:

http://services.nationalmap.gov/arcgis/rest/services/nhd/MapServer

  • Copy this URL from the browser for use in the next section
These Map or Feature Service URLs (referred to as "service endpoints" or simply "endpoints") aren't always so easy to find, so other projects/data services may require more digging. Look for clues in the URL itself such as the /rest/services/ directories, and for minimal styling (basic-looking fonts, colors, lists, etc.).

To link to a specific portion of the map service (for instance a specific layer or layer group within the main service layer), follow some of the links under the Layers list (see below). Copy that specific URL for use in the next step if you would like. Compare the following URL that represents the Waterbody layer which is layer position 11 in the service package:




Add a Service to ArcMap

  1. Click the Add Data button 
  2. Change the Look in category to GIS Servers

  1. Double click on Add ArcGIS Server to launch the Add ArcGIS Server wizard
  2. Accept the default value to simply Use GIS services and click Next
  3. Paste the Server URL that was copied from where you found the chosen service endpont
  4. Leave the User Name and Password blank if the server is open for public use, and click Finish

Adding the Service Layer to an ArcMap Project

  • Hit the Add Data button again if you aren't already there
  • Ensure your Look In category is pointing to GIS Servers, just as we did in the last section
  • Double click on NHD on services.nationalmap
! Note: Slow double click on this element to rename this to "National Hydrography Dataset" or anything else if you don't prefer this title

  • Double click the nhd service layer to add the dataset to your project
! Note: This is a large dataset with that's referencing a ton of layers and information. Depending on the speed of your computer, your network connection, and the size of your existing ArcMap project, it may take some time for the layer to be added to your project.


Structure of the NHD map service. Notice that scale-
dependent drawing is set for a number of layer groups.

Sunday, June 7, 2015

Make New Project Directory

I like to organize photos, videos, GIS projects, and developments projects in separate "project directories." Each project folder has the following format:
YYYY-MM-DD - Description

File Structure Example:
  • [Drive]:\
    • Development
      • 2014-10-04 - Scuba Calculators
      • 2015-06-01 - Make New Project Directory
    • GIS
      • 2012-05-14 - Whatever Project...
        • Shapefiles
        • Exports
        • From Client
        • MXDs
    • Photos
      • 2013-04-05 - Birthday in Midtown
        • Hilights
          • Edited
        • Original
      • ...
    • Videos

This is an easy way to chronologically catalog projects within their respective folders, but I'm lazy, and I hate having to look down at my task bar clock to find out what the date is, and I can't stand typing in that endless date!

Solutions Posted on GitHub

I posted all the scripts I came up with for this on my GitHub page under the Make New Project Directory repo.

Batch File

I originally tried coming up with a Batch file (.bat) to add the folder using the format I wanted. It's easy to make a predefined folder structure using CMD commands, but pulling that date style turned out to be a little tricky, so I looked elsewhere.

Python Script

I came up with a great Python script that will automatically add a folder that's named with the current date followed by XXXXDescriptionXXXX (so I could easily find and rename it further). Just double click the python file and the new project folder is added. Additionally, I repeated the code to add subdirectories for common sub-folders: Exports and Shapefiles for GIS projects; Originals, Highlights, and Edited for photos & video; etc.


Pros:

  • This is great! It works automatically
  • Simple code. It executes in 6 lines.  View the code here

Cons:

  • I quickly realized how awfully tedious it is to have to slow double click to rename, something every time I create a new project. I need some kind of interface to enter a project name, and I haven't had great luck using TkInter yet.
Note: I've heard good things about PyQt for an interface
  • I don't necessarily want those sub-directories for every project

VBScript

My best solution so far was to write a VBScript (.vbs format) to prompt me for a project name AND ask if I want to add those common project sub-folders.






Pros:

  • Most efficient method so far
  • Quick, easy, no renaming
Cons:


  • Slightly longer code (24 lines without comments & line continuation), but it does include some more logic handling. View the code here.
  • This is still generalized, and the "common subdirectories" option is hard coded (i.e. I don't need a Shapefiles directory in a video editing project).
Overall, This VBScript method opens the door to writing a slightly larger executable in Visual Studio with a more dynamic interface to add any kind of project folder - but that moves away from the original requirement of a highly rapid way to add a project folder automatically. I think this nails it.




    Friday, March 27, 2015

    Repair Lat/Long Coordinate Errors on the Fly

    Every once in a while, someone misses a step in processing raw lat/long coordinates. Sometimes data was transferred incorrectly, sometimes the data wasn't available.

    Here's some data I threw together as an example - these are my favorite caving diving sites in Florida:

    ID
    Name
    Latitude
    Longitude
    1Jackson Blue30.790475-85.140083
    2Madison Blue30.48051883.244421
    3Orange Grove30.127215-83.13053
    4Peacock30.122503-83.1324
    5Little River29.996677-82.966328
    6Devil's Eye29.83509-82.69659
    7Devil's Ear29.835297-82.696568
    8Ginnie Spring29.836178-82.700148

    Initial projection of data is missing a location


    Something's wrong. I expected to see Madison Blue just north of that group of three points. (some of those spots are springs that are within a few hundred yards of each other.

    ! When projecting data, immediately zoom to that layer, or hit the Full Extent button  to ensure that all points were plotted properly.
    ArcMap's Zoom to Full Extent tool
    After I zoomed to the full extent of the data, I realized what must be wrong with the data (see below). Obviously there's a Longitude value that's missing its negative sign because I haven't been diving in India/Tibet before.

    Zoom to full extent to check for mis-projected data.
    A few quick tips:

    • Locations on the same latitude, but on the other side of the world are probably missing or adding a negative sign
    • Points off the coast of Nigeria/Ghana/Gabon, down under of Africa's west coast are probably inheriting a Null or erroneous value, so they're defaulting to the coordinate (0, 0).



    • After zooming to the full extent of a map, use the Select Features tool to select those incorrect locations. In the Attribute Table, choose Show selected Records to take a look at the incorrect data.


    Fix the Data

    1. Start an Edit Session on that layer in question
    2. Select the erroneous site. Mine is ID = 2, or Name = Madison Blue
    3. From the Editor toolbar, choose the Sketch Properties button to open the Edit Sketch Properties window
    4. Add a negative in front of the selected X value and press Enter or click Finish Sketch to apply the update
    1. Save and Stop Editing
    That's it! Piece of cake..

    Corrected data plot

    Tuesday, March 24, 2015

    Color Development: Digital Color Basics

    I intended to just write about how to create colors and suggest some cool tools I've found, but this got out of control. Check out the next article:

    Color Development: Tools and Methods

    There are various ways of building colors for a project or symbol. For general, rapid selection, users are often offered a basic color palette to select a color:

    Default color palette from ArcMap

    Color palette from Word

    Even MS Paint offers a few basic colors
    Notice that each of these provide an option to edit the color further.

    Color Values

    Colors commonly have names: like Black, White, Red, Orange, Yellow, Green, Blue, Purple, Cyan, Magenta, Olive Drab, etc.
    ! Specifics aside, Black, White, and shades of grays are referred to as colors here
    Various environments like CSS, and HTML accept some reserved names to act as color values, however those names correspond to very specific numeric values (discussed below), and can be easily referenced on lists like this one. A color isn't "like red" to a computer. It's Red, or it's not.

    In the world of coding, there's a need to describe color in a more articulate way than just names. Due to the diverse nature of how light acts (See Further Reading, at the end of this article), there are also a number of different methods that programmers and graphic artists use to build and digitally represent color. Although the various methods may describe a color value differently, they are basically just providing a group of three or more numerical values that act as measurements of various criteria that go into building a representation of color. There are four types of units you may expect to see in these groupings:
    • Percentage - values from 0 to 100%
    • 8-bit - Values from 0 to 255
    • Hex - Values from 00 to FF
      • As in 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 11, 12, etc.
    • Degrees - Values from 0 to 360º
    Zero will always equal zero in any of the first three modes, but the "full" value values will be either 100%, 255, or FF. Those three are all equal values, written in different base units; in the same way that a measurement of 10 centimeters  is 100% of 3.93701 inches.

    I'll get to degrees later in HSV/HSL.

    Color Models

    RGB

    RGB Selector in ArcMap

    The RGB triad stands for Red, Green, and Blue. Colors in this model are altered by adding or subtracting values in for any of the three primary color channels. As an "additive model," greater values result in brighter color instances, and lower values result in darker colors. This is based on a model of emitted light, where mixing red, green, and blue light produce the color white.

    Users can adjust the sliders in this interface to control values of each of these channels between values of 0 and 255; where 0 = no value, and 255 = the full value of a given channel.

    Alternatively, users can type a number they have in mind - this is particularly helpful when one wants to jump between increments of a values when searching for a color to use (e.g. changing the red value from 10, to 20, to 30, using the keyboard's number pad).

    Color values are read as (#, #, #) or 
    (Red valueGreen valueBlue value). Since the RGB model is 24-bit (16.7 million possible color combinations), the values in each of the three channels will be some combination between 0 and 255.

    As the example above illustrates, to build the color Red, tune the Red channel all the way up to 255, and leave Green and Blue channels at 0 since there should be no other color in Red but red. Done. Aside from various settings on your personal monitor, this is the standard, globally accepted, fullest possible value of Red.

    Mixing two of the primary colors, Red, Green, or Blue produces
    the "additive secondary" colors, Cyan, Magenta, and Yellow.
    Mixing all three primary colors produces White.


    The value (0, 0, 0) produces Black (the absence of light), and (255, 255, 255) produces White. Shades of gray are produced by matching all three values from (1, 1, 1) (darkest gray but not Black) to (254, 254. 254) (lightest gray but not White).



    Back to our example of building the color Red, adding some value to the Green or Blue channels will yield some other color that may look reddish, but it isn't Red.

    Additonally, the ArcMap interface gives you hints as to what other colors can be created from the current settings. With Red at 255, adjusting the Green channel will produces shades of red, through orange, and finally arriving at Yellow. Alternatively, adjusting the Blue channel will move through shades of reds and pinks and finally arrive at Magenta.

    This is a good model to use to begin learning how to mix colors, but it's not my preferred model to use because it's tricky to imagine how to add a little red or remove a little green to target your preferred color.

    CMYK

    CMYK is a subtractive color model, used most often when printing is involved as an output medium. Pigments and inks absorb light (as opposed to how RGB works to emulate emitted light), so this model helps printers create the correct color with their ink print heads, as opposed to a computer monitor's LED pixels.

    CMYK stands for Cyan-Magenta-Yellow-Key, where Key represents a black ink head. Black is used in printers as an efficient and controlled way to provide shadows, dark values, and black text to the printed material.

    Just like mixing color with paint (where light is absorbed and the remaining wavelengths provide the observer perceived color), the CMYK model begins with the color white. Value is added to the channels, and lightness is removed. So zero values are White, and full values in all channels produce Black. Additionally, a full value in the Key channel also produces Black, regardless of the settings in the CMY channels.

    Notice that the secondary colors in the RGB model produce Cyan, Magenta, and Yellow. Conversely, mixing two primary colors in the CMYK model will produce Red, Green, and Blue.

    This is also not my favorite model to use to produce color, and it's generally just a pain in my ass when I'm printing large format maps.

    HSV / HSL / HSVa / HSLa

    HSV dialog in ArcMap

    HSV selectors in Gimp, adjacent to RGB selectors
    with the Hex code value, below

    HSLa Selectors in Inkscape

    These triads stand for Hue-Saturation-Value, and  Hue-Saturation-Lightness. The following "a" stands for Alpha, which is a metric of transparency. Sometimes this is included as a channel, sometimes it isn't. It's very important to recognize whether or not it's included. If you don't want to bother, make sure it is set to 100%, or 255, or FF.

    This model is a bit tricky, so let's break it down.

    Hue can be though of as the root color you're looking for on the color wheel: either a reddish, or a blueish, or a yellowish color, etc. The wheel starts at 0º, and continues through oranges, yellows, greens, blues etc, and eventually ends back at red at 360º; which also = 0º, but that's okay because both values are the same red.

    A color wheel with 0° and 360° at the 12:00 position


    Next, Saturation describes how muted gray (lack of color) or vibrant (fully colored) a color should be. This is usually a percentage, where 0 means no color is present and 100% represents the full colored potential of a color.

    Examples of saturation gradients for several hues,
    which correspond to the color wheel, above
    ! Note that the units can change between software packages. Inkscape uses 8-bit values (numbers 0-255) for each, HSLa channel. So a Hue value of 255 will correlate to 360° on the color wheel, and a 255 in the Saturation channel is equivalent to 100% saturation.

    If you are building colors that are way off, you may need to check your units and convert when necessary.
    Finally, Value and Lightness and are.. Also a bit tricky. Go ahead and read about the differences over on Wikipedia. Essentially, this component controls how light or dark a color will be.

    Zero values in both HSV and HSL produce the color Black, regardless of Hue or Saturation settings.

    The main difference between Value and Lightness is that the highest Value setting produces a fully saturated color (see the Saturation illustration above, and the ArcMap HSV selector below), and



    the highest Lightness setting will produce a pure White color (see the Inkscape HSL selector below). A fully saturated color using HSL will have a Lightness value of 50% - or 128 (as Inkscape uses 8-bit values for each channel).


    Hex

    I didn't really touch on Hex, other than that it is another method of preserving a value of color. There's not much to it. It essentially is just a concatenation of the three or more channels in the fewest logical number of characters.

    Short answer: Hexadecimal notation throws a couple of letters after the number 9 so each significant figure can be one of 16 possible values:

    0 1 2 3 4 5 6 7 8  9       F
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

    Hex usually stands for RRGGBB, and sometimes for RRGGBBAA (for Alpha).

    To find the Hex value of Red using the common six-digit RRGGBB method, first find the RGB value of Red:

      (255, 0, 0)

    Then convert each value to its hex equivalent:

    (FF, 00, 00)

    Finally, remove the formatting, and stick the three values together:

    FF0000
    123456

    For Inkscape and the few other examples of hex RGBa values, just throw another set of F's on the end. Here, we'll have a fully opaque value of Red:

    FF0000FF
    12345678

    HTML & CSS

    There are two ways to write hex color values in CSS and HTML.

    There's the long way (again, using Red as an example):

    #FF0000

    And when all three RGB channels use doubled digits for their channel, you can use a 3-digit format:

    #F00

    Additional examples:

    #112233 = #123
    #00FF00 = #0F0
    #333333 = #333

    Further Reading

    The physics of light are fascinating. I learned a lot about the subject in my various Remote Sensing courses in grad school, and in the practice of GIS and graphic design over the years. There are plenty of other great resources to use on these matters. Here are a few search terms to consider:
    • Emitted vs. Reflected light
    • Additive vs. Subtractive color
    • Color models
    • Primary color of light and pigment
    • Light vs. Pigments
    • Pigment vs. Dye
    • Blackbody radiators
    • Color theory