Google Maps Shading of Australian Suburbs - api

I need a way to shade Australian suburbs in different colours based on my input.
Not sure of how to do this with Google Maps API.
Google maps has Australian suburbs boundaries and I want to tell Google Maps to shade each Suburb a different colour based on my instruction. I am very very open to how to do this.
My goal is to have a Google Map that is interactive that has suburbs shaded different colours. You can zoom out and look across a region and see if there are suburbs in common or with different colours. The key would be based on things like Median house price, house sale volumes, demographics etc.
Why: There are 3 reasons to do this.
To place a screenshot in a powerpoint report
Send a link to a client and show them their area with different information encoded
Built a system in the future that pulls this from a DB and generates this as part of a web portal
How: I have a spreadsheet with information like: Cherrybrook, Red, Castle Hill, Blue, Kellyville, Pink (or HTML colours, or numbers - whatever the format required can be generated).
If possible I also want to label the suburbs based on the colour that they become (this may be a Google Earth feature).

You might be able to use the Polygon class, but there are performance limits on how many polygons you can show at once. If you only show one metro area at a time, you might be okay.
More likely, you will want to create tiles. See
https://developers.google.com/maps/documentation/javascript/overlays
for documentation on tiles.
This is very powerful. You can see, for example, a web site I and a friend made which shows Australian 2006 census data by census tract by using tiles at:
http://sunburntpeople.com/census/

Related

Checking for intersection between an area and a set of points with heterogeneous geographical data

I have an application which deals with geographical data and, in particular, tracks. Given an area (radius around geopoint, or bounding box of geopoints) I need to find, among of all these tracks, the ones that have points that interesect with said area.
For the tracks, it seems I will be dealing both with EPSG:3857 and EPSG:4326: they are either inputted by map interaction (openstreetmap, which uses EGPS:4326 data but EGPS:3857 for tiles) or GPS data (which is EGPS:4326). As for the area, I have "blank slate", but I think it will come in both forms (user either indicates an area on the map or provides an address and radius. address would be resolved with the android geocoder, which I am assuming uses EGPS:4326.)
How do I go about doing this?

Structured Data Schema Types for Trading Card Game Cards

So, I run a website which has a card database for the old Star Wars Trading Card Game by Wizards of the Coast. swtcg.com There are multiple sets/expansions and each of those has multiple cards.
If you google other trading card games like Magic the Gathering or Pokemon TCG, you SOMETIMES will get rich, carousel-style results for individual cards, and if you click one of the cards, you get the rich, graph sidebar result. It seems like google is aware that these are Cards from Sets for a Trading Card Game.
I have tried to search for sites that are using structured data to identify these types, but have only found one or two, and they are just using Product markup.
Does anyone have any advice for what types I should use? I would really like to get to the point where you could search for a card and could get a rich result on the side with details about each card.
I've tried Product, but only some of them are cards that are actually sold. Others are digital only and free. I've considered Article and Creative Work, but am just really stumped as to what the best options would be for me. Is there such a thing as custom types that aren't insanely difficult to implement?
The contents of your website present a database for playing cards. Let's look at your web page representing one card 100 Battle Droids. In my humble opinion, this content is explicit Creative Work and this type can probably help you. Due to the fact that the subject of this web page is a game, the use of the embedded type Game can help you. For this type, you can use the about or mainEntity properties as alternatives.
The map that is presented in the content of this web page is an image. You can probably be helped by using the following Google guidelines for structured data for the Article type:
For best results, provide multiple high-resolution images (minimum of
300,000 pixels when multiplying width and height) with the following
aspect ratios: 16x9, 4x3, and 1x1. For example:
{
"#context": "https://schema.org",
"#type": "NewsArticle",
"image": [
"https://example.com/photos/1x1/photo.jpg",
"https://example.com/photos/4x3/photo.jpg",
"https://example.com/photos/16x9/photo.jpg"
]
}
You can use the free online calculator for the following aspect ratios:
4X3 and 16x9. To compress your images, you can search for image compressors on the web. I usually use Compressnow with the maximum level of 65%.
Using the Google Guides to optimize your images Google Image best practices and UX to responsive images.
Your information below the card is the table. The use of a responsive table (row only) for this data may probably help. You can use the W3 guide Generating JSON from Tabular Data on the Web to structure this data.
You can use Google guide to Dataset and the standard of W3 Data Catalog Vocabulary (DCAT) - Version 2 to create a database of your cards.

