Data visualization toolkit: using JavaScript, Rails, and Postgres to present data and geospatial information
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Boston ; Columbus ; Indianapolis ; New York ; San Francisco ; Amsterdam ; Cape Town ; Dubai ; London ; Madrid ; Milan ; Munich ; Paris ; Montreal ; Toronto ; Delhi ; Mexico City ; São Paulo ; Sydney ; Hong Kong ; Seoul ; Singapore ; Taipei ; Tokyp
Addison-Wesley
[2017]
|
Schriftenreihe: | Addison-Wesley professional Ruby series
|
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | xxv, 224 Seiten Illustrationen, Diagramme, Karten (farbig) |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV043874100 | ||
003 | DE-604 | ||
005 | 20170704 | ||
007 | t | ||
008 | 161112s2017 a||| |||| 00||| eng d | ||
020 | |z 9780134464435 |c pbk. |9 978-0-13-446443-5 | ||
020 | |z 0134464435 |c pbk. |9 0-13-446443-5 | ||
035 | |a (OCoLC)964520739 | ||
035 | |a (DE-599)BVBBV043874100 | ||
040 | |a DE-604 |b ger |e rda | ||
041 | 0 | |a eng | |
049 | |a DE-11 |a DE-739 |a DE-634 | ||
084 | |a ST 320 |0 (DE-625)143657: |2 rvk | ||
100 | 1 | |a Clark, Barrett |e Verfasser |0 (DE-588)1119158605 |4 aut | |
245 | 1 | 0 | |a Data visualization toolkit |b using JavaScript, Rails, and Postgres to present data and geospatial information |c Barrett Clark |
264 | 1 | |a Boston ; Columbus ; Indianapolis ; New York ; San Francisco ; Amsterdam ; Cape Town ; Dubai ; London ; Madrid ; Milan ; Munich ; Paris ; Montreal ; Toronto ; Delhi ; Mexico City ; São Paulo ; Sydney ; Hong Kong ; Seoul ; Singapore ; Taipei ; Tokyp |b Addison-Wesley |c [2017] | |
264 | 4 | |c © 2017 | |
300 | |a xxv, 224 Seiten |b Illustrationen, Diagramme, Karten (farbig) | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
490 | 0 | |a Addison-Wesley professional Ruby series | |
650 | 4 | |a Information visualization | |
650 | 7 | |a Information visualization |2 fast | |
650 | 0 | 7 | |a Visualisierung |0 (DE-588)4188417-6 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Visualisierung |0 (DE-588)4188417-6 |D s |
689 | 0 | |5 DE-604 | |
856 | 4 | 2 | |m Digitalisierung UB Passau - ADAM Catalogue Enrichment |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=029283896&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-029283896 |
Datensatz im Suchindex
_version_ | 1804176764374614016 |
---|---|
adam_text | Contents
Foreword xv
Preface xvii
Acknowledgments xxiii
About the Author xxv
Part I ActiveRecord and D3 1
Chapter 1 D3 and Rails 3
Your Toolbox—A Three-Ring Circus 3
Database 3
Application Server 4
Graphing Library 5
Maryland Residential Sales App 5
Evaluating Data 6
Data Fields 7
Simple Pie Chart 14
Summary 17
Chapter 2 Transforming Data with ActiveRecord and D3 19
Pie Chart Revisited 19
Legible Labels 19
Mouseover Effects 20
You Can Function 21
Bar Chart 24
New Views, New Routes 24
Bar Chart Controller Actions 25
Bar Chart JavaScript 26
Scatter Plot 28
Scatter Plot? 28
Scatter Plot Controller Actions 29
Scatter Plot Views and Routes 29
Scatter Plot JavaScript 30
Scatter Plot Revisited 33
Box Plot 34
Quartiles 35
Boxes, Whiskers, Circles, What?! 35
Box Plot Data and Views 35
Box Plot JavaScript 36
Summary 40
Chapter 3 Working with Time Series Data 41
Historic Daily Weather Data 41
Weather Rails App 42
Weather Readings Model 42
Weather Readings Import 42
Weather Stations Model 44
Weather Stations Import 44
Simple Line Graph 45
Weather Controller 45
Fetch the Data 45
The View Files 47
Draw the Line Graph 48
Tweak 1: Simple Multiline Gr^ph 50
Tweak 2: Add Circle to Highlight the Maximum Temperature 51
Tweak 3: Add Circle to Highlight the Minimum Temperature 53
Tweak 4: Add Text to Display the Temperature Change 55
Tweak 5: Add a Line Between the Focus Circles 56
Summary 58
Chapter 4 Working with Large Datasets 59
Git and Large Files 59
The Cloud 60
Hotlinking 60
Benchmarking 62
Benchmark and Compare 63
Benchmark All the Things 64
Querying “Big Data” 65
Using Scopes in the Model 66
Adding Indices 67
When Benchmarks and Statistics Lie 68
Summary 69
Part II Using SQL in Rails 71
Chapter 5 Window Functions, Subqueries,
and Common Table Expression 73
Why Use SQL? 73
Database Portability Is a Lie 73
Tripping Over ActiveRecord 74
User-Defined Functions 75
Why? 75
Heresy! 76
How? 76
How to Use SQL in Rails 78
Scatter Plot with Mortgage Payment 79
Window Functions 81
Window Functions Greatest Hits 81
Lead and Lag 82
Partitions 82
First Value and Last Value 83
Row Number 83
Using Subqueries 84
Common Table Expression 84
CTE and the Heatmap 86
The Query 86
The Controller and View 87
The JavaScript 88
Summary 90
Chapter 6 The Chord Diagram 93
The Matrix Is the Truth 93
Flight Departures Data 94
Departures App 95
Airports 95
Carriers 96
Departures 97
Transforming the Data 101
Fetching the Data 101
Generating the Matrix 101
Finalizing the Matrix 103
Create the Views 104
Departures Controller and Routes 104
Departures View 104
Departures Style 105
Draw the Chord Diagram 106
Disj ointed City Pairs 108
Using the Lead Window Function to Find Empty Leg Flights
Optimizing Slow Queries with the Materialized View 110
Draw the Disjointed City Pairs Chord Diagram 111
Summary 113
Chapter 7 Time Series Aggregates in Postgres 115
Finding Flight Segments 115
Creating a Series of Time 117
Turning Data into Time Series Data 117
Graphing the Timeline 121
Basic Timeline 121
Fancy Timeline 124
Summary 127
Chapter 8 Using a Separate Reporting Database 129
Transactional versus Reporting Databases 129
Worker Processes 130
Postgres Schemas 130
Working with Multiple Schemas in Rails 131
Defining the Schema Connection 131
Creating a New Schema 131
Creating Objects in the Reporting Schema 132
Materialized View in the Reporting Schema 132
Tables in the Reporting Schema 134
Summary 138
Part III Geospatial Rails 139
Chapter 9 Working with Geospatial Data in Rails 141
GIS Primer 141
Its (Longitude, Latitude) Not (Latitude, Longitude) 141
Decimal Degrees 142
Degrees, Minutes, Seconds (DMS) 142
Datum 142
Map Projection 143
Spatial Reference System Identifier (SRID) 143
Three Feature Types 143
PostGIS 144
Postgres Contrib Modules 144
Installing PostGIS 145
PostGIS Functions 146
ActiveRecord and PostGIS 146
ActiveRecord PostGIS Adapter 147
Rails PostGIS Configuration 147
PostGIS Hosting Considerations 147
Using Geospatial Data in Rails 147
Creating Geospatial Table Fields 148
Latitude and Longitude 148
Simple GIS Calculation 149
Working with Shapefiles 150
Shapefile Import Schema 150
Importing from a Shapefile 150
Shapefile ETL 151
Update Missing lonlat Data 153
Summary 154
Chapter 10 Making Maps with Leaflet and Rails 155
Leaflet 155
Map Tiles 155
Map Layers 156
Incorporating Leaflet into Rails to Visualize Weather Stations 157
Using a Separate Rails Layout for the Map 157
Map Controller 158
Map Index 159
Map Data GeoJSON View 159
Mapping the Weather Stations 161
Visualizing Airports 163
Markers 164
Marker Cluster 165
Drawing Flight Paths 167
Visualizing Zip Codes 168
Updating the Maryland Residential Sales App for PostGIS 168
Zip Code Geographies 169
Importing the Zip Code Shapefile 170
Mapping Zip Codes 172
Choropleth 176
Summary 181
Chapter 11 Querying Geospatial Data 183
Finding Items within a Bounding Box 183
What Is a Bounding Box? 183
Writing a Bounding Box Query 184
Writing a Bounding Box Query Using SQL and PostGIS 184
Writing a Bounding Box Query Using ActiveRecord 185
Finding Items within the Bounding Box 185
Finding Items Near a Point 187
Writing the Query 187
Using ActiveReco rd 189
Calculating Distance 190
Summary 191
Afterword 193
Appendix A Ruby and Rails Setup 195
Install Ruby 195
Create the App 196
More Gems 196
Config Files 197 ;֊
Finalize the Setup 199 |
Appendix B Brief Postgres Overview 201
Installing Postgres 201
From Source 201
Package Manager 201
Postgres. app 201
SQL Tools 202
Command Line 202
GUI Tool 202
Bulk Importing Data 202
COPY SQL Statement 203
copy PSQL Command 203
pg_restore 203
The Query Plan 204
Appendix C SQL Join Overview 207
Join Example Database Setup 207
Inner Join 207
Left Outer Join 208
Right Outer Join 208
Full Outer Join 209
Cross Join 209
Self Join 209
Index 211
|
any_adam_object | 1 |
author | Clark, Barrett |
author_GND | (DE-588)1119158605 |
author_facet | Clark, Barrett |
author_role | aut |
author_sort | Clark, Barrett |
author_variant | b c bc |
building | Verbundindex |
bvnumber | BV043874100 |
classification_rvk | ST 320 |
ctrlnum | (OCoLC)964520739 (DE-599)BVBBV043874100 |
discipline | Informatik |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01784nam a2200373 c 4500</leader><controlfield tag="001">BV043874100</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20170704 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">161112s2017 a||| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="z">9780134464435</subfield><subfield code="c">pbk.</subfield><subfield code="9">978-0-13-446443-5</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="z">0134464435</subfield><subfield code="c">pbk.</subfield><subfield code="9">0-13-446443-5</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)964520739</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV043874100</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rda</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-11</subfield><subfield code="a">DE-739</subfield><subfield code="a">DE-634</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 320</subfield><subfield code="0">(DE-625)143657:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Clark, Barrett</subfield><subfield code="e">Verfasser</subfield><subfield code="0">(DE-588)1119158605</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Data visualization toolkit</subfield><subfield code="b">using JavaScript, Rails, and Postgres to present data and geospatial information</subfield><subfield code="c">Barrett Clark</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Boston ; Columbus ; Indianapolis ; New York ; San Francisco ; Amsterdam ; Cape Town ; Dubai ; London ; Madrid ; Milan ; Munich ; Paris ; Montreal ; Toronto ; Delhi ; Mexico City ; São Paulo ; Sydney ; Hong Kong ; Seoul ; Singapore ; Taipei ; Tokyp</subfield><subfield code="b">Addison-Wesley</subfield><subfield code="c">[2017]</subfield></datafield><datafield tag="264" ind1=" " ind2="4"><subfield code="c">© 2017</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">xxv, 224 Seiten</subfield><subfield code="b">Illustrationen, Diagramme, Karten (farbig)</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">Addison-Wesley professional Ruby series</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Information visualization</subfield></datafield><datafield tag="650" ind1=" " ind2="7"><subfield code="a">Information visualization</subfield><subfield code="2">fast</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Visualisierung</subfield><subfield code="0">(DE-588)4188417-6</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Visualisierung</subfield><subfield code="0">(DE-588)4188417-6</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">Digitalisierung UB Passau - ADAM Catalogue Enrichment</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=029283896&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-029283896</subfield></datafield></record></collection> |
id | DE-604.BV043874100 |
illustrated | Illustrated |
indexdate | 2024-07-10T07:37:22Z |
institution | BVB |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-029283896 |
oclc_num | 964520739 |
open_access_boolean | |
owner | DE-11 DE-739 DE-634 |
owner_facet | DE-11 DE-739 DE-634 |
physical | xxv, 224 Seiten Illustrationen, Diagramme, Karten (farbig) |
publishDate | 2017 |
publishDateSearch | 2017 |
publishDateSort | 2017 |
publisher | Addison-Wesley |
record_format | marc |
series2 | Addison-Wesley professional Ruby series |
spelling | Clark, Barrett Verfasser (DE-588)1119158605 aut Data visualization toolkit using JavaScript, Rails, and Postgres to present data and geospatial information Barrett Clark Boston ; Columbus ; Indianapolis ; New York ; San Francisco ; Amsterdam ; Cape Town ; Dubai ; London ; Madrid ; Milan ; Munich ; Paris ; Montreal ; Toronto ; Delhi ; Mexico City ; São Paulo ; Sydney ; Hong Kong ; Seoul ; Singapore ; Taipei ; Tokyp Addison-Wesley [2017] © 2017 xxv, 224 Seiten Illustrationen, Diagramme, Karten (farbig) txt rdacontent n rdamedia nc rdacarrier Addison-Wesley professional Ruby series Information visualization Information visualization fast Visualisierung (DE-588)4188417-6 gnd rswk-swf Visualisierung (DE-588)4188417-6 s DE-604 Digitalisierung UB Passau - ADAM Catalogue Enrichment application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=029283896&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Clark, Barrett Data visualization toolkit using JavaScript, Rails, and Postgres to present data and geospatial information Information visualization Information visualization fast Visualisierung (DE-588)4188417-6 gnd |
subject_GND | (DE-588)4188417-6 |
title | Data visualization toolkit using JavaScript, Rails, and Postgres to present data and geospatial information |
title_auth | Data visualization toolkit using JavaScript, Rails, and Postgres to present data and geospatial information |
title_exact_search | Data visualization toolkit using JavaScript, Rails, and Postgres to present data and geospatial information |
title_full | Data visualization toolkit using JavaScript, Rails, and Postgres to present data and geospatial information Barrett Clark |
title_fullStr | Data visualization toolkit using JavaScript, Rails, and Postgres to present data and geospatial information Barrett Clark |
title_full_unstemmed | Data visualization toolkit using JavaScript, Rails, and Postgres to present data and geospatial information Barrett Clark |
title_short | Data visualization toolkit |
title_sort | data visualization toolkit using javascript rails and postgres to present data and geospatial information |
title_sub | using JavaScript, Rails, and Postgres to present data and geospatial information |
topic | Information visualization Information visualization fast Visualisierung (DE-588)4188417-6 gnd |
topic_facet | Information visualization Visualisierung |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=029283896&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT clarkbarrett datavisualizationtoolkitusingjavascriptrailsandpostgrestopresentdataandgeospatialinformation |