All Posts in data

May 9, 2014 - Comments Off on The MechCast 302: Internet Privacy

The MechCast 302: Internet Privacy

002_internet_privacy_blog_img

On this episode of The MechCast, Michael (our host), Tope, Dhruv, George, Dave, & Joe discuss privacy on the internet, how safe we really are while surfing the web, and how we as individuals feel about our own digital footprint.

Related Links:

Music:

Published by: antonioortiz in The Mechcast
Tags: , , ,

March 21, 2014 - Comments Off on Marketing the Meme

Marketing the Meme

480153805-2

If you blinked, you may have missed that for the moment, it's all about health-related wearables. Generation X not only wants to, but firmly believes that we can live forever. Ask Ray Kurzweil, an elder statesman of futurism and author of The Age of Spiritual Machines, and The Singularity is Near, with the help of our machine overlords and a nice regimen of pills, we'll soon be downloading our brain into the Universal Mind. Health wearables, in their current state, are the perfect snake oil to market to a generation hell-bent on avoiding purgatory. It's Terminator X. And it's not a matter of if, but when.

Data is King - the device is just the royal messenger.

If you asked me two minutes ago, I would have said that one way Apple could save itself from inevitable obscurity (high-noon is coming for Apple under the marketing machine of every other tech company that wants to destroy them for the simple reason that Steve Jobs existed and pissed them all off) was not even to bother releasing a digital watch. They needed something "bigger," but still in the spirit of a wearable. A watch or wearable for checking email, or knowing that your mate is drunk texting you at 2am (in my opinion) was already existing quite comfortably in the realm of Samsung and a dozen other crowdsourced devices. However after I find this condition disturbing, the doctor gave me a discrete and clever device that is plugged into the cloud by transmitting my health information and data in real time to be compared against the rest of the planet - well there's something that I can get behind. All these information and data can be effectively managed with the help of access request management services by TOOLS4EVERSmart, predictive medicine and fitness - imagine how much that would help our race to fill up the overcrowded planet even quicker, if you are trying to lose overweight try out leptoconnect.

