Quantcast
Channel: maps for developers - Medium
Viewing all 2230 articles
Browse latest View live

Mapping your moves (with Mapbox Studio!)

$
0
0

Here are two years of my walks, runs, and bike rides loaded into Mapbox Studio.

YELLOW/RED is biking, PINK is running, BLUE is walking --- View full screen

Organizing your data

I’m using Facebook’s Moves to track my activities throughout the day. The app provides your data in several formats, but I’ll use just the GPX files as they capture the app’s smart activity filtering, separating walking, running, cycling, flying, and driving.

Create a source in Mapbox Studio

We have our data, so now we need to create a source from it. Sources are vectorized data sets that can be composited into any Studio style after uploading.

Open Mapbox Studio and click on Projects in the lower left - this will open up a listing of your projects. Click on New project, then tap the + Blank source button.

I was only interested in my physical activities, so I took the full data sets for cycling.gpx, running.gpx, and walking.gpx. To add each, click on + New layer in the top right and add the GPX files.

You’ll notice a lot of layers provided by Moves. To keep the vector tile size down and because I’m only interested in the tracks themselves, I deleted everything but the _tracks layers.

Save the source in the top left, then click Settings. Add a name and description if you’d like, then take a look at the Maxzoom slider. It defaults to zoom 11, but I wanted a bit higher fidelity at higher zooms, so I bumped this up to 13.

Save again, then click Upload to Mapbox. If you have a lot of activities, this could take a little bit as it tiles all of the data. Two years worth of my own data took about 5 minutes to upload. When it’s done, you’ll be given a Mapbox source ID and a link to view it in your Data page. You’ll want to copy this ID, as you’ll need it for the next step.

Add the source layer to a new style

Now that I’ve got a source, I want to composite it into a map. I’ll go to the Projects button again and this time create a new style. I love the look of ”High Contrast”, so I chose that one.

To add the layer, click on Layers, then Change source. In the input at the bottom, paste in the source ID and click Apply.

Style the data

You’ll see the map flash, but won’t notice anything different quite yet. The data is there, but there are no styles applied to it yet.

On the right side, you’ll see three tabs for style, road, and labels. I didn’t love how dark the roads were in the High Contrast style, so I clicked on the road style and changed the motorway hex color:

@motorway:          #ccc;

From here, add a new style file with the + button. I named it “activities”. If you recall, I pushed three datasets to the custom source - cycling_tracks, running_tracks, and walking_tracks. These are IDs that can be referenced in the style pane. Using these, I can quickly assign some hex codes to a variable for reuse and create a quick basic style:

@running: #FF69B4;
@walking: #00eaff;
@cycling: #ffCD2F;

#running_tracks, #walking_tracks, #cycling_tracks {
  line-width: 1;
}

#running_tracks {
  line-color: @running;
}

#walking_tracks {
  line-color: @walking;
}

#cycling_tracks {
  line-color: @cycling;
}

This looks cool, but doesn’t communicate much about how much I’ve done certain activities in certain places, and the various activities are kind of stepping over each other for attention. We can use line-comp-op to composite them on top. I played around with some options, and landed here:

#running_tracks {
  line-color: @running;
  line-comp-op: hard-light;
}

#walking_tracks {
  line-color: @walking;
  line-comp-op: multiply;
}

#cycling_tracks {
  line-color: @cycling;
  line-comp-op: multiply;
}

I kept going here, adjusting line width for different zooms and even converting the lines to dots at low zooms so they’re easier to spot. Download the final activities style here. If you’d like labels to appear on top of the map like I’ve done in the final version, take a look at how to do that in this guide.

Once you’re happy with the design, click on Settings again, then Upload to Mapbox. It will appear in your Styles page on Mapbox.com, where you can share to your heart’s content.

View my activities map here, which should give you an interesting peek into how much time I spend on my feet. If you want to start tracking your own activities, check out Moves, OpenPaths, PlaceMe, or any other fitness tracking app.

And if you haven’t tried Mapbox Studio out yet, download the latest version - it’s open source and publishing your map on Mapbox.com is free.


Open data research internship

$
0
0

We’re looking for an enthusiastic data research intern to help us find, organize, and share open data with our clients and the world. As a research intern, you’ll be joining the data team in Washington, DC as we seek out data to power our geocoder. This work requires us to scour the web looking for data sets from individual countries, states, and cities, then get them into OpenAddresses.io whenever we can.

You’ll work closely with sources across the world. Leveraging our earlier work with open government data, you’ll develop an acute awareness of global open data and proprietary data infrastructures as you engage national and local governments.

