please write java codes
* Adds markers to the map for the morning pedestrian counts in May 2021.
* These counts are in the second-to-last field in the CSV data file. So we look at the second-to-last
array element in our data array for these values.
* @param data A two-dimensional String array, containing the data returned by the
getDataFromLines method. (Contains the information from the csv file separated by commas)
*/
public void showMay2021MorningCounts(String[][] data) {
clearMap(); // clear any markers previously placed on the map
mapTitle = "May 2021 Morning Pedestrian Counts";
//Complete this code
** an example code:
float lat = 40.737375365084105f; // latitude of a location of interest
float lng = -74.00101207586745f; // longitude of a location of interest
Location markerLocatio = new Location(lat, lng); // create a Location object
int pedestrianCount = 11024; // an example pedestrian count (need to get it from the file)
float markerRadius = pedestrianCount * SCALE_FACTOR;
float[] markerColor = {255, 0, 0, 127}; // a color, specified as a combinatino of red, green, blue, and
alpha (i.e. transparency), each represented as numbers between 0 and 255.
MarkerBubble marker = new MarkerBubble(this, markerLocatio, markerRadius, markerColor);
map.addMarker(marker);
Sample of the csv file :
the_geom,Borough,Loc,OBJECTID,Street_Nam,From_Stree,To_Street,Index,May07_AM,May07_
PM,May07_MD,Sept07_AM,Sept07_PM,Sept07_MD,May08_AM,May08_PM,May08_MD,Sept08_
AM,Sept08_PM,Sept08_MD,May09_AM,May09_PM,May09_MD,Sept09_AM,Sept09_PM,Sept09
_MD,May10_AM,May10_PM,May10_MD,Sept10_AM,Sept10_PM,Sept10_MD,May11_AM,May11
_PM,May11_MD,Sept11_AM,Sept11_PM,Sept11_MD,May12_AM,May12_PM,May12_MD,Sept12
_AM,Sept12_PM,Sept12_MD,May13_AM,May13_PM,May13_MD,Sept13_AM,Sept13_PM,Sept1
3_MD,May14_AM,May14_PM,May14_MD,Sept14_AM,Sept14_PM,Sept14_MD,May15_AM,May1
5_PM,May15_MD,Sept15_AM,Sept15_PM,Sept15_MD,May16_AM,May16_PM,May16_MD,Sept1
6_AM,Sept16_PM,Sept16_MD,May17_AM,May17_PM,May17_MD,Sept17_AM,Sept17_PM,Sept
17_MD,May18_AM,May18_PM,May18_MD,Sept18_AM,Sept18_PM,Sept18_MD,May19_AM,May
19_PM,May19_MD,Oct20_AM,Oct20_PM,Oct20_MD,May21_AM,May21_PM,May21_MD
POINT (-73.90459140730678 40.87919896648574),Bronx,1,1,Broadway,West 231st
Street,Naples
Terrace,N,1189,4094,2508,734,2646,2939,802,4015,2631,1125,4310,3420,1001,3475,2832,991,
4262,2469,1010,3609,3128,863,4119,2217,997,4440,2687,1328,3820,2428,1288,3328,3365,126
8,4315,2276,1210,4710,3825,1206,4590,3008,1220,4384,2641,1450,4646,2996,1788,4980,3033,
1204,4520,2999,1246,4531,2686,1309,3642,2830,1916,5893,2776,1111,4044,2731,1271,4502,2
899,1708,4464,2967,,,,486,2843,1754,630,3262,1710
POINT (-73.92188432870218 40.82662794123294),Bronx,2,2,East 161st Street,Grand
Concourse,Sheridan
Avenue,Y,1511,3184,1971,1855,3754,1183,1136,2638,1522,1939,3283,1383,1351,3111,1304,12
27,3137,2762,2077,3283,1409,1007,3069,1477,1734,3333,1772,2051,3525,1752,1233,1875,191
2,2113,4099,1970,2278,4215,2288,2071,3890,1832,2206,4363,2315,1949,4435,2388,2318,.
please write java codes Adds markers to the map for the mo.pdf
1. please write java codes
* Adds markers to the map for the morning pedestrian counts in May 2021.
* These counts are in the second-to-last field in the CSV data file. So we look at the second-to-last
array element in our data array for these values.
* @param data A two-dimensional String array, containing the data returned by the
getDataFromLines method. (Contains the information from the csv file separated by commas)
*/
public void showMay2021MorningCounts(String[][] data) {
clearMap(); // clear any markers previously placed on the map
mapTitle = "May 2021 Morning Pedestrian Counts";
//Complete this code
** an example code:
float lat = 40.737375365084105f; // latitude of a location of interest
float lng = -74.00101207586745f; // longitude of a location of interest
Location markerLocatio = new Location(lat, lng); // create a Location object
int pedestrianCount = 11024; // an example pedestrian count (need to get it from the file)
float markerRadius = pedestrianCount * SCALE_FACTOR;
float[] markerColor = {255, 0, 0, 127}; // a color, specified as a combinatino of red, green, blue, and
alpha (i.e. transparency), each represented as numbers between 0 and 255.
MarkerBubble marker = new MarkerBubble(this, markerLocatio, markerRadius, markerColor);
map.addMarker(marker);
Sample of the csv file :
the_geom,Borough,Loc,OBJECTID,Street_Nam,From_Stree,To_Street,Index,May07_AM,May07_
PM,May07_MD,Sept07_AM,Sept07_PM,Sept07_MD,May08_AM,May08_PM,May08_MD,Sept08_
AM,Sept08_PM,Sept08_MD,May09_AM,May09_PM,May09_MD,Sept09_AM,Sept09_PM,Sept09
_MD,May10_AM,May10_PM,May10_MD,Sept10_AM,Sept10_PM,Sept10_MD,May11_AM,May11
_PM,May11_MD,Sept11_AM,Sept11_PM,Sept11_MD,May12_AM,May12_PM,May12_MD,Sept12
_AM,Sept12_PM,Sept12_MD,May13_AM,May13_PM,May13_MD,Sept13_AM,Sept13_PM,Sept1
3_MD,May14_AM,May14_PM,May14_MD,Sept14_AM,Sept14_PM,Sept14_MD,May15_AM,May1
5_PM,May15_MD,Sept15_AM,Sept15_PM,Sept15_MD,May16_AM,May16_PM,May16_MD,Sept1
6_AM,Sept16_PM,Sept16_MD,May17_AM,May17_PM,May17_MD,Sept17_AM,Sept17_PM,Sept
17_MD,May18_AM,May18_PM,May18_MD,Sept18_AM,Sept18_PM,Sept18_MD,May19_AM,May
19_PM,May19_MD,Oct20_AM,Oct20_PM,Oct20_MD,May21_AM,May21_PM,May21_MD
POINT (-73.90459140730678 40.87919896648574),Bronx,1,1,Broadway,West 231st
Street,Naples
Terrace,N,1189,4094,2508,734,2646,2939,802,4015,2631,1125,4310,3420,1001,3475,2832,991,
4262,2469,1010,3609,3128,863,4119,2217,997,4440,2687,1328,3820,2428,1288,3328,3365,126
8,4315,2276,1210,4710,3825,1206,4590,3008,1220,4384,2641,1450,4646,2996,1788,4980,3033,
1204,4520,2999,1246,4531,2686,1309,3642,2830,1916,5893,2776,1111,4044,2731,1271,4502,2
899,1708,4464,2967,,,,486,2843,1754,630,3262,1710
POINT (-73.92188432870218 40.82662794123294),Bronx,2,2,East 161st Street,Grand
Concourse,Sheridan