Wearables DevCon is happening in San Francisco in March, so it seems that all Apple needs to do is fart an idea into the wind (Note: I'm not insinuating that Apple invented the wearable industry, it's just that Apple has been teasing the idea of a watch for so long that they've become the boy that cried werewolf), and the world's innovators now proceed to leapfrog them rather than wait to build on their platforms. It makes for a real mess when it comes to products. Too much competition eventually becomes unregulated noise, and too many unregulated products rushing to market will kill the market before it has a chance to blossom.

I discovered this on a recent trip to Best Buy. I was there to observe a business model rolling under itself - a library of tech that is filled with browsers but very few buyers. It turns out that Best Buy has an entire aisle dedicated to health wearables - each device more specialized and useless than the next. Nothing on the shelf fully grasps the concept of a health ecosystem, because they are the shoddy output of mindless corporate meetings called to simply "Market to the Meme." Learn more about resurge. 

health-devices

If Apple gets the health wearable right, they could dominate, but the domination will come from the thoughtful integration of the device into iCloud. Google had a health cloud product (Google Health) many years ago, but unexpectedly shut it down due to a shift in the wind, like many of their other products. Think of how ahead of the game they could have been with the release of Android Wear. Right now, some executive who made that decision is hiding under their hydroponic desk chamber - because they could have been light years ahead of Apple. With Healthcare like every other industry, Data is King - the device is just the royal messenger. When looking to improve our health and raise the bar of your health app goals, check here for the best test booster.

So a successful launch of iWatch (don't get me started about how perfect that name is for a device which keeps an "eye on your health and well-being") would require the following:

  • Data infrastructure - The means to record personal Health data safely and securely. iCloud is already in place for that.
  • Automatic sync - A device which reports automatically to the cloud - we're all too lazy to sync our devices. Ask Nike how many people sync their Fuelband a month after putting it on.
  • Price - The price point has to be fair for this as well, because the more people using it the better. It should be released as a discrete necessity, with the basics included like heart monitoring, steps taken per day, and calories burned.
  • Open source development - A means to use the data and present info graphics and tools for individuals. Apple got it right with iOS and the App Store. Not everyone will be a runner, but a running app, a weightlifting app tracking reps, weight lifted, a pill taking app that reminds you when to take them, etc. -- all will be part of the health ecosystem with the right developers making money for their hard work.

Due to their formidable marketing prowess, the first loud shot has been fired by Apple in the healthcare and fitness revolution with the announcement of Healthbook. The only question is how thoughtful, nimble and careful they can be anymore when the snarling wolves are at the back door of their spaceship -- and they're all wearing Samsung watches on their paws... Integrated neatly into their own proprietary healthcare ecosystem.

May 11, 2012 - Comments Off on Building new sites… with some old data

Building new sites… with some old data

The files are IN the computer!

When building a new site for a client, migrating data from an old site or system can be a daunting task. There are several excellent modules such as feeds_import which can help move data that is already online in one form or another via rss/xml and so on. Sometimes there is content which needs to get onto the site that lives off-line or for other reasons isn't compatible with an existing import module- for that you can write some code to help out.

For one project we had to import a list of users which came from a CSV export from a spreadsheet. We really just needed users in the system to be able to assign them as authors of content. The following code is what we used to read in the CSV file and create the users. Any CCK field can be populated with this, here we are adding First, Middle and Last name fields before submitting.
This script relies on Drush and the Forms API to bootstrap drupal and feed it the form submission.

As with all things Drupal, there are more ways to accomplish a task than there are tasks to accomplish.

/**
* Import users via a CSV
*
*/
// Initialize a counter to track the number of users processed
$i = 0;
// Check for the .csv file in the particular directory. We create a <site>_util directory
// to put these sorts of scripts.
if (($handle = fopen("./sites/all/modules/custom/site_util/new-users.csv", "r")) !== FALSE) {
// While there are rows of data in the file, keep looping through.
while (($data = fgetcsv($handle, 0, "," )) !== FALSE) {
// Read in and sanitize data from the CSV file.
// Here we assign each column to a variable.
$fname = utf8_encode(trim($data[0]));
$mname = utf8_encode(trim($data[1]));
$lname = utf8_encode(trim($data[2]));
$email = trim($data[3]);
// Create random 8 character password.
$pass = user_password();

// Initialize the $form_state array which will be passed to drupal_form_submit.
$form_state = array();

// Tell drupal_form_submit what operation this form is performing
$form_state['values']['op'] = t('Create new account');

// Drupal 7 requires this second password field to create users.
$form_state['values']['pass']['pass1'] = $pass;
$form_state['values']['pass']['pass2'] = $pass;

// Populate the name and email elements of $form_state.
$form_state['values']['field_profile_fname']['und'][0]['value'] = $fname;
$form_state['values']['field_profile_mname']['und'][0]['value'] = $mname;
$form_state['values']['field_profile_lname']['und'][0]['value'] = $lname;
$form_state['values']['mail'] = $email;

// Build a human readable Username. We are using email as the primary login.
// Since the users do not always have a middle name we will use a
// a ternary operation to prevent adding a second space between the
// first and last name.
$form_state['values']['name'] = $fname . ' ' . ($mname ? $mname . ' ' : '') . $lname;

// Since we're running on the command line, we'll add some status information.
print('Adding: ' . $form_state['values']['name']. "n");

// Finally, we submit the built $form_state array to Drupal's user_register_form.
drupal_form_submit('user_register_form', $form_state);

// Increment the counter.
$i++;
}
}
print("Processed: " . $i . " users.");

Save this code to a file and then run execute it with drush:
% drush scr script.php

Thats it. It should import your users and report at the end.
You'll need to make sure the data going in is sensible, valid emails, names etc.

Published by: chazcheadle in The Programming Mechanism
Tags: , , , ,