Qualities we’re looking for:

  • Strong web research skills. Finding data can be hard; you should be hungry for the challenge.
  • Language skills. You will engage governments and organizations on a global scale. Professional level skills in German, French, Spanish, Russian, or Italian (in that order) are a major plus but not a requirement.
  • Creative problem solving. Data work is messy, and sometimes the best approach is the one that ships. Flexibility is key.
  • Strong oral and written communication. You’ll be playing a key role in international data outreach and engagement with potential partners. We’re looking for someone who can be both persuasive and articulate across international and linguistic lines.
  • Passion for open data. The power of open data has played a key role in Mapbox from the start, and we continue to see immense value from sourcing both proprietary and open data to this day.
  • Self-taught learner. You’ll be surrounded by teammates with deep experience in strategy, data, code, and design, but we expect to be learning just as much from you.

This position is a full-time, eight week internship with the option to extend for longer, particularly if the candidate has mastery of more than one of the listed languages. Our dog-friendly office is located on Washington, DC’s 14th Street corridor. There will be a competitive monthly stipend, frequent team lunches, competitive jenga and office drinks.

To apply:

Please send the following to jobs+data@mapbox.com

  • Note describing why you’re interested in the data research internship at Mapbox
  • Resume
  • Examples of previous work (websites, articles, open source contributions, or whatever medium communicates your work best)
  • (extra points) Design an awesome map with Mapbox Studio.

Deadline

The deadline to apply for the data internship is 5pm on Monday, November 17, 2014.

Dark Sky Weather Data

$
0
0

Dark Sky Weather Data

Earlier this week I imported satellite weather data into Mapbox Studio, making snapshots of temperatures across the continental United States as the morning warmed up:

All the data comes from Forecast.io, the same API that powers Dark Sky - the hyperlocal weather notification app a lot of us on the team use. I worked with Adam Grossman at Dark Sky to pull a sampling of global data sets: temperature, snow accumulation, and a really cool custom metric called kite score that tells whether it's a good day to fly a kite.

Stark temperature differences near the Himalayan Plateau.

Ideal conditions for kite flying in the Central Plains.

Heavy snows near the US-Canada border.

In a few months we will add live weather data feeds to Mapbox - sign up to become a beta tester.

Happy Halloween from Mapbox

Skeleton of a Python Package

$
0
0

You’ve written a directory full of Python scripts on your laptop and now you want to deploy them elsewhere and share them with other developers. Turning them into a proper package at this stage can be a nightmare. In hindsight, beginning your work within the framework of a package would have been better! Introducing Mapbox Pyskel, a skeleton Python package repo that you can clone and make your own. A test suite and command line interface are included.

Pyskel emerged out of our internal experience in building Python tools. Our designers and developers utilize an array of python modules – Rasterio, Fiona, and Shapely to name a few – and needed a better way to build and share these tools. Recently, we’ve been building tools that enable vectorization of raster weather data into formats optimized for styling in Mapbox Studio, and we are using the Mapbox Pyskel framework to create a shareable package.

Pyskel aims to embody wisdoms written down in various sources, including:

I’ve been a long time user of paster create from Paste Script, but a skeleton repo is a better fit for the programming teams I work with these days. You will find other skeletons (some named “pyskel”) on GitHub, but I’ve made a few different choices for Mapbox Pyskel that you may appreciate. A Pyskel-based package entails the installation of Click for command line interface development and Pytest for testing. Each of these reduce development friction and make Mapbox Pyskel a good choice for a developer looking to increase their productivity.

Mapbox Pyskel is open source. Give it a try and let us know if there are features you’d like to see!

ICCM and micro-tasking tools in OpenStreetMap

$
0
0

I’ll be at the International Conference of Crisis Mappers with Matt this week hanging out with our friends from the Humanitarian OpenStreetMap Team (HOT). We are going to be teaching new mappers how to use iD Editor and talking about the new OpenStreetMap micro-tasking application we’ve built called to-fix.

To-fix breaks up big mapping jobs into smaller tasks that any number of people can work on asynchronously. Compile a list of tasks like straightening kinked roads or disaggregating overlapping features, feed the list into to-fix, and the tool will queue up the tasks for a group of mappers and track their progress.

flipping through tasks in to-fix

We have built to-fix to scale Mapbox’s data team, and we’re excited to share it at ICCM. For example, to-fix could be used in crisis mapping to verify or clean up large sets of newly mapped features during a HOT activation.

Find us in person this week or hit us up on Twitter @aaronlidman, @mtirwin with more questions.

