By Jon Peck, [email protected]
Clone this repository somewhere local.
I've included a Drupal VM environment which, with light configuration, should work. See their Quick Start Guide first to make sure you have everything you need.
Then, edit config.yml and change your local_path to wherever you've cloned this repository:
local_path: ~/projects/drupal_importioOnce all the requirements are fulfilled:
vagrant up- Login - http://drupal-importio.dev/user/login - username "admin", password "admin"
- http://drupal-importio.dev/import
- Click "California School Ratings"
- Click Import
- Upper-left hand corner - HOME > Flush All Caches
Want to use the command-line?
composer install
./vendor/bin/drush @drupal-importio.drupal-importio.dev statusWant to be sure that everything is configured the way it was in the presentation?
./vendor/bin/drush @drupal-importio.drupal-importio.dev -y fra
./vendor/bin/drush @drupal-importio.drupal-importio.dev cc all- Go to New "Magic".
- Use URL: http://school-ratings.com/schoolRatings.php?zipOrCity=94606&schName=&lastOB=distance&qty=64&searchRadius=50&orderBy=rank&dir=
- Click "Get API"
- How would you like to use this API? Bulk Extract
http://school-ratings.com/schoolRatings.php?zipOrCity=94606&schName=&lastOB=distance&qty=64&searchRadius=50&orderBy=rank&dir=
http://school-ratings.com/schoolRatings.php?zipOrCity=94606&schName=&lastOB=rank&qty=64&searchRadius=50&startAt=64&orderBy=rank&dir=
http://school-ratings.com/schoolRatings.php?zipOrCity=94606&schName=&lastOB=rank&qty=64&searchRadius=50&startAt=128&orderBy=rank&dir=
http://school-ratings.com/schoolRatings.php?zipOrCity=94606&schName=&lastOB=rank&qty=64&searchRadius=50&startAt=192&orderBy=rank&dir=
http://school-ratings.com/schoolRatings.php?zipOrCity=94606&schName=&lastOB=rank&qty=64&searchRadius=50&startAt=256&orderBy=rank&dir=
- Export: Import.io Data Set
- Copy the ID
http://drupal-importio.dev/admin/structure/types/add
- Name: School
- Save and Add Fields
- State Rank - Float
- API Score - Float
- Location - Text Area
- Class Sizes - Text Area
- Parent Education - Float
Or, if you want to be a hacker:
./vendor/bin/drush @drupal-importio.drupal-importio.dev field-create school \
class_sizes,text_long,text_textarea \
parent_education,number_float,number \
state_rank,number_float,number \
api_score,number_float,number \
location,text_long,text_textarea
- Structure > Feeds Importers > add Importers
- California School Ratings
- Ratings, ranking, test scores for schools
- Fetcher: change
- import.io Fetcher
- import.io Fetcher: Settings
- Specify Data Set ID, User ID, and API Key
- Parser: change
- import.io Parser
- Node processor: Settings
- Bundle: School
- Update existing nodes: Update existing nodes
- Mapping
- Hover over the data set headings to get the machine name.
- number_1 - state_rank
- number_2 - api_score
- value_1 - title - click gear, [X] Unique, Update
- content - location
- values - class_sizes
- alttext_value_numbers - parent_education
- Tamper
- location
- Add plugin: Find replace
- Text to find: " map " (without the spaces)
- Text to replace: ", " (without the spaces)
- location
- http://drupal-importio.dev/import
- Click "California School Ratings"
- Click Import
- Go to Content
- http://drupal-importio.dev/admin/structure/views/add
- View name: Schools
- Show: Content of type School
- Create a page
- Create a menu link, Main menu
- Display format: Table
- Add fields, filter criteria, save.
npm install
grunt serveVisit http://localhost:8000 to view.
