A back-end developer of PHP journeys to the front-end and builds some simple visualizations for his data. Talk given to London d3.js meetup July 23rd 2013
And
I
am
a
PHP
developer Hello,
my
name
is
Ben
Greenaway • @blgreenaway • www.bgreenaway.com • facebook.com/bgreenawayDevelopment Wednesday, 24 July 13
This
maVered
because
equivalent
facts
were
not
equivalently
syntaxed
by
JavaScript My
familiar
aggregate
funcQons
were
contained
within
MySQL
&
PHP Wednesday, 24 July 13
This
maVered
because
equivalent
facts
were
not
equivalently
syntaxed
by
JavaScript My
familiar
aggregate
funcQons
were
contained
within
MySQL
&
PHP AND
now
my
data
was
now
remote
data! Wednesday, 24 July 13
d3’s
JSON
hurdles type
::
eval and parse the string once you have it The string must be wrapped in parenthesis.
http://jsonviewer.stack.hu Wednesday, 24 July 13
d3’s
JSON
hurdles wriQng
JSON
summary
::
JSON
is
a
string
which
evaluates
to
an
object
you
write
it
like
a
string, concatenate
it
like
a
string, evaluate
it
like
a
piece
of
code
in
order
to
use
it! (do
this
safely
with
an
in-‐browser
Parse
funcQon
to
keep
your
day
job) (browser-‐naQve
Parse
funcQons
are
also
in
fact
faster
than
JavaScript’s
eval) Wednesday, 24 July 13
d3.js
gave
me
a
means
to
display
it
but
required
me
to
understand
JSON
(and
other
things) PresenQng
this
talk
at
d3.js
London
taught
me
a
few
more!
(updates
to
include
use
of
Map
soon) Wednesday, 24 July 13