Mapping missing maps

$
0
0

Millions of people worldwide live in poorly mapped areas. When conflict, disease, or natural disaster strikes, the humanitarian community often scrambles to generate map data as it responds. The The Missing Maps project aims to solve this problem with an ambitious effort to put the world’s most vulnerable populations on the map.

Brighter areas are more densely mapped but don’t always correspond with population size

A collaboration between the American and British Red Cross, the Humanitarian OpenStreetMap Team (HOT), and Medecins Sans Frontieres, Missing Maps is rallying volunteers to trace satellite imagery and gather on-the-ground data. Better maps of vulnerable areas help NGOs and governments prepare for humanitarian crises before they happen.

But where to start mapping? Mapbox is applying the same analysis used by our data team to help prioritize Missing Maps work. Our code looks for areas with low feature counts in OpenStreetMap but high satellite imagery data density (a rough proxy for lots of buildings and roads) to identify under-mapped areas. We can then compare the resulting locations with various vulnerability metrics like public health data, infrastructure quality, food security, and disaster preparedness.

As an example, we identified these map tiles from Karachi, Mumbai, Surat, and Yangon as good Missing Maps tracing candidates:

Lots of roads and buildings, but not many are traced in OpenStreetMap (purple)

We’ll be delivering the Missing Maps team this longer list of priority areas that lets volunteers click through to edit the map. If you want to help build the code that powers the search for under-mapped areas, ping @brunosan on Twitter or follow the repository on Github.

Want to get involved in Missing Maps? Attend one of the launch events. You’ll meet fellow mappers and learn how to map using tools like iD Editor. Mapbox has teamed up with Code for America to host the San Francisco mapathon and will be represented at the Washington, DC event, so come say hello. If you can’t make it in person, you can contribute remotely to one of the Missing Maps activations in the HOT task manager.

Join team Bengaluru

$
0
0

We are growing the Mapbox team in Bengaluru and we’re looking for individuals who love working with data and open source. Eric, Alex, and I will be at the Open Data Camp - Delhi, on November 15 and GeoBLR in Bengaluru November 16-22. We would love to meet up in person or, if you’re interested, just hit me up on Twitter: @srmach9.

Find out more in our job postings on opportunities for data analysts and developers.


See you at State of the Map - let's talk data

$
0
0

We’re on our way to the annual OpenStreetMap conference State of the Map starting tomorrow in Buenos Aires. Edith, Luis, Ruben and myself are excited to join for a three day event, sharing experiences and ideas for the future of OpenStreetMap and sync up on improvements for the project.

This conference comes at an exciting time for us. Over the past years as we started to use OpenStreetMap to power Mapbox Streets we have built up a data team continuously fixing errors and adding data. We are now looking to expand this team and improve our tools like to-fix and our mapping guidelines to scale the team and ensure quality.

Here is a map of key mapping projects we have completed since 2012. Come out for my talk on Sunday 12PM to learn more about our mapping activities on OpenStreetMap and where we want to go in the future.

Fresh imagery for Buenos Aires

$
0
0

As we’re here at State of the Map in Buenos Aires, we have updated Mapbox Satellite in the Buenos Aires area with fresh 50cm imagery from DigitalGlobe.

This imagery is available effective immediately on any Mapbox Satellite map which means you can also use it for tracing on OpenStreetMap. Here are screenshots of the update.

The docks of the Port of Buenos Aires.

The Obelisk of Buenos Aires, on the intersection of Corrientes and 9 de Julio.

Parque Centenario in the Caballito District.

Hipodromo Argentino de Palermo.

Villa 21-24, Buenos Aires' biggest precarious settlement, along the Matanzas river.

Explore the interactive map.

Color picker comes to Mapbox Studio

Hi-res in Hamburg, Germany

$
0
0

Hi-res in Hamburg, Germany

We just updated Mapbox Satellite in Hamburg, Germany with high-resolution orthoimagery collected at the height of summer. Hamburg is home to 1.8 million residents, a historical port that dates back to the year 1189, and a modern open data policy. At 25 cm resolution, the city can be seen for its colorful maritime activity, active public spaces, and lush countryside. This dataset was collected and made available to us by Hamburg's Agency for Geo-Information and Surveying.

Crowds gather at the Alstervergnuegen music festival.
Hamburg's port dates back to its founding in 1189, and is one of the largest in Europe. Here, raw minerals are transferred from ships to trains.
Wind turbines dot the landscape just outside the city.
About 98% of the materials that pass through Hamburg's port are containerized.
Shipping is not the only use for Hamburg's many waterways. Personal boats can travel throughout the city.
Alstervorland is a popular area on sunny days.