tSql plot point in centre of grid cells

Original question below:
'What is the best way to achieve the below in sql:
Take an area such as Chicago Illinois, place a grid over it of cells 50m x 50m and place a point in the centre of each grid cell. The coordinates of each point will be used to look at a table of lat/longs and calculate which of these points are within 200m of each point from the grid.'
To provide more detail to the above to make things a bit clearer. The greater aim is to:
Query a table of lat/longs in sql (2012) to find the greatest number of points in a 200m radius. I believe that using the Geography capabilities in sql I can accomplish much of this. To be able to sample the table of points I wanted to create a grid (say of New York - 50m x 50m cells) and move a circle (200m radius) into the center of each square grid cell and then use the buffer function to find what was within the circle. However, I've been searching online and I haven't been able to find a way to create the grid and the central lat/longs.
I am aware of the haversine equation and have used it before (the inverse of this I suppose is what I'm looking for). I would just appreciate some guidance to make sure I don't go down the wrong avenue for too long.
When you are talking about UI You can't handle it in sql.
SQl is a relational database management system, or RDBMS, that supports a wide variety of transaction processing, business intelligence and analytics applications in corporate IT environments. but UI use In information technology, the user interface (UI) is everything designed into an information device with which a person may interact. This can include display screens, keyboards, a mouse and the appearance of a desktop. It is also the way through which a user interacts with an application or a website. The growing dependence of many companies on web applications and mobile applications has led many companies to place increased priority on UI in an effort to improve the user's overall experience .WHEN YOU ARE TALKING A BOUT DESIGN YOU HAVE TO USE UI NOT SQL.
this link can help you to find your solution.

Creating a Choropleth Map at the County Level

I'm trying to create an animation of the population density of the Appalachian region from roughly 1790 to 2010 in decennial steps at the county level.
I've successfully created a choropleth for 2010 by modifying what was done in this tutorial by Nathan Yau. I've run into a few problems. For one, US county boundaries evolve rapidly over time so I can't use the same SVG file as in the tutorial. I think I need to do the following:
Obtain historical county boundaries as GIS files from here.
Convert GIS files into SVG files using Kartograph (after installing its numerous dependencies).
Obtain population data (with FIPS info) for each county in Appalachian region since 1790 from US census data.
Mimic what was done in tutorial to create choropleth for each decade and stitch together into animation.
This just seems insanely complicated for something so simple and I'm new to a lot of this so I'm not convinced I'll be able to get all of it to work. I guess my questions are the following:
Will the strategy I outlined work? Is there a better/simpler way to do what I'm trying to do?
Also, as for getting the census data, this also seems harder than it has to be. I just want a simple .csv file with say FIPS label, county name, and population for a given year, and yet the best I can find is something like this with a link to the actual source in some arcane format.
Thanks for any help!
You can download tables of population data by county from the US Census here:
http://factfinder2.census.gov/faces/tableservices/jsf/pages/productview.xhtml?src=bkmk

Google Fusion Table - Proximity Search

I might have gotten in over my head here, and am looking for any possible assistance, as I am really not familiar with writing code. If you can dumb down any possible answers, that'd be spectacular.
I created a Google Fusion Table that lists worldwide sea ports by city and country, and visualizes them on a map. I want to have the ability to type in an inland location and have the map mark the location, and advise the closest one or two seaports.
For example: I enter a location of Richmond, VA, and the map will mark Richmond, VA on the map, and advise that the Norfolk, VA and New York, NY sea ports would be closest.
I'm not sure where to begin to accomplish this. Is this too vague of a question? Any help provided will be greatly appreciated!
You can accomplish this using a bit of JavaScript code. The Fusion Tables Layer in the Google Maps API allows you to find the nearest n neighbors to a latitude, longitude coordinate. An example can be found here:
https://developers.google.com/fusiontables/docs/samples/nn_example
Here are the overall steps you would take to create the app:
Create an HTML page that has a search box plus a map with the Fusion Table Layer displaying the data from your table
When the user enters a search term, such as Richmond VA, you would geocode the string to get the lat/lon coordinate. You can use the Google Maps API geocoding service:
http://code.google.com/apis/maps/documentation/javascript/geocoding.html
When you get the lat/lon coordinate, use this to update the query sent to the Fusion Tables Layer (similar to the example above) to show the 2 nearest ports.