Geo Big Data Meetup

$
0
0

I’ll be speaking at the next GeoMeetup in San Francisco about using the Mapbox Surface API with giant datasets. Other speakers include Daniel Mewes of RethinkDB and Erez Cohen of Mapsense who will be focusing on the idea of Geo Big Data.

Demoing the Surface API using custom data from data.sfgov.org to visualize bike crime in San Francisco. The Surface API here allows users to find bike crime data in different parts of the city.

Come out to The Galvanize co-working space on Howard St.Thursday, November 13th and learn more about how other companies are working with geo big data. Mapbox will also be sponsoring the event and providing light snacks and drinks.

Come build the map renderer of the future

$
0
0

To the game developers and designers of the world:

If shaders make you weak at the knees, or there are depth buffers in your dreams, or you geek out over writing the fastest tessellation library there is (we are), there’s a place for you at Mapbox.

We aren’t a game company: we do maps. We’re building 60fps OpenGL & WebGL interfaces that make the Earth feel like the most fluid and captivating open-world game. Oh, and our work is open source.

If Mapbox sounds like the non-gaming job you never knew you dreamed of, join us.

EcoHack at Mapbox

$
0
0

This coming Saturday, November 15th, Mapbox and Development Seed are hosting EcoHack events in SF and DC. EcoHack is a worldwide event that brings together developers, designers, and scientists, all in pursuit of innovative solutions to challenging environmental problems.

These are two of six global EcoHack events happening alongside the World Park Congress, and we are thrilled to be a part of it.

Head over to EcoHack.org for more details and to sign up. We hope to see you Saturday!

Directions to Mapbox SF

Our office in San Francisco is at 149 9th Street. We’re on 9th between Howard & Mission in a big brick building with an old-school sign that says “The Storex Building”. Once you reach the entrance use the intercom to call Suite 404 and we’ll buzz you in.

Directions to Development Seed / Mapbox DC

Our office in Washington, DC is at 1714 14th St NW Rear Entrance. We’re located in the alley behind 14th Street between R street and S street, in a blue garage with large glass windows.


Speaking at re:Invent: NASA + AWS + Global Scale

$
0
0

We’re presenting this afternoon at AWS re:Invent on “Rendering a Seamless Satellite Map of the World with AWS and NASA Data.” I’m going to get into specifics on how we are processing huge amounts of NASA satellite data and distributing it around the world with AWS services like S3, EC2, AutoScaling, and SQS.

We go on at 5:30 (BDT204 Level 5 - Palazzo L). Stop by for the talk and then let’s meet up at the QA session afterwards. Hit me up @willwhitedc or @ericg to meet up.

Installing Mapbox on your infrastructure

$
0
0

With Atlas Server, you can now run the Mapbox platform on your own infrastructure. Run it in your cloud, on the servers you control, or behind a firewall, anywhere you want. Out of the box, you have access to worldwide streets and terrain maps as well as our Cloudless Atlas for satellite imagery. Atlas Server is totally pluggable, so you can add your own private vector and raster data and integrate with your existing PostGIS or Esri data workflows.

This super fast map server is just the base to start building your apps. Atlas is wrapped in a private version of Mapbox.js, the same API powering Mapbox.com. This means you can use the dozens of plugins to make heat maps, cluster dense data, swipe between before and after imagery, add markers and customize everything. The API also plugs into our open source iOS and Android SDKs, letting you power private mobile apps.

Check out how fast it is to install Atlas Server:

If you want to talk more about Mapbox Enterprise or get a trial license for Atlas Server, just email us up at enterprise@mapbox.com.

Custom font support added to Mapbox Studio

$
0
0

We’re excited to announce that custom fonts are now supported in Mapbox Studio map styles and on mapbox.com. Creating a map styled to perfectly fit your needs is now easier than ever. Here are some companies that are already using custom fonts:

Financial Times

Pinterest

Battlefield

WSJ

To add custom fonts to your own maps, add the .ttf, .woff, or .otf font files to your style’s project directory. Then create a reference to where the fonts are located by adding the following code to your stylesheet:

Map {
    /* registers fonts in the style project's base directory */
    font-directory: url('');
}

Reference the fonts using their name and qualifier (Regular, Italic, Medium, etc.). Below are the fonts I used for my Halloween Map.

//Halloween Fonts
@feast: "Feast of Flesh BB Regular";
@horror: "AMERICAN_HORROR_STORY Medium";
@fears: "Face Your Fears Regular";
@scream: "Scream Again Regular";
@cold-night: "Cold Night for Alligators Regular";

Once you’ve added your fonts, they will appear at the top of the fonts panel.

your fonts

If you haven’t tried Mapbox Studio out yet, download the latest version - it’s open source and publishing your map on Mapbox.com is free.

Drone imagery storage add-ons

$
0
0

With the new 1 terabyte storage add-ons you have enough storage to map all the farms in Ohio, or monitor the entire Russian oil pipeline on a monthly basis, or photograph America’s high voltage power network, or inspect the roof of every home in California, for $100 a month.

Aerial imagery of power lines east of Hamburg, Germany.

We designed these new storage add-ons for drone platforms and power users building applications on top of our infrastructure. With 1TB, you can store roughly five million map tiles. Here is a rundown of how crazy this amount of storage is:

  • Fly over 2000 farms in Ohio every week of the summer to capture NDVI at to 50cm. The average farm size in Ohio is 184 acres. That is 368,000 acres, once a week.

  • Map the entire country of Denmark, all 43,000 km2, twice a year at 1m/pixel.

  • Monitor every coal mine in China quarterly at 1m/pixel. (There are 3.2 million hectares).

  • Inspect the entire rail network in the USA once a month for a year at 50cm. There is 228,218 km of track in the USA.

  • Take a snapshot of every roof in California, rendering a map from z17 to z19 (2m/pixel down to 50cm/pixel). There are 11.5 million occupied units in California. The average size of a house is 2200 square feet and they’re typically two stories tall, so 1100 square feet.

  • Inspect every high-voltage power line in America, once a month down to 50cm/pixel. This also assumes a 15 meter buffer on each side of the line. America operates about 157,000 miles of high-voltage power lines.

  • Monitor the entire oil pipeline network across all of Russia at 50cm/pixel once a month. There is 259,913km of pipeline across the country.

Again, anyone can now add additional terabytes of storage to their premium Mapbox account for just $100/1TB a month. If you want to talk more just email us at enterprise@mapbox.com.

Designing a Super Mario map with Mapbox Studio

$
0
0

To capture my love for 8-bit art, I designed a Super Mario themed map!

Due to the amount of features and level of abstraction, I knew that creating this map would be a great test of my proficiency with Mapbox Studio, as well as Studio's own limits. By diving into the deep end, I learned some useful strategies.

Exploring custom data sources

The first hurdle to overcome was learning how to simplify the landforms. After unsuccessful experiments with the polygon-smooth property, I went to Natural Earth, a superb collection of public domain map datasets, and downloaded some simplified land and water files. I then had to learn how to get these ZIP files into Studio.

Add a new layer (the .shp within the expanded Natural Earth .zip) and update the metadata.

After saving your awesome new source file, you'll upload it to Mapbox.com so you can easily use it. After uploading, you can add it to a style by clicking Change Source (in the Layers panel), adding the unique ID to the comma delimited source list, and clicking Apply!

Using shields for greater control

Once I'd styled the landforms, the next problem I faced was how to programmatically add all of the pixelated features to the map in a sane manner. After initially toying with markers and custom fonts, I discovered shields. With rules like shield-margin, shield-min-distance, and shield-min-padding, getting the elements to work together wasn't too difficult.

mario-icons

Customizing layer order

In this project I used eight discrete sources, which ended up visually interfering with one another. To fix this, I had to dive into the project.yml to create a custom layer order.

The layer order of a remote vector tile source can be altered. Manually edit the project.yml file of a style project and add a layers key with a YAML array of layers in the format {id}.{class}. The same layer can be listed multiple times provided a different class is included with each instance:

    source: "mapbox:///duncangraham.f38239b3,duncangraham.54c72d71,duncangraham.9cb2f4cc,duncangraham.83c4f511,duncangraham.d1be701a,mapbox.mapbox-streets-v5,mapbox.mapbox-terrain-v1,duncangraham.b12adadc"
    layers:
    - ne_110m_ocean
    - ne_110m_land
    - ne_10m_geography_regions_polys
    - ne_110m_lakes
    - road
    - mpoi
    - place_label
    - hillshade
    - landcover
    - marine_label
    - country_label

Mapbox uses a painter's algorithm so the layers are applied from top to bottom, with the ne_110m_ocean at the bottom and the country_label layer on top.


This amount of control from start to finish is what allowed me to add so many different elements and features while maintaining a clean, intelligible result. To interact with the final result more, check out the slippy map. You can also peruse the code on Github.

Viewing all 2230 articles
Browse